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