diff options
author | Aki <please@ignore.pl> | 2022-04-07 00:10:08 +0200 |
---|---|---|
committer | Aki <please@ignore.pl> | 2022-04-07 00:10:08 +0200 |
commit | 7d00261f6b3bf7da2b9371796848883dc3b40392 (patch) | |
tree | 59b930c7e66b9377ee1a3cfb5761171d65b37574 /StarsEx | |
parent | fa8ad06c603036f224ce406c38c6fd44b2cd0deb (diff) | |
download | starshatter-7d00261f6b3bf7da2b9371796848883dc3b40392.zip starshatter-7d00261f6b3bf7da2b9371796848883dc3b40392.tar.gz starshatter-7d00261f6b3bf7da2b9371796848883dc3b40392.tar.bz2 |
Made Game accessors const and fixed minor formatting issues
Diffstat (limited to 'StarsEx')
-rw-r--r-- | StarsEx/Game.h | 6 | ||||
-rw-r--r-- | StarsEx/StarServer.cpp | 3 | ||||
-rw-r--r-- | StarsEx/StarServer.h | 5 |
3 files changed, 8 insertions, 6 deletions
diff --git a/StarsEx/Game.h b/StarsEx/Game.h index 8a9caa8..50b3379 100644 --- a/StarsEx/Game.h +++ b/StarsEx/Game.h @@ -56,9 +56,9 @@ public: DWORD Frame(); - bool Active() { return active; } - bool Paused() { return paused; } - virtual bool Server() { return false; } + bool Active() const { return active; } + bool Paused() const { return paused; } + virtual bool Server() const { return false; } virtual void PumpEvents(); virtual void GameLoop(); diff --git a/StarsEx/StarServer.cpp b/StarsEx/StarServer.cpp index 0cf470a..8d76f38 100644 --- a/StarsEx/StarServer.cpp +++ b/StarsEx/StarServer.cpp @@ -225,6 +225,7 @@ StarServer::CreateWorld() } } + void StarServer::InstantiateMission() { @@ -302,7 +303,7 @@ StarServer::GameState() bool -StarServer::Server() +StarServer::Server() const { return true; } diff --git a/StarsEx/StarServer.h b/StarsEx/StarServer.h index 81c846b..0bcab06 100644 --- a/StarsEx/StarServer.h +++ b/StarsEx/StarServer.h @@ -28,15 +28,16 @@ public: virtual bool Init(HINSTANCE hi, HINSTANCE hpi, LPSTR cmdline, int nCmdShow); virtual bool InitGame(); + + virtual void UpdateWorld(); virtual void GameState(); - bool Server() override; + bool Server() const override; void SetGameMode(int mode) override; void CreateWorld(); protected: - virtual void UpdateWorld(); virtual void InstantiateMission(); Universe* world; |