OpenTTD
gamelog.h
Go to the documentation of this file.
1 /* $Id: gamelog.h 23901 2012-02-05 15:51:13Z smatz $ */
2 
3 /*
4  * This file is part of OpenTTD.
5  * 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.
6  * 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.
7  * 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/>.
8  */
9 
12 #ifndef GAMELOG_H
13 #define GAMELOG_H
14 
15 #include "newgrf_config.h"
16 
27  GLAT_NONE = 0xFF,
28 };
29 
31 void GamelogStopAction();
32 
33 void GamelogFree(struct LoggedAction *gamelog_action, uint gamelog_actions);
34 void GamelogReset();
35 
40 typedef void GamelogPrintProc(const char *s);
41 void GamelogPrint(GamelogPrintProc *proc); // needed for WIN32 / WINCE crash.log
42 
43 void GamelogPrintDebug(int level);
44 void GamelogPrintConsole();
45 
46 void GamelogEmergency();
48 
49 void GamelogRevision();
50 void GamelogMode();
51 void GamelogOldver();
52 void GamelogSetting(const char *name, int32 oldval, int32 newval);
53 
54 void GamelogGRFUpdate(const GRFConfig *oldg, const GRFConfig *newg);
55 void GamelogGRFAddList(const GRFConfig *newg);
56 void GamelogGRFRemove(uint32 grfid);
57 void GamelogGRFAdd(const GRFConfig *newg);
58 void GamelogGRFCompatible(const GRFIdentifier *newg);
59 
60 void GamelogTestRevision();
61 void GamelogTestMode();
62 
63 bool GamelogGRFBugReverse(uint32 grfid, uint16 internal_id);
64 
65 void GamelogInfo(struct LoggedAction *gamelog_action, uint gamelog_actions, uint32 *last_ottd_rev, byte *ever_modified, bool *removed_newgrfs);
66 
67 #endif /* GAMELOG_H */
void GamelogFree(struct LoggedAction *gamelog_action, uint gamelog_actions)
Frees the memory allocated by a gamelog.
Definition: gamelog.cpp:71
void GamelogGRFCompatible(const GRFIdentifier *newg)
Logs loading compatible GRF (the same ID, but different MD5 hash)
Definition: gamelog.cpp:607
void GamelogRevision()
Logs a change in game revision.
Definition: gamelog.cpp:410
void GamelogGRFAdd(const GRFConfig *newg)
Logs adding of a GRF.
Definition: gamelog.cpp:590
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:778
void GamelogPrint(GamelogPrintProc *proc)
Prints active gamelog.
Definition: gamelog.cpp:164
void GamelogPrintDebug(int level)
Prints gamelog to debug output.
Definition: gamelog.cpp:341
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:47
void GamelogPrintConsole()
Print the gamelog data to the console.
Definition: gamelog.cpp:322
bool GamelogGRFBugReverse(uint32 grfid, uint16 internal_id)
Logs GRF bug - rail vehicle has different length after reversing.
Definition: gamelog.cpp:541
Basic data to distinguish a GRF.
Definition: newgrf_config.h:84
Cheat was used.
Definition: gamelog.h:22
GamelogActionType
The actions we log.
Definition: gamelog.h:18
GRF bug was triggered.
Definition: gamelog.h:24
Game created.
Definition: gamelog.h:19
void GamelogGRFUpdate(const GRFConfig *oldg, const GRFConfig *newg)
Compares two NewGRF lists and logs any change.
Definition: gamelog.cpp:694
void GamelogReset()
Resets and frees all memory allocated - used before loading or starting a new game.
Definition: gamelog.cpp:88
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:458
Game loaded.
Definition: gamelog.h:20
void GamelogEmergency()
Logs a emergency savegame.
Definition: gamelog.cpp:380
void GamelogMode()
Logs a change in game mode (scenario editor or game)
Definition: gamelog.cpp:427
So we know how many GLATs are there.
Definition: gamelog.h:26
Emergency savegame.
Definition: gamelog.h:25
Functions to find and configure NewGRFs.
GRF changed.
Definition: gamelog.h:21
Setting changed.
Definition: gamelog.h:23
void GamelogGRFAddList(const GRFConfig *newg)
Logs adding of list of GRFs.
Definition: gamelog.cpp:653
void GamelogTestMode()
Finds last stored game mode or landscape.
Definition: gamelog.cpp:498
bool GamelogTestEmergency()
Finds out if current game is a loaded emergency savegame.
Definition: gamelog.cpp:392
void GamelogStopAction()
Stops logging of any changes.
Definition: gamelog.cpp:56
void GamelogOldver()
Logs loading from savegame without gamelog.
Definition: gamelog.cpp:441
void GamelogTestRevision()
Finds out if current revision is different than last revision stored in the savegame.
Definition: gamelog.cpp:475
No logging active; in savegames, end of list.
Definition: gamelog.h:27
void GamelogPrintProc(const char *s)
Callback for printing text.
Definition: gamelog.h:40
void GamelogGRFRemove(uint32 grfid)
Logs removal of a GRF.
Definition: gamelog.cpp:576