Codechange: Place gamelog into its own class, along with internal data.

Data is now stored in vectors to avoid manual memory management and
passing lengths around.
This commit is contained in:
Peter Nelson
2023-05-01 18:14:31 +01:00
committed by PeterN
parent 47a8d12f0e
commit 00bf42353a
18 changed files with 308 additions and 345 deletions

View File

@@ -241,7 +241,7 @@ static void WriteSavegameInfo(const char *name)
byte ever_modified = 0;
bool removed_newgrfs = false;
GamelogInfo(_load_check_data.gamelog_action, _load_check_data.gamelog_actions, &last_ottd_rev, &ever_modified, &removed_newgrfs);
_gamelog.Info(&last_ottd_rev, &ever_modified, &removed_newgrfs);
std::string message;
message.reserve(1024);
@@ -311,7 +311,7 @@ static void ShutdownGame()
Game::Uninitialize(false);
/* Uninitialize variables that are allocated dynamically */
GamelogReset();
_gamelog.Reset();
LinkGraphSchedule::Clear();
PoolBase::Clean(PT_ALL);