m1_info.hh 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  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. #ifndef M1_INFO_HH
  9. #define M1_INFO_HH
  10. #include "math/num_type.hh"
  11. #include "memory/array.hh"
  12. #include "string/string.hh"
  13. enum {
  14. M1_SHOW_AXIS=1,
  15. M1_WIREFRAME=2,
  16. M1_SHADING=4,
  17. M1_SHOW_FACE_NUMBERS=8,
  18. M1_SHOW_FACE_NAMES=16,
  19. M1_SHOW_VERT_NUMBERS=32
  20. };
  21. class m1_poly_object_class;
  22. class r1_render_api_class;
  23. class i4_font_class;
  24. struct m1_info_struct
  25. {
  26. i4_array<i4_str *> models;
  27. i4_array<i4_str *> textures;
  28. i4_array<i4_str *> res_files;
  29. m1_poly_object_class *obj;
  30. r1_render_api_class *r_api;
  31. i4_font_class *r_font;
  32. i4_array<w32> vertex_flags;
  33. int current_model;
  34. int preselect_poly;
  35. int preselect_point;
  36. i4_float time;
  37. int current_frame;
  38. int current_animation;
  39. int current_team;
  40. w32 bg_color;
  41. int update_mode;
  42. w32 flags;
  43. w32 get_flags(w32 mask) { return flags&mask; }
  44. void set_flags(w32 mask, w32 value=0xffffffff) { flags=(flags&~mask) | (value&mask); }
  45. const i4_const_str current_filename();
  46. void set_current_filename(const i4_const_str &str);
  47. i4_bool textures_loaded, recalcing_textures;
  48. m1_info_struct() : models(0,32), textures(0,32), res_files(0, 32), vertex_flags(0,32)
  49. {
  50. flags=0;
  51. current_model=0;
  52. textures_loaded=i4_F;
  53. recalcing_textures=i4_F;
  54. preselect_poly=-1;
  55. obj=0;
  56. time=0;
  57. current_frame=0;
  58. current_animation=0;
  59. current_team=0;
  60. r_api=0;
  61. update_mode=0;
  62. r_font=0;
  63. }
  64. void get_texture_list(i4_array<i4_str *> &array, i4_bool for_all=i4_T);
  65. void init(int argc, i4_const_str *argv);
  66. void uninit();
  67. void texture_list_changed();
  68. };
  69. extern m1_info_struct m1_info;
  70. #endif