Change gamelog to use std::vector

Move LoadCheckData to its own header
This commit is contained in:
Jonathan G Rennison
2023-07-03 22:42:28 +01:00
parent 5ae5ac3701
commit 0bf41dc1ff
23 changed files with 212 additions and 228 deletions

View File

@@ -12,6 +12,8 @@
#include "newgrf_config.h"
struct LoggedAction;
/** The actions we log. */
enum GamelogActionType : uint8 {
GLAT_START, ///< Game created
@@ -29,7 +31,7 @@ void GamelogStartAction(GamelogActionType at);
void GamelogStopAction();
void GamelogStopAnyAction();
void GamelogFree(struct LoggedAction *gamelog_action, uint gamelog_actions);
void GamelogFree(std::vector<LoggedAction> &gamelog_actions);
void GamelogReset();
/**
@@ -61,7 +63,7 @@ void GamelogTestMode();
bool GamelogGRFBugReverse(uint32 grfid, uint16 internal_id);
void GamelogInfo(struct LoggedAction *gamelog_action, uint gamelog_actions, uint32 *last_ottd_rev, byte *ever_modified, bool *removed_newgrfs);
const char *GamelogGetLastRevision(const struct LoggedAction *gamelog_action, uint gamelog_actions);
void GamelogInfo(const std::vector<LoggedAction> &gamelog_actions, uint32 *last_ottd_rev, byte *ever_modified, bool *removed_newgrfs);
const char *GamelogGetLastRevision(const std::vector<LoggedAction> &gamelog_actions);
#endif /* GAMELOG_H */