StarTrekV3_Linux  Version3
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Friends Macros Pages
Enterprise.h
Go to the documentation of this file.
1 //
2 // ___.--------._____________,------' -----.`----._
3 // \ ` - . _ /\
4 // `.__________ ` - | | __,---"-._
5 // `-----------.______ ,'_/ ________,------'___________`----.___________
6 // `-----.____,' \===========================================/
7 // | :| >--------------.----------.---------------'
8 // / :| _,--' ,--' `--.__.--'
9 // / : |--'______________/_
10 // ,---,' : \__________________`--.
11 // `__________ |/|
12 // `------._ |\|
13 // `--._________,-'
14 //
15 //
16 //
17 // Credits go to Paramount pictures for the star - trek concept and universe.
18 
19 
20 // Copyright (C) 2015 - 2016 E.J.M. Martens
21 //
22 // This program is free software; you can redistribute it and/or
23 // modify it under the terms of the GNU General Public License
24 // as published by the Free Software Foundation; either version 2
25 // of the License, or (at your option) any later version.
26 //
27 // This program is distributed in the hope that it will be useful,
28 // but WITHOUT ANY WARRANTY; without even the implied warranty of
29 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
30 // GNU General Public License for more details.
31 //
32 // You should have received a copy of the GNU General Public License
33 // along with this program; if not, write to the Free Software
34 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
35 
36 
37 #ifndef _USSENTERPRISE
38 #define _USSENTERPRISE
39 
40 #include <vector>
41 #include <cmath>
42 #include "types.h"
43 #include "Engine.h"
44 #include "Ship.h"
45 #include "Universe.h"
46 
47 class Universe;
48 
49 class TEnterprise:public TShip
50 {
51 private:
52  Universe * m_pUniverse;
53 
54 
56  bool m_blTorploading;
57 
58  int m_nEngineeringStartX;
59  int m_nEngineeringStartY;
60 
61  int m_nNavigationXOffset;
62  int m_nNavigationYOffset;
63 
64  NAVIGATION_MODE m_NavigationMode;
65 
66  void DrawBaseInfo(const Sector & a_sector,int a_nX, int a_nY);
67  void DrawPlanetInfo(const Sector & a_sector,int a_nX, int a_nY);
68  void DrawOccupationInfo(const Sector & a_sector,int a_nX, int a_nY, int a_nSizeX, int a_nSizeY);
69  void DrawTacticalInfo(const Sector & a_sector,int a_nX, int a_nY, int a_nSizeX, int a_nSizeY);
70  void DrawNavigationLegenda(int a_nX, int a_nY);
71 
72 
73 
74 public:
75 
79  int m_nProbes;
80 
81  virtual void DoEngineering();
82  virtual void Do_ai();
83 
84  double GetX();
85  double GetY();
86  inline int GetWarp() {return m_nWarpFactor;}
87  inline double GetAngle() {return m_dAngle;}
88  void SetX(double a_dX);
89  void SetY(double a_dY);
90  void LockUp();
91  void LockDown();
94  void DNavOriginX(int a_nOffset);
95  void DNavOriginY(int a_nOffset);
96  void UpdateStarmap(int a_dXOffset, int a_dYOffset);
97 
98  void IncNavX();
99  void DecNavX();
100  void IncNavY();
101  void DecNavY();
102 
103 
104  void FirePhoton(bool bf);
105  void LaunchProbe();
106  void draw_engineering();
107  void draw_transporter();
108  void DrawTargetInfo(int a_nSelection,int a_nXLocation,int a_nYLocation);
109  void Draw_Navigation(Universe * a_pUniverse);
110  void StartWarp(int a_nWarpFactor);
111  void DoWarp();
112  void StopWarp();
113  TEnterprise();
114 
115  static bool Init();
116 };
117 
118 
119 
120 
121 
122 
123 #endif
void draw_engineering()
Definition: Enterprise.cpp:859
Definition: Ship.h:62
void DecNavY()
Definition: Enterprise.cpp:1264
void DrawTargetInfo(int a_nSelection, int a_nXLocation, int a_nYLocation)
Definition: Enterprise.cpp:764
void DecNavX()
Definition: Enterprise.cpp:1248
void UpdateStarmap(int a_dXOffset, int a_dYOffset)
Definition: Enterprise.cpp:1404
void SetNavigationMode(NAVIGATION_MODE a_Mode)
Definition: Enterprise.cpp:1379
double GetY()
Definition: Enterprise.cpp:88
int m_nSectorPositionY
Definition: Enterprise.h:77
Definition: Universe.h:136
void StartWarp(int a_nWarpFactor)
Definition: Enterprise.cpp:271
void LockUp()
Definition: Enterprise.cpp:731
void FirePhoton(bool bf)
Definition: Enterprise.cpp:686
void LaunchProbe()
Definition: Enterprise.cpp:642
int m_nProbes
Definition: Enterprise.h:79
NAVIGATION_MODE
Definition: types.h:146
void Draw_Navigation(Universe *a_pUniverse)
Definition: Enterprise.cpp:1274
void DNavOriginY(int a_nOffset)
Definition: Enterprise.cpp:1396
int m_nWarpFactor
Definition: Enterprise.h:78
int m_nSectorPositionX
Definition: Enterprise.h:76
int GetWarp()
Definition: Enterprise.h:86
Definition: Universe.h:95
void SetX(double a_dX)
Definition: Enterprise.cpp:93
double GetX()
Definition: Enterprise.cpp:83
virtual void DoEngineering()
VIRTUAL Do Engineering AI, damage control, energy management etc. Should be called in Do_ai()...
Definition: Enterprise.cpp:104
void SetDefaultNavigationOrigin()
Definition: Enterprise.cpp:1385
static bool Init()
Definition: Enterprise.cpp:1430
void DNavOriginX(int a_nOffset)
Definition: Enterprise.cpp:1391
void LockDown()
Definition: Enterprise.cpp:747
Definition: Enterprise.h:49
void DoWarp()
Definition: Enterprise.cpp:276
TEnterprise()
Definition: Enterprise.cpp:43
void draw_transporter()
Definition: Enterprise.cpp:940
void StopWarp()
Definition: Enterprise.cpp:290
void IncNavY()
Definition: Enterprise.cpp:1256
void IncNavX()
Definition: Enterprise.cpp:1240
double m_dAngle
Definition: Engine.h:143
virtual void Do_ai()
** VIRTUAL ** Enter AI routine Called by Engine
Definition: Enterprise.cpp:300
double GetAngle()
Definition: Enterprise.h:87
void SetY(double a_dY)
Definition: Enterprise.cpp:98