source: golgotha/src/golg/objs/bolt.hh @ 80

Last change on this file since 80 was 80, checked in by Sam Hocevar, 11 years ago
  • Adding the Golgotha source code. Not sure what's going to be interesting in there, but since it's all public domain, there's certainly stuff to pick up.
File size: 2.1 KB
Line 
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 G1_BOLT_HH
10#define G1_BOLT_HH
11
12#include "objs/map_piece.hh"
13
14class g1_bolt_class : public g1_object_class
15{
16public:
17  int ticks;
18  i4_bool first, lit;
19  i4_3d_vector target_pos;
20  i4_float w1,w2;
21  i4_color c1,c2;
22  i4_float a1,a2;
23  i4_float size;
24  s1_sound_handle sfx_loop;
25
26  g1_typed_reference_class<g1_object_class> originator;
27  g1_typed_reference_class<g1_object_class> target;
28  g1_typed_reference_class<g1_light_object_class> light, end_light;
29 
30  enum {NUM_ARCS=5};
31 
32  struct arc_point
33  {
34    i4_3d_vector lposition,position;
35  } arc[NUM_ARCS];
36
37  void request_remove();
38
39  void setup(const i4_3d_vector &start_pos,
40             const i4_3d_vector &target_pos,
41             g1_object_class *originator,
42             g1_object_class *target=0);
43
44  void setup_look(i4_float _size,
45                  i4_float start_width,     i4_float end_width,
46                  i4_color start_color,     i4_color end_color,
47                  i4_float start_alpha=1.0, i4_float end_alpha=1.0,
48                  i4_bool  _lit=i4_F)
49  {
50    size = _size;
51    w1 = start_width; w2 = end_width;
52    c1 = start_color; c2 = end_color;
53    a1 = start_alpha; a2 = end_alpha;
54    lit = _lit;
55  }
56
57  void move(const i4_3d_vector &pos);
58  void arc_to(const i4_3d_vector &target);
59  void copy_old_points();
60
61  ~g1_bolt_class();
62
63  g1_bolt_class(g1_object_type id, g1_loader_class *fp);
64  virtual void save(g1_saver_class *fp);
65  virtual void draw(g1_draw_context_class *context); 
66  virtual void think();
67  virtual void post_think();
68
69  void create_light();
70  void destroy_light();
71};
72
73#endif
Note: See TracBrowser for help on using the repository browser.