smatz@9457: /* $Id$ */ smatz@9457: smatz@9457: /** @file gamelog.h Functions to be called to log possibly unsafe game events */ smatz@9457: smatz@9457: #ifndef GAMELOG_H smatz@9457: #define GAMELOG_H smatz@9457: smatz@9457: #include "newgrf_config.h" smatz@9457: smatz@9457: enum GamelogActionType { smatz@9457: GLAT_START, ///< Game created smatz@9457: GLAT_LOAD, ///< Game loaded smatz@9457: GLAT_GRF, ///< GRF changed smatz@9457: GLAT_CHEAT, ///< Cheat was used smatz@9457: GLAT_PATCH, ///< Patches setting changed smatz@9704: GLAT_GRFBUG, ///< GRF bug was triggered smatz@9457: GLAT_END, ///< So we know how many GLATs are there smatz@9457: GLAT_NONE = 0xFF, ///< No logging active; in savegames, end of list smatz@9457: }; smatz@9457: smatz@9457: void GamelogStartAction(GamelogActionType at); smatz@9457: void GamelogStopAction(); smatz@9457: smatz@9457: void GamelogReset(); smatz@9457: smatz@9457: typedef void GamelogPrintProc(const char *s); smatz@9457: void GamelogPrint(GamelogPrintProc *proc); // needed for WIN32 / WINCE crash.log smatz@9457: smatz@9655: void GamelogPrintDebug(int level); smatz@9457: void GamelogPrintConsole(); smatz@9457: smatz@9457: void GamelogRevision(); smatz@9457: void GamelogMode(); smatz@9457: void GamelogOldver(); smatz@9457: void GamelogPatch(const char *name, int32 oldval, int32 newval); smatz@9457: smatz@9457: void GamelogGRFUpdate(const GRFConfig *oldg, const GRFConfig *newg); smatz@9457: void GamelogGRFAddList(const GRFConfig *newg); smatz@9457: void GamelogGRFRemove(uint32 grfid); smatz@9457: void GamelogGRFAdd(const GRFConfig *newg); smatz@9457: void GamelogGRFCompatible(const GRFIdentifier *newg); smatz@9457: smatz@9457: void GamelogTestRevision(); smatz@9457: void GamelogTestMode(); smatz@9457: void GamelogTestGRF(); smatz@9457: smatz@9704: bool GamelogGRFBugReverse(uint32 grfid, uint16 internal_id); smatz@9704: smatz@9457: #endif /* GAMELOG_H */