[80] | 1 | /********************************************************************** <BR>
|
---|
| 2 | This file is part of Crack dot Com's free source code release of
|
---|
| 3 | Golgotha. <a href="http://www.crack.com/golgotha_release"> <BR> for
|
---|
| 4 | information about compiling & licensing issues visit this URL</a>
|
---|
| 5 | <PRE> If that doesn't help, contact Jonathan Clark at
|
---|
| 6 | golgotha_source@usa.net (Subject should have "GOLG" in it)
|
---|
| 7 | ***********************************************************************/
|
---|
| 8 |
|
---|
| 9 | #ifndef M1_INFO_HH
|
---|
| 10 | #define M1_INFO_HH
|
---|
| 11 |
|
---|
| 12 | #include "math/num_type.hh"
|
---|
| 13 | #include "memory/array.hh"
|
---|
| 14 | #include "string/string.hh"
|
---|
| 15 |
|
---|
| 16 | enum {
|
---|
| 17 | M1_SHOW_AXIS=1,
|
---|
| 18 | M1_WIREFRAME=2,
|
---|
| 19 | M1_SHADING=4,
|
---|
| 20 | M1_SHOW_FACE_NUMBERS=8,
|
---|
| 21 | M1_SHOW_FACE_NAMES=16,
|
---|
| 22 | M1_SHOW_VERT_NUMBERS=32
|
---|
| 23 | };
|
---|
| 24 |
|
---|
| 25 | class m1_poly_object_class;
|
---|
| 26 | class r1_render_api_class;
|
---|
| 27 | class i4_font_class;
|
---|
| 28 |
|
---|
| 29 | struct m1_info_struct
|
---|
| 30 | {
|
---|
| 31 | i4_array<i4_str *> models;
|
---|
| 32 | i4_array<i4_str *> textures;
|
---|
| 33 | i4_array<i4_str *> res_files;
|
---|
| 34 | m1_poly_object_class *obj;
|
---|
| 35 | r1_render_api_class *r_api;
|
---|
| 36 | i4_font_class *r_font;
|
---|
| 37 |
|
---|
| 38 | i4_array<w32> vertex_flags;
|
---|
| 39 |
|
---|
| 40 | int current_model;
|
---|
| 41 | int preselect_poly;
|
---|
| 42 | int preselect_point;
|
---|
| 43 | i4_float time;
|
---|
| 44 | int current_frame;
|
---|
| 45 | int current_animation;
|
---|
| 46 | int current_team;
|
---|
| 47 | w32 bg_color;
|
---|
| 48 | int update_mode;
|
---|
| 49 |
|
---|
| 50 | w32 flags;
|
---|
| 51 | w32 get_flags(w32 mask) { return flags&mask; }
|
---|
| 52 | void set_flags(w32 mask, w32 value=0xffffffff) { flags=(flags&~mask) | (value&mask); }
|
---|
| 53 |
|
---|
| 54 | const i4_const_str current_filename();
|
---|
| 55 | void set_current_filename(const i4_const_str &str);
|
---|
| 56 |
|
---|
| 57 | i4_bool textures_loaded, recalcing_textures;
|
---|
| 58 |
|
---|
| 59 | m1_info_struct() : models(0,32), textures(0,32), res_files(0, 32), vertex_flags(0,32)
|
---|
| 60 | {
|
---|
| 61 | flags=0;
|
---|
| 62 | current_model=0;
|
---|
| 63 | textures_loaded=i4_F;
|
---|
| 64 | recalcing_textures=i4_F;
|
---|
| 65 | preselect_poly=-1;
|
---|
| 66 | obj=0;
|
---|
| 67 | time=0;
|
---|
| 68 | current_frame=0;
|
---|
| 69 | current_animation=0;
|
---|
| 70 | current_team=0;
|
---|
| 71 | r_api=0;
|
---|
| 72 | update_mode=0;
|
---|
| 73 | r_font=0;
|
---|
| 74 | }
|
---|
| 75 |
|
---|
| 76 | void get_texture_list(i4_array<i4_str *> &array, i4_bool for_all=i4_T);
|
---|
| 77 | void init(int argc, i4_const_str *argv);
|
---|
| 78 | void uninit();
|
---|
| 79 | void texture_list_changed();
|
---|
| 80 | };
|
---|
| 81 |
|
---|
| 82 | extern m1_info_struct m1_info;
|
---|
| 83 |
|
---|
| 84 | #endif
|
---|