Starshatter_Open
Open source Starshatter engine
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
FighterAI.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: FighterAI.h
7  AUTHOR: John DiCamillo
8 
9 
10  OVERVIEW
11  ========
12  Fighter (low-level) Artifical Intelligence class
13 */
14 
15 #ifndef FighterAI_h
16 #define FighterAI_h
17 
18 #include "Types.h"
19 #include "ShipAI.h"
20 
21 // +--------------------------------------------------------------------+
22 
23 class Ship;
24 class Shot;
25 class InboundSlot;
26 
27 // +--------------------------------------------------------------------+
28 
29 class FighterAI : public ShipAI
30 {
31 public:
32  FighterAI(SimObject* s);
33  virtual ~FighterAI();
34 
35  virtual void ExecFrame(double seconds);
36  virtual int Subframe() const { return true; }
37 
38  // convert the goal point from world to local coords:
39  virtual void FindObjective();
40  virtual void FindObjectiveNavPoint();
41 
42 protected:
43  // behaviors:
44  virtual Steer AvoidTerrain();
45  virtual Steer SeekTarget();
46  virtual Steer EvadeThreat();
47  virtual Point ClosingVelocity();
48 
49  // accumulate behaviors:
50  virtual void Navigator();
51 
52  // steering functions:
53  virtual Steer Seek(const Point& point);
54  virtual Steer SeekFormationSlot();
55 
56  // fire on target if appropriate:
57  virtual void FireControl();
58  virtual void HelmControl();
59  virtual void ThrottleControl();
60 
61  virtual double CalcDefensePerimeter(Ship* starship);
62  virtual void ReturnToBase(Ship* controller);
63 
65  double missile_time;
68  char dir_info[32];
69  double brakes;
70  double z_shift;
71  double time_to_dock;
73  int rtb_code;
74  bool evading;
75  DWORD jink_time;
78  bool form_up;
79  bool go_manual;
80 };
81 
82 // +--------------------------------------------------------------------+
83 
84 #endif FighterAI_h
85