Starshatter_Open
Open source Starshatter engine
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
NavLight.h
Go to the documentation of this file.
1 /* Project Starshatter 4.5
2  Destroyer Studios LLC
3  Copyright © 1997-2004. All Rights Reserved.
4 
5  SUBSYSTEM: Stars.exe
6  FILE: NavLight.h
7  AUTHOR: John DiCamillo
8 
9 
10  OVERVIEW
11  ========
12  Navigation Lights System class
13 */
14 
15 #ifndef NavLight_h
16 #define NavLight_h
17 
18 #include "Types.h"
19 #include "System.h"
20 #include "DriveSprite.h"
21 #include "Geometry.h"
22 
23 // +--------------------------------------------------------------------+
24 
25 class NavLight : public System
26 {
27 public:
28  enum Constants { MAX_LIGHTS = 8 };
29 
30  NavLight(double period, double scale);
31  NavLight(const NavLight& rhs);
32  virtual ~NavLight();
33 
34  static void Initialize();
35  static void Close();
36 
37  virtual void ExecFrame(double seconds);
38 
39  int NumBeacons() const { return nlights; }
40  Sprite* Beacon(int index) const { return beacon[index]; }
41  bool IsEnabled() const { return enable; }
42 
43  virtual void Enable();
44  virtual void Disable();
45  virtual void AddBeacon(Point loc, DWORD pattern, int type=1);
46  virtual void SetPeriod(double p);
47  virtual void SetPattern(int index, DWORD p);
48  virtual void SetOffset(DWORD o);
49 
50  virtual void Orient(const Physical* rep);
51 
52 protected:
53  double period;
54  double scale;
55  bool enable;
56 
57  int nlights;
58 
63  DWORD offset;
64 };
65 
66 #endif NavLight_h
67