OpenTTD Source  1.10.2
gamelog.h
Go to the documentation of this file.
1 /*
2  * This file is part of OpenTTD.
3  * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
4  * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
5  * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
6  */
7 
10 #ifndef GAMELOG_H
11 #define GAMELOG_H
12 
13 #include "newgrf_config.h"
14 
25  GLAT_NONE = 0xFF,
26 };
27 
29 void GamelogStopAction();
30 void GamelogStopAnyAction();
31 
32 void GamelogFree(struct LoggedAction *gamelog_action, uint gamelog_actions);
33 void GamelogReset();
34 
39 typedef void GamelogPrintProc(const char *s);
40 void GamelogPrint(GamelogPrintProc *proc); // needed for WIN32 crash.log
41 
42 void GamelogPrintDebug(int level);
43 void GamelogPrintConsole();
44 
45 void GamelogEmergency();
47 
48 void GamelogRevision();
49 void GamelogMode();
50 void GamelogOldver();
51 void GamelogSetting(const char *name, int32 oldval, int32 newval);
52 
53 void GamelogGRFUpdate(const GRFConfig *oldg, const GRFConfig *newg);
54 void GamelogGRFAddList(const GRFConfig *newg);
55 void GamelogGRFRemove(uint32 grfid);
56 void GamelogGRFAdd(const GRFConfig *newg);
57 void GamelogGRFCompatible(const GRFIdentifier *newg);
58 
59 void GamelogTestRevision();
60 void GamelogTestMode();
61 
62 bool GamelogGRFBugReverse(uint32 grfid, uint16 internal_id);
63 
64 void GamelogInfo(struct LoggedAction *gamelog_action, uint gamelog_actions, uint32 *last_ottd_rev, byte *ever_modified, bool *removed_newgrfs);
65 
66 #endif /* GAMELOG_H */
void GamelogFree(struct LoggedAction *gamelog_action, uint gamelog_actions)
Frees the memory allocated by a gamelog.
Definition: gamelog.cpp:98
void GamelogGRFCompatible(const GRFIdentifier *newg)
Logs loading compatible GRF (the same ID, but different MD5 hash)
Definition: gamelog.cpp:635
void GamelogRevision()
Logs a change in game revision.
Definition: gamelog.cpp:438
void GamelogGRFAdd(const GRFConfig *newg)
Logs adding of a GRF.
Definition: gamelog.cpp:618
void GamelogInfo(struct LoggedAction *gamelog_action, uint gamelog_actions, uint32 *last_ottd_rev, byte *ever_modified, bool *removed_newgrfs)
Get some basic information from the given gamelog.
Definition: gamelog.cpp:806
void GamelogPrint(GamelogPrintProc *proc)
Prints active gamelog.
Definition: gamelog.cpp:192
void GamelogPrintDebug(int level)
Prints gamelog to debug output.
Definition: gamelog.cpp:369
void GamelogStartAction(GamelogActionType at)
Stores information about new action, but doesn&#39;t allocate it Action is allocated only when there is a...
Definition: gamelog.cpp:69
void GamelogPrintConsole()
Print the gamelog data to the console.
Definition: gamelog.cpp:350
bool GamelogGRFBugReverse(uint32 grfid, uint16 internal_id)
Logs GRF bug - rail vehicle has different length after reversing.
Definition: gamelog.cpp:569
Basic data to distinguish a GRF.
Definition: newgrf_config.h:82
Cheat was used.
Definition: gamelog.h:20
GamelogActionType
The actions we log.
Definition: gamelog.h:16
GRF bug was triggered.
Definition: gamelog.h:22
Game created.
Definition: gamelog.h:17
void GamelogGRFUpdate(const GRFConfig *oldg, const GRFConfig *newg)
Compares two NewGRF lists and logs any change.
Definition: gamelog.cpp:722
void GamelogReset()
Resets and frees all memory allocated - used before loading or starting a new game.
Definition: gamelog.cpp:115
Contains information about one logged action that caused at least one logged change.
Information about GRF, used in the game and (part of it) in savegames.
void GamelogSetting(const char *name, int32 oldval, int32 newval)
Logs change in game settings.
Definition: gamelog.cpp:486
Game loaded.
Definition: gamelog.h:18
void GamelogEmergency()
Logs a emergency savegame.
Definition: gamelog.cpp:408
void GamelogMode()
Logs a change in game mode (scenario editor or game)
Definition: gamelog.cpp:455
So we know how many GLATs are there.
Definition: gamelog.h:24
Emergency savegame.
Definition: gamelog.h:23
Functions to find and configure NewGRFs.
GRF changed.
Definition: gamelog.h:19
Setting changed.
Definition: gamelog.h:21
void GamelogGRFAddList(const GRFConfig *newg)
Logs adding of list of GRFs.
Definition: gamelog.cpp:681
void GamelogTestMode()
Finds last stored game mode or landscape.
Definition: gamelog.cpp:526
bool GamelogTestEmergency()
Finds out if current game is a loaded emergency savegame.
Definition: gamelog.cpp:420
void GamelogStopAction()
Stops logging of any changes.
Definition: gamelog.cpp:78
void GamelogOldver()
Logs loading from savegame without gamelog.
Definition: gamelog.cpp:469
void GamelogTestRevision()
Finds out if current revision is different than last revision stored in the savegame.
Definition: gamelog.cpp:503
No logging active; in savegames, end of list.
Definition: gamelog.h:25
void GamelogPrintProc(const char *s)
Callback for printing text.
Definition: gamelog.h:39
void GamelogGRFRemove(uint32 grfid)
Logs removal of a GRF.
Definition: gamelog.cpp:604