52 std::unique_ptr<GamelogInternalData> data;
56 void Change(std::unique_ptr<LoggedChange> &&change);
68 void Print(std::function<
void(
const std::string &)> proc);
78 void Setting(
const std::string &name, int32_t oldval, int32_t newval);
80 void GRFUpdate(
const GRFConfigList &oldg,
const GRFConfigList &newg);
93 void Info(uint32_t *last_ottd_rev, uint8_t *ever_modified,
bool *removed_newgrfs);
97 friend struct GLOGChunkHandler;
void TestRevision()
Finds out if current revision is different than last revision stored in the savegame.
const GRFIdentifier & GetOverriddenIdentifier(const GRFConfig &c)
Try to find the overridden GRF identifier of the given GRF.
bool GRFBugReverse(GrfID grfid, uint16_t internal_id)
Logs GRF bug - rail vehicle has different length after reversing.
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 PrintConsole()
Print the gamelog data to the console.
void GRFParameters(GrfID 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.
void GRFRemove(GrfID grfid)
Logs removal of a GRF.
void GRFMove(GrfID grfid, int32_t offset)
Logs changing GRF order.
void GRFAddList(const GRFConfigList &newg)
Logs adding of list of GRFs.
~Gamelog()
Needs to be manually defined due to incomplete definition of GamelogInternalData in the header.
void GRFCompatible(const GRFIdentifier &newg)
Logs loading compatible GRF (the same ID, but different MD5 hash).
void Oldver()
Logs loading from savegame without gamelog.
void Emergency()
Logs a emergency savegame.
void TestMode()
Finds last stored game mode or landscape.
void StopAction()
Stops logging of any changes.
void GRFBug(GrfID grfid, ::GRFBug bug, uint64_t data)
Logs triggered GRF bug.
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 GRFAdd(const GRFConfig &newg)
Logs adding of a GRF.
void GRFUpdate(const GRFConfigList &oldg, const GRFConfigList &newg)
Compares two NewGRF lists and logs any change.
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.
Gamelog _gamelog
Gamelog instance.
GamelogChangeType
Type of logged change.
@ GRFCompat
Loading compatible GRF.
@ Revision
Changed game revision string.
@ GRFParam
GRF parameter changed.
@ GRFMove
GRF order changed.
@ Mode
Scenario editor x Game, different landscape.
@ OldVer
Loaded from savegame without logged data.
GamelogActionType
The actions we log.
@ Setting
Setting changed.
@ None
No logging active; in savegames, end of list.
@ Emergency
Emergency savegame.
Functions to find and configure NewGRFs.
GRFBug
Encountered GRF bugs.
Commonly used types for the NewGRF implementation.
uint32_t GrfID
The unique identifier of a NewGRF.
@ Gamelog
Saveload version: 98, SVN revision: 13375 Logging of important actions/situations in the save.
Info about each of the cheats.
Information about GRF, used in the game and (part of it) in savegames.
Basic data to distinguish a GRF.
Container for some internal data.
Contains information about one logged action that caused at least one logged change.
Container for any change that we deem needs to be logged.