# gamelog.h

Go to the documentation of this file.

    00001 /* $Id$ */
    00002
    00003 /*
    00004  * This file is part of OpenTTD.
    00005  * 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.
    00006  * 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.
    00007  * 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/>.
    00008  */
    00009
    00012 #ifndef GAMELOG_H
    00013 #define GAMELOG_H
    00014
    00015 #include "newgrf_config.h"
    00016
    00018 enum GamelogActionType {
    00019   GLAT_START,
    00020   GLAT_LOAD,
    00021   GLAT_GRF,
    00022   GLAT_CHEAT,
    00023   GLAT_SETTING,
    00024   GLAT_GRFBUG,
    00025   GLAT_EMERGENCY,
    00026   GLAT_END,
    00027   GLAT_NONE  = 0xFF,
    00028 };
    00029
    00030 void GamelogStartAction(GamelogActionType at);
    00031 void GamelogStopAction();
    00032
    00033 void GamelogFree(struct LoggedAction *gamelog_action, uint gamelog_actions);
    00034 void GamelogReset();
    00035
    00040 typedef void GamelogPrintProc(const char *s);
    00041 void GamelogPrint(GamelogPrintProc *proc); // needed for WIN32 / WINCE crash.log
    00042
    00043 void GamelogPrintDebug(int level);
    00044 void GamelogPrintConsole();
    00045
    00046 void GamelogEmergency();
    00047 bool GamelogTestEmergency();
    00048
    00049 void GamelogRevision();
    00050 void GamelogMode();
    00051 void GamelogOldver();
    00052 void GamelogSetting(const char *name, int32 oldval, int32 newval);
    00053
    00054 void GamelogGRFUpdate(const GRFConfig *oldg, const GRFConfig *newg);
    00055 void GamelogGRFAddList(const GRFConfig *newg);
    00056 void GamelogGRFRemove(uint32 grfid);
    00057 void GamelogGRFAdd(const GRFConfig *newg);
    00058 void GamelogGRFCompatible(const GRFIdentifier *newg);
    00059
    00060 void GamelogTestRevision();
    00061 void GamelogTestMode();
    00062
    00063 bool GamelogGRFBugReverse(uint32 grfid, uint16 internal_id);
    00064
    00065 void GamelogInfo(struct LoggedAction *gamelog_action, uint gamelog_actions, uint32 *last_ottd_rev, byte *ever_modified, bool *removed_newgrfs);
    00066
    00067 #endif /* GAMELOG_H */