diff options
author | smatz <smatz@openttd.org> | 2008-06-03 18:35:58 +0000 |
---|---|---|
committer | smatz <smatz@openttd.org> | 2008-06-03 18:35:58 +0000 |
commit | c7a9637834a96722be5a524c4c1e8932a45e3461 (patch) | |
tree | 72b7d141fd63dcb880f610a334390bf9c41f97b1 /src/gamelog.h | |
parent | d58f0558761079552c4c607707dd131a2c5e5397 (diff) | |
download | openttd-c7a9637834a96722be5a524c4c1e8932a45e3461.tar.xz |
(svn r13375) -Add: logging of actions that could possibly cause desyncs and crashes to simplify debugging. See readme.txt for details
Diffstat (limited to 'src/gamelog.h')
-rw-r--r-- | src/gamelog.h | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/src/gamelog.h b/src/gamelog.h new file mode 100644 index 000000000..418ec1ee4 --- /dev/null +++ b/src/gamelog.h @@ -0,0 +1,46 @@ +/* $Id$ */ + +/** @file gamelog.h Functions to be called to log possibly unsafe game events */ + +#ifndef GAMELOG_H +#define GAMELOG_H + +#include "newgrf_config.h" + +enum GamelogActionType { + GLAT_START, ///< Game created + GLAT_LOAD, ///< Game loaded + GLAT_GRF, ///< GRF changed + GLAT_CHEAT, ///< Cheat was used + GLAT_PATCH, ///< Patches setting changed + GLAT_END, ///< So we know how many GLATs are there + GLAT_NONE = 0xFF, ///< No logging active; in savegames, end of list +}; + +void GamelogStartAction(GamelogActionType at); +void GamelogStopAction(); + +void GamelogReset(); + +typedef void GamelogPrintProc(const char *s); +void GamelogPrint(GamelogPrintProc *proc); // needed for WIN32 / WINCE crash.log + +void GamelogPrintDebug(); +void GamelogPrintConsole(); + +void GamelogRevision(); +void GamelogMode(); +void GamelogOldver(); +void GamelogPatch(const char *name, int32 oldval, int32 newval); + +void GamelogGRFUpdate(const GRFConfig *oldg, const GRFConfig *newg); +void GamelogGRFAddList(const GRFConfig *newg); +void GamelogGRFRemove(uint32 grfid); +void GamelogGRFAdd(const GRFConfig *newg); +void GamelogGRFCompatible(const GRFIdentifier *newg); + +void GamelogTestRevision(); +void GamelogTestMode(); +void GamelogTestGRF(); + +#endif /* GAMELOG_H */ |