model_draw.hh 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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 G1_MODEL_DRAW_HH
  9. #define G1_MODEL_DRAW_HH
  10. #include "arch.hh"
  11. class g1_object_class;
  12. class g1_draw_context_class;
  13. class g1_quad_object_class;
  14. struct g1_model_draw_parameters
  15. {
  16. enum
  17. {
  18. SUPPRESS_SPECIALS=1,
  19. NO_LIGHTING=2 // draws object full-bright
  20. };
  21. g1_quad_object_class *model;
  22. g1_quad_object_class *shadow_model;
  23. g1_quad_object_class *lod_model;
  24. w16 frame; // current animation frame
  25. w16 animation; // current animation number in model
  26. w32 flags; // drawing modifiers
  27. g1_model_draw_parameters()
  28. {
  29. model = 0;
  30. shadow_model = 0;
  31. lod_model = 0;
  32. frame = 0;
  33. animation = 0;
  34. flags = 0;
  35. }
  36. void setup(const char *model_name, char *shadow_model_name=0, char *lod_model_name=0);
  37. void setup(w16 model_id, w16 shadow_model=0, w16 lod_model=0);
  38. void setup(g1_quad_object_class *model,
  39. g1_quad_object_class *shadow_model=0,
  40. g1_quad_object_class *lod_model=0);
  41. float extent() const; // gets extents of model_id from model_draw
  42. };
  43. void g1_model_draw(g1_object_class *_this,
  44. g1_model_draw_parameters &params,
  45. g1_draw_context_class *context);
  46. void g1_editor_model_draw(g1_object_class *_this,
  47. g1_model_draw_parameters &params,
  48. g1_draw_context_class *context); // calls model draw if in edit mode
  49. #endif