51 std::unique_ptr<GamelogInternalData> data;
67 void Print(std::function<
void(
const std::string &)> proc);
77 void Setting(
const std::string &name, int32_t oldval, int32_t newval);
83 void GRFBug(uint32_t grfid, uint8_t bug, uint64_t data);
86 void GRFMove(uint32_t grfid, int32_t offset);
92 void Info(uint32_t *last_ottd_rev, uint8_t *ever_modified,
bool *removed_newgrfs);
void TestRevision()
Finds out if current revision is different than last revision stored in the savegame.
void GRFBug(uint32_t grfid, uint8_t bug, uint64_t data)
Logs triggered GRF bug.
void Mode()
Logs a change in game mode (scenario editor or game)
void Info(uint32_t *last_ottd_rev, uint8_t *ever_modified, bool *removed_newgrfs)
Get some basic information from the given gamelog.
void PrintDebug(int level)
Prints gamelog to debug output.
void GRFAddList(const GRFConfig *newg)
Logs adding of list of GRFs.
void PrintConsole()
Print the gamelog data to the console.
void GRFCompatible(const GRFIdentifier *newg)
Logs loading compatible GRF (the same ID, but different MD5 hash)
void GRFParameters(uint32_t grfid)
Logs change in GRF parameters.
void Revision()
Logs a change in game revision.
void StartAction(GamelogActionType at)
Stores information about new action, but doesn't allocate it Action is allocated only when there is a...
void Reset()
Resets and frees all memory allocated - used before loading or starting a new game.
const GRFIdentifier * GetOverriddenIdentifier(const GRFConfig *c)
Try to find the overridden GRF identifier of the given GRF.
void GRFRemove(uint32_t grfid)
Logs removal of a GRF.
void GRFUpdate(const GRFConfig *oldg, const GRFConfig *newg)
Compares two NewGRF lists and logs any change.
void Oldver()
Logs loading from savegame without gamelog.
void Emergency()
Logs a emergency savegame.
bool GRFBugReverse(uint32_t grfid, uint16_t internal_id)
Logs GRF bug - rail vehicle has different length after reversing.
void TestMode()
Finds last stored game mode or landscape.
void StopAction()
Stops logging of any changes.
void Setting(const std::string &name, int32_t oldval, int32_t newval)
Logs change in game settings.
void Print(std::function< void(const std::string &)> proc)
Prints active gamelog.
void Change(std::unique_ptr< LoggedChange > &&change)
Allocates a new LoggedAction if needed, and add the change when action is active.
bool TestEmergency()
Finds out if current game is a loaded emergency savegame.
void GRFMove(uint32_t grfid, int32_t offset)
Logs changing GRF order.
void GRFAdd(const GRFConfig *newg)
Logs adding of a GRF.
Gamelog _gamelog
Gamelog instance.
GamelogChangeType
Type of logged change.
@ GLCT_MODE
Scenario editor x Game, different landscape.
@ GLCT_OLDVER
Loaded from savegame without logged data.
@ GLCT_SETTING
Non-networksafe setting value changed.
@ GLCT_GRFCOMPAT
Loading compatible GRF.
@ GLCT_GRFADD
Removed GRF.
@ GLCT_END
So we know how many GLCTs are there.
@ GLCT_EMERGENCY
Emergency savegame.
@ GLCT_GRFPARAM
GRF parameter changed.
@ GLCT_GRFMOVE
GRF order changed.
@ GLCT_GRFBUG
GRF bug triggered.
@ GLCT_REVISION
Changed game revision string.
@ GLCT_NONE
In savegames, end of list.
GamelogActionType
The actions we log.
@ GLAT_GRFBUG
GRF bug was triggered.
@ GLAT_START
Game created.
@ GLAT_NONE
No logging active; in savegames, end of list.
@ GLAT_END
So we know how many GLATs are there.
@ GLAT_CHEAT
Cheat was used.
@ GLAT_EMERGENCY
Emergency savegame.
@ GLAT_SETTING
Setting changed.
Functions to find and configure NewGRFs.
Information about GRF, used in the game and (part of it) in savegames.
Basic data to distinguish a GRF.
Contains information about one logged action that caused at least one logged change.
std::vector< std::unique_ptr< LoggedChange > > change
Logged changes in this action.
GamelogActionType at
Type of action.