(svn r25652) -Fix: Improve text caret movement for complex scripts.
[openttd/fttd.git] / src / gamelog.h
blob7f5b6a776507277b86b89bdb8ca3e52386f0c73c
1 /* $Id$ */
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 */
10 /** @file gamelog.h Functions to be called to log possibly unsafe game events */
12 #ifndef GAMELOG_H
13 #define GAMELOG_H
15 #include "newgrf_config.h"
17 /** The actions we log. */
18 enum GamelogActionType {
19 GLAT_START, ///< Game created
20 GLAT_LOAD, ///< Game loaded
21 GLAT_GRF, ///< GRF changed
22 GLAT_CHEAT, ///< Cheat was used
23 GLAT_SETTING, ///< Setting changed
24 GLAT_GRFBUG, ///< GRF bug was triggered
25 GLAT_EMERGENCY, ///< Emergency savegame
26 GLAT_END, ///< So we know how many GLATs are there
27 GLAT_NONE = 0xFF, ///< No logging active; in savegames, end of list
30 void GamelogStartAction(GamelogActionType at);
31 void GamelogStopAction();
33 void GamelogFree(struct LoggedAction *gamelog_action, uint gamelog_actions);
34 void GamelogReset();
36 /**
37 * Callback for printing text.
38 * @param s The string to print.
40 typedef void GamelogPrintProc(const char *s);
41 void GamelogPrint(GamelogPrintProc *proc); // needed for WIN32 / WINCE crash.log
43 void GamelogPrintDebug(int level);
44 void GamelogPrintConsole();
46 void GamelogEmergency();
47 bool GamelogTestEmergency();
49 void GamelogRevision();
50 void GamelogMode();
51 void GamelogOldver();
52 void GamelogSetting(const char *name, int32 oldval, int32 newval);
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);
60 void GamelogTestRevision();
61 void GamelogTestMode();
63 bool GamelogGRFBugReverse(uint32 grfid, uint16 internal_id);
65 void GamelogInfo(struct LoggedAction *gamelog_action, uint gamelog_actions, uint32 *last_ottd_rev, byte *ever_modified, bool *removed_newgrfs);
67 #endif /* GAMELOG_H */