Fix #9521: Don't load at just removed docks that were part of a multi-dock station...
[openttd-github.git] / src / gamelog.h
blobcfa6c626a2713ac7af2215993f53b4496db5c158
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 */
8 /** @file gamelog.h Functions to be called to log possibly unsafe game events */
10 #ifndef GAMELOG_H
11 #define GAMELOG_H
13 #include "newgrf_config.h"
15 /** The actions we log. */
16 enum GamelogActionType : uint8 {
17 GLAT_START, ///< Game created
18 GLAT_LOAD, ///< Game loaded
19 GLAT_GRF, ///< GRF changed
20 GLAT_CHEAT, ///< Cheat was used
21 GLAT_SETTING, ///< Setting changed
22 GLAT_GRFBUG, ///< GRF bug was triggered
23 GLAT_EMERGENCY, ///< Emergency savegame
24 GLAT_END, ///< So we know how many GLATs are there
25 GLAT_NONE = 0xFF, ///< No logging active; in savegames, end of list
28 void GamelogStartAction(GamelogActionType at);
29 void GamelogStopAction();
30 void GamelogStopAnyAction();
32 void GamelogFree(struct LoggedAction *gamelog_action, uint gamelog_actions);
33 void GamelogReset();
35 /**
36 * Callback for printing text.
37 * @param s The string to print.
39 typedef void GamelogPrintProc(const char *s);
40 void GamelogPrint(GamelogPrintProc *proc); // needed for WIN32 crash.log
42 void GamelogPrintDebug(int level);
43 void GamelogPrintConsole();
45 void GamelogEmergency();
46 bool GamelogTestEmergency();
48 void GamelogRevision();
49 void GamelogMode();
50 void GamelogOldver();
51 void GamelogSetting(const std::string &name, int32 oldval, int32 newval);
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);
59 void GamelogTestRevision();
60 void GamelogTestMode();
62 bool GamelogGRFBugReverse(uint32 grfid, uint16 internal_id);
64 void GamelogInfo(struct LoggedAction *gamelog_action, uint gamelog_actions, uint32 *last_ottd_rev, byte *ever_modified, bool *removed_newgrfs);
66 #endif /* GAMELOG_H */