Starshatter_Open
Open source Starshatter engine
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
StarServer.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
6  FILE: StarServer.h
7  AUTHOR: John DiCamillo
8 
9 */
10 
11 #ifndef StarServer_h
12 #define StarServer_h
13 
14 #include "Types.h"
15 #include "Game.h"
16 #include "Bitmap.h"
17 #include "KeyMap.h"
18 
19 // +--------------------------------------------------------------------+
20 
21 class Campaign;
22 class Ship;
23 class Sim;
24 class FadeView;
25 class CameraDirector;
26 class MultiController;
27 class MouseController;
28 class DataLoader;
29 
30 class NetServer;
31 class NetLobbyServer;
32 
33 // +--------------------------------------------------------------------+
34 
35 class StarServer : public Game
36 {
37 public:
38  StarServer();
39  virtual ~StarServer();
40 
41  virtual bool Init(HINSTANCE hi, HINSTANCE hpi, LPSTR cmdline, int nCmdShow);
42  virtual bool InitGame();
43  virtual void GameState();
44  virtual bool OnPaint();
45 
46  enum MODE { MENU_MODE, // main menu
47  LOAD_MODE, // loading mission into simulator
48  PLAY_MODE // active simulation
49  };
50 
51  int GetGameMode() { return game_mode; }
52  void SetGameMode(int mode);
53  void SetNextMission(const char* script);
54 
55  void CreateWorld();
56  void Shutdown(bool restart=false);
57 
58  static StarServer* GetInstance() { return instance; }
59 
60 
61 protected:
62  virtual bool GameLoop();
63  virtual void UpdateWorld();
64  virtual void InstantiateMission();
65 
70 
71  int game_mode;
72  DWORD time_mark;
73  DWORD minutes;
74 };
75 
76 #endif StarServer_h