From 4e5126a5961d1e7cbad670263fd72d6c17c2056a Mon Sep 17 00:00:00 2001 From: Dav999 Date: Tue, 12 Sep 2023 03:04:34 +0200 Subject: [PATCH] Move `struct Summary` from Game.cpp to Game.h This will allow it to be used in other source files in a later commit. --- desktop_version/src/Game.cpp | 15 +-------------- desktop_version/src/Game.h | 16 +++++++++++++++- 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/desktop_version/src/Game.cpp b/desktop_version/src/Game.cpp index f5096385..28b34df1 100644 --- a/desktop_version/src/Game.cpp +++ b/desktop_version/src/Game.cpp @@ -5581,22 +5581,9 @@ void Game::customloadquick(const std::string& savfile) } } -struct Summary -{ - const char* summary; - int seconds; - int minutes; - int hours; - int savex; - int savey; - int trinkets; - bool finalmode; - bool crewstats[Game::numcrew]; -}; - static void loadthissummary( const char* filename, - struct Summary* summary, + struct Game::Summary* summary, tinyxml2::XMLDocument& doc ) { tinyxml2::XMLHandle hDoc(&doc); diff --git a/desktop_version/src/Game.h b/desktop_version/src/Game.h index 317db694..8a125800 100644 --- a/desktop_version/src/Game.h +++ b/desktop_version/src/Game.h @@ -290,6 +290,21 @@ public: void loadsummary(void); + static const int numcrew = 6; + + struct Summary + { + const char* summary; + int seconds; + int minutes; + int hours; + int savex; + int savey; + int trinkets; + bool finalmode; + bool crewstats[numcrew]; + }; + void readmaingamesave(const char* savename, tinyxml2::XMLDocument& doc); std::string writemaingamesave(tinyxml2::XMLDocument& doc); @@ -434,7 +449,6 @@ public: bool inintermission; - static const int numcrew = 6; bool crewstats[numcrew]; bool ndmresultcrewstats[numcrew];