From 2914a714cebae7f30d47362dfe50c39cb6621163 Mon Sep 17 00:00:00 2001 From: Aki Date: Tue, 12 Mar 2024 00:31:44 +0100 Subject: Removed some connections from Starserver and Game to Types.h This was intended to be wider but DataLoader seems to stop progress once again. This in turn asks for rework of FoundationEx, Readers and Virtual Filesystem. --- StarsEx/Game.cpp | 21 +++++++++------------ StarsEx/Game.h | 14 ++++---------- StarsEx/GameWinDX9.cpp | 2 +- StarsEx/Keyboard.cpp | 3 ++- StarsEx/NPClientWraps.cpp | 2 +- StarsEx/NavAI.cpp | 5 ----- 6 files changed, 17 insertions(+), 30 deletions(-) (limited to 'StarsEx') diff --git a/StarsEx/Game.cpp b/StarsEx/Game.cpp index a7fd991..90fcf62 100644 --- a/StarsEx/Game.cpp +++ b/StarsEx/Game.cpp @@ -8,18 +8,14 @@ */ #include "Game.h" + +#include + +#include "Clock.h" +#include "ContentBundle.h" #include "Mouse.h" -#include "Universe.h" -#include "Window.h" -#include "UIEventDispatch.h" #include "Panic.h" -#include "Pcx.h" -#include "Bitmap.h" -#include "VideoSettings.h" -#include "ContentBundle.h" -#include "Clock.h" -#include "WndProc.h" -#include "SoundCard.h" +#include "UIEventDispatch.h" Game* Game::instance {nullptr}; @@ -50,7 +46,7 @@ Game::~Game() // +--------------------------------------------------------------------+ bool -Game::Init(HINSTANCE hi, HINSTANCE hpi, LPSTR cmdline, int nCmdShow) +Game::Init() { status = OK; @@ -172,7 +168,8 @@ Game::GetInstance() // +--------------------------------------------------------------------+ -DWORD Game::Frame() +std::uint32_t +Game::Frame() { return frame_number; } diff --git a/StarsEx/Game.h b/StarsEx/Game.h index 50b3379..878f2d0 100644 --- a/StarsEx/Game.h +++ b/StarsEx/Game.h @@ -10,9 +10,8 @@ #ifndef Game_h #define Game_h -#include "Types.h" +#include -// +--------------------------------------------------------------------+ class Game { @@ -33,11 +32,7 @@ public: Game(); virtual ~Game(); - // - // MAIN GAME FUNCTIONALITY: - // - - virtual bool Init(HINSTANCE hi, HINSTANCE hpi, LPSTR cmdline, int nCmdShow); + virtual bool Init(); virtual int Run(); virtual void Exit(); @@ -54,7 +49,7 @@ public: static Game* GetInstance(); - DWORD Frame(); + std::uint32_t Frame(); bool Active() const { return active; } bool Paused() const { return paused; } @@ -75,12 +70,11 @@ protected: bool active; bool paused; - DWORD frame_number; + std::uint32_t frame_number; private: static Game* instance; }; -// +--------------------------------------------------------------------+ #endif // Game_h diff --git a/StarsEx/GameWinDX9.cpp b/StarsEx/GameWinDX9.cpp index 9f5595d..236c512 100644 --- a/StarsEx/GameWinDX9.cpp +++ b/StarsEx/GameWinDX9.cpp @@ -105,7 +105,7 @@ GameWinDX9::Init(HINSTANCE hi, HINSTANCE hpi, LPSTR cmdline, int nCmdShow) if (status != OK) return false; - return Game::Init(hi, hpi, cmdline, nCmdShow); + return Game::Init(); } diff --git a/StarsEx/Keyboard.cpp b/StarsEx/Keyboard.cpp index 63b93e9..c4e2d26 100644 --- a/StarsEx/Keyboard.cpp +++ b/StarsEx/Keyboard.cpp @@ -12,7 +12,8 @@ */ #include "Keyboard.h" -#include "Game.h" + +#include "Types.h" // +--------------------------------------------------------------------+ diff --git a/StarsEx/NPClientWraps.cpp b/StarsEx/NPClientWraps.cpp index 0705696..92d5561 100644 --- a/StarsEx/NPClientWraps.cpp +++ b/StarsEx/NPClientWraps.cpp @@ -21,8 +21,8 @@ // * // ******************************************************************************* // -#include "Game.h" #include "Text.h" +#include "Types.h" #include "NPClient.h" #include "NPClientWraps.h" diff --git a/StarsEx/NavAI.cpp b/StarsEx/NavAI.cpp index ad897d0..609c4ab 100644 --- a/StarsEx/NavAI.cpp +++ b/StarsEx/NavAI.cpp @@ -27,8 +27,6 @@ #include "KeyMap.h" #include "HUDView.h" #include "HUDSounds.h" - -#include "Game.h" #include "ContentBundle.h" // +----------------------------------------------------------------------+ @@ -616,6 +614,3 @@ NavAI::AvoidTerrain() return avoid; } - - - -- cgit v1.1