bolt.hh 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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_BOLT_HH
  9. #define G1_BOLT_HH
  10. #include "objs/map_piece.hh"
  11. class g1_bolt_class : public g1_object_class
  12. {
  13. public:
  14. int ticks;
  15. i4_bool first, lit;
  16. i4_3d_vector target_pos;
  17. i4_float w1,w2;
  18. i4_color c1,c2;
  19. i4_float a1,a2;
  20. i4_float size;
  21. s1_sound_handle sfx_loop;
  22. g1_typed_reference_class<g1_object_class> originator;
  23. g1_typed_reference_class<g1_object_class> target;
  24. g1_typed_reference_class<g1_light_object_class> light, end_light;
  25. enum {NUM_ARCS=5};
  26. struct arc_point
  27. {
  28. i4_3d_vector lposition,position;
  29. } arc[NUM_ARCS];
  30. void request_remove();
  31. void setup(const i4_3d_vector &start_pos,
  32. const i4_3d_vector &target_pos,
  33. g1_object_class *originator,
  34. g1_object_class *target=0);
  35. void setup_look(i4_float _size,
  36. i4_float start_width, i4_float end_width,
  37. i4_color start_color, i4_color end_color,
  38. i4_float start_alpha=1.0, i4_float end_alpha=1.0,
  39. i4_bool _lit=i4_F)
  40. {
  41. size = _size;
  42. w1 = start_width; w2 = end_width;
  43. c1 = start_color; c2 = end_color;
  44. a1 = start_alpha; a2 = end_alpha;
  45. lit = _lit;
  46. }
  47. void move(const i4_3d_vector &pos);
  48. void arc_to(const i4_3d_vector &target);
  49. void copy_old_points();
  50. ~g1_bolt_class();
  51. g1_bolt_class(g1_object_type id, g1_loader_class *fp);
  52. virtual void save(g1_saver_class *fp);
  53. virtual void draw(g1_draw_context_class *context);
  54. virtual void think();
  55. virtual void post_think();
  56. void create_light();
  57. void destroy_light();
  58. };
  59. #endif