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

Last change on this file since 80 was 80, checked in by Sam Hocevar, 12 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: 1.6 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_MIRACLE_CLASS_HH
10#define G1_MIRACLE_CLASS_HH
11
12#include "g1_object.hh"
13
14class g1_miracle_class : public g1_object_class
15{
16 
17public:
18  enum {DATA_VERSION=1};
19
20  enum {NUM_ARC_POINTS=10};
21 
22  typedef struct
23  {
24    i4_3d_vector lposition,position;
25  } arc_point_struct;
26 
27  struct arc_point_list_struct
28  {
29    arc_point_struct arc_points[NUM_ARC_POINTS];
30  };
31
32  void new_arc_points(i4_3d_vector src, i4_3d_vector dest, arc_point_struct *dest_points);
33  void copy_old_points(arc_point_struct *dest_points);
34
35  i4_array<arc_point_list_struct> *electric_arcs;
36
37  g1_miracle_class(g1_object_type id, g1_loader_class *fp);
38  ~g1_miracle_class();
39 
40  virtual void save(g1_saver_class *fp);
41   
42  enum {LIGHTNING=1};
43 
44  w32 miracle_type;
45 
46  g1_typed_reference_class<g1_convoy_class> convoy;   // the convoy it is killing
47
48  void post_think();
49  void think();
50  void draw(g1_draw_context_class *context); 
51 
52  void setup(g1_convoy_class *convoy_to_attack, w32 _miracle_type, i4_3d_vector pos);
53
54  i4_float occupancy_radius() const { return 0.4; }
55
56  g1_voice_class  *miracle_sound;
57};
58
59#endif
Note: See TracBrowser for help on using the repository browser.