OpenTTD
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 
31 void GamelogFree(struct LoggedAction *gamelog_action, uint gamelog_actions);
32 void GamelogReset();
33 
38 typedef void GamelogPrintProc(const char *s);
39 void GamelogPrint(GamelogPrintProc *proc); // needed for WIN32 crash.log
40 
41 void GamelogPrintDebug(int level);
42 void GamelogPrintConsole();
43 
44 void GamelogEmergency();
46 
47 void GamelogRevision();
48 void GamelogMode();
49 void GamelogOldver();
50 void GamelogSetting(const char *name, int32 oldval, int32 newval);
51 
52 void GamelogGRFUpdate(const GRFConfig *oldg, const GRFConfig *newg);
53 void GamelogGRFAddList(const GRFConfig *newg);
54 void GamelogGRFRemove(uint32 grfid);
55 void GamelogGRFAdd(const GRFConfig *newg);
56 void GamelogGRFCompatible(const GRFIdentifier *newg);
57 
58 void GamelogTestRevision();
59 void GamelogTestMode();
60 
61 bool GamelogGRFBugReverse(uint32 grfid, uint16 internal_id);
62 
63 void GamelogInfo(struct LoggedAction *gamelog_action, uint gamelog_actions, uint32 *last_ottd_rev, byte *ever_modified, bool *removed_newgrfs);
64 
65 #endif /* GAMELOG_H */
void GamelogFree(struct LoggedAction *gamelog_action, uint gamelog_actions)
Frees the memory allocated by a gamelog.
Definition: gamelog.cpp:93
void GamelogGRFCompatible(const GRFIdentifier *newg)
Logs loading compatible GRF (the same ID, but different MD5 hash)
Definition: gamelog.cpp:630
void GamelogRevision()
Logs a change in game revision.
Definition: gamelog.cpp:433
void GamelogGRFAdd(const GRFConfig *newg)
Logs adding of a GRF.
Definition: gamelog.cpp:613
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:801
void GamelogPrint(GamelogPrintProc *proc)
Prints active gamelog.
Definition: gamelog.cpp:187
void GamelogPrintDebug(int level)
Prints gamelog to debug output.
Definition: gamelog.cpp:364
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:345
bool GamelogGRFBugReverse(uint32 grfid, uint16 internal_id)
Logs GRF bug - rail vehicle has different length after reversing.
Definition: gamelog.cpp:564
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:717
void GamelogReset()
Resets and frees all memory allocated - used before loading or starting a new game.
Definition: gamelog.cpp:110
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:481
Game loaded.
Definition: gamelog.h:18
void GamelogEmergency()
Logs a emergency savegame.
Definition: gamelog.cpp:403
void GamelogMode()
Logs a change in game mode (scenario editor or game)
Definition: gamelog.cpp:450
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:676
void GamelogTestMode()
Finds last stored game mode or landscape.
Definition: gamelog.cpp:521
bool GamelogTestEmergency()
Finds out if current game is a loaded emergency savegame.
Definition: gamelog.cpp:415
void GamelogStopAction()
Stops logging of any changes.
Definition: gamelog.cpp:78
void GamelogOldver()
Logs loading from savegame without gamelog.
Definition: gamelog.cpp:464
void GamelogTestRevision()
Finds out if current revision is different than last revision stored in the savegame.
Definition: gamelog.cpp:498
No logging active; in savegames, end of list.
Definition: gamelog.h:25
void GamelogPrintProc(const char *s)
Callback for printing text.
Definition: gamelog.h:38
void GamelogGRFRemove(uint32 grfid)
Logs removal of a GRF.
Definition: gamelog.cpp:599