source: golgotha/src/golg/objs/shockwave.hh

Last change on this file 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: 1.5 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 SHOCKWAVE_HH
10#define SHOCKWAVE_HH
11
12#include "g1_object.hh"
13#include "player.hh"
14#include "path.hh"
15#include "objs/model_draw.hh"
16
17class g1_solid_class;
18class g1_map_piece_class;
19
20class g1_shockwave_class : public g1_object_class
21{
22  struct vert_offset
23  {
24    w32 color;
25    sw32 displacement;
26  } *vert_map;
27 
28  float focal_radius;
29
30  float strength, red_intensity, green_intensity, blue_intensity;
31  w16   radius;
32
33
34  enum { DATA_VERSION=1 };
35
36  void alloc_vert_map();
37
38  virtual void draw(g1_draw_context_class *context);
39  virtual void think();
40
41public:
42 
43  g1_shockwave_class(g1_object_type id, g1_loader_class *fp);
44  virtual void save(g1_saver_class *fp);
45
46  virtual void setup(const i4_3d_vector &pos,  // starting position (center)
47                     float strength=0.5,                     // maximum ground distortion
48                     w16 radius=5);                          // maximum radius in game units
49
50  ~g1_shockwave_class();
51
52  virtual i4_bool occupy_location();
53  virtual void unoccupy_location();
54};
55
56#endif
Note: See TracBrowser for help on using the repository browser.