src/gamelog.h
author Tero Marttila <terom@fixme.fi>
Tue, 22 Jul 2008 23:20:33 +0300
changeset 11184 88c967f1422b
parent 11169 60cbac6bc442
permissions -rw-r--r--
add an empty bin/cache dir
10824
1a34ba6f338a (svn r13375) -Add: logging of actions that could possibly cause desyncs and crashes to simplify debugging. See readme.txt for details
smatz
parents:
diff changeset
     1
/* $Id$ */
1a34ba6f338a (svn r13375) -Add: logging of actions that could possibly cause desyncs and crashes to simplify debugging. See readme.txt for details
smatz
parents:
diff changeset
     2
1a34ba6f338a (svn r13375) -Add: logging of actions that could possibly cause desyncs and crashes to simplify debugging. See readme.txt for details
smatz
parents:
diff changeset
     3
/** @file gamelog.h Functions to be called to log possibly unsafe game events */
1a34ba6f338a (svn r13375) -Add: logging of actions that could possibly cause desyncs and crashes to simplify debugging. See readme.txt for details
smatz
parents:
diff changeset
     4
1a34ba6f338a (svn r13375) -Add: logging of actions that could possibly cause desyncs and crashes to simplify debugging. See readme.txt for details
smatz
parents:
diff changeset
     5
#ifndef GAMELOG_H
1a34ba6f338a (svn r13375) -Add: logging of actions that could possibly cause desyncs and crashes to simplify debugging. See readme.txt for details
smatz
parents:
diff changeset
     6
#define GAMELOG_H
1a34ba6f338a (svn r13375) -Add: logging of actions that could possibly cause desyncs and crashes to simplify debugging. See readme.txt for details
smatz
parents:
diff changeset
     7
1a34ba6f338a (svn r13375) -Add: logging of actions that could possibly cause desyncs and crashes to simplify debugging. See readme.txt for details
smatz
parents:
diff changeset
     8
#include "newgrf_config.h"
1a34ba6f338a (svn r13375) -Add: logging of actions that could possibly cause desyncs and crashes to simplify debugging. See readme.txt for details
smatz
parents:
diff changeset
     9
1a34ba6f338a (svn r13375) -Add: logging of actions that could possibly cause desyncs and crashes to simplify debugging. See readme.txt for details
smatz
parents:
diff changeset
    10
enum GamelogActionType {
1a34ba6f338a (svn r13375) -Add: logging of actions that could possibly cause desyncs and crashes to simplify debugging. See readme.txt for details
smatz
parents:
diff changeset
    11
	GLAT_START,        ///< Game created
1a34ba6f338a (svn r13375) -Add: logging of actions that could possibly cause desyncs and crashes to simplify debugging. See readme.txt for details
smatz
parents:
diff changeset
    12
	GLAT_LOAD,         ///< Game loaded
1a34ba6f338a (svn r13375) -Add: logging of actions that could possibly cause desyncs and crashes to simplify debugging. See readme.txt for details
smatz
parents:
diff changeset
    13
	GLAT_GRF,          ///< GRF changed
1a34ba6f338a (svn r13375) -Add: logging of actions that could possibly cause desyncs and crashes to simplify debugging. See readme.txt for details
smatz
parents:
diff changeset
    14
	GLAT_CHEAT,        ///< Cheat was used
1a34ba6f338a (svn r13375) -Add: logging of actions that could possibly cause desyncs and crashes to simplify debugging. See readme.txt for details
smatz
parents:
diff changeset
    15
	GLAT_PATCH,        ///< Patches setting changed
1a34ba6f338a (svn r13375) -Add: logging of actions that could possibly cause desyncs and crashes to simplify debugging. See readme.txt for details
smatz
parents:
diff changeset
    16
	GLAT_END,          ///< So we know how many GLATs are there
1a34ba6f338a (svn r13375) -Add: logging of actions that could possibly cause desyncs and crashes to simplify debugging. See readme.txt for details
smatz
parents:
diff changeset
    17
	GLAT_NONE  = 0xFF, ///< No logging active; in savegames, end of list
1a34ba6f338a (svn r13375) -Add: logging of actions that could possibly cause desyncs and crashes to simplify debugging. See readme.txt for details
smatz
parents:
diff changeset
    18
};
1a34ba6f338a (svn r13375) -Add: logging of actions that could possibly cause desyncs and crashes to simplify debugging. See readme.txt for details
smatz
parents:
diff changeset
    19
1a34ba6f338a (svn r13375) -Add: logging of actions that could possibly cause desyncs and crashes to simplify debugging. See readme.txt for details
smatz
parents:
diff changeset
    20
void GamelogStartAction(GamelogActionType at);
1a34ba6f338a (svn r13375) -Add: logging of actions that could possibly cause desyncs and crashes to simplify debugging. See readme.txt for details
smatz
parents:
diff changeset
    21
void GamelogStopAction();
1a34ba6f338a (svn r13375) -Add: logging of actions that could possibly cause desyncs and crashes to simplify debugging. See readme.txt for details
smatz
parents:
diff changeset
    22
1a34ba6f338a (svn r13375) -Add: logging of actions that could possibly cause desyncs and crashes to simplify debugging. See readme.txt for details
smatz
parents:
diff changeset
    23
void GamelogReset();
1a34ba6f338a (svn r13375) -Add: logging of actions that could possibly cause desyncs and crashes to simplify debugging. See readme.txt for details
smatz
parents:
diff changeset
    24
1a34ba6f338a (svn r13375) -Add: logging of actions that could possibly cause desyncs and crashes to simplify debugging. See readme.txt for details
smatz
parents:
diff changeset
    25
typedef void GamelogPrintProc(const char *s);
1a34ba6f338a (svn r13375) -Add: logging of actions that could possibly cause desyncs and crashes to simplify debugging. See readme.txt for details
smatz
parents:
diff changeset
    26
void GamelogPrint(GamelogPrintProc *proc); // needed for WIN32 / WINCE crash.log
1a34ba6f338a (svn r13375) -Add: logging of actions that could possibly cause desyncs and crashes to simplify debugging. See readme.txt for details
smatz
parents:
diff changeset
    27
11169
60cbac6bc442 (svn r13727) -Fix (r13375): compilation with NO_DEBUG_MESSAGES was broken
smatz
parents: 10824
diff changeset
    28
void GamelogPrintDebug(int level);
10824
1a34ba6f338a (svn r13375) -Add: logging of actions that could possibly cause desyncs and crashes to simplify debugging. See readme.txt for details
smatz
parents:
diff changeset
    29
void GamelogPrintConsole();
1a34ba6f338a (svn r13375) -Add: logging of actions that could possibly cause desyncs and crashes to simplify debugging. See readme.txt for details
smatz
parents:
diff changeset
    30
1a34ba6f338a (svn r13375) -Add: logging of actions that could possibly cause desyncs and crashes to simplify debugging. See readme.txt for details
smatz
parents:
diff changeset
    31
void GamelogRevision();
1a34ba6f338a (svn r13375) -Add: logging of actions that could possibly cause desyncs and crashes to simplify debugging. See readme.txt for details
smatz
parents:
diff changeset
    32
void GamelogMode();
1a34ba6f338a (svn r13375) -Add: logging of actions that could possibly cause desyncs and crashes to simplify debugging. See readme.txt for details
smatz
parents:
diff changeset
    33
void GamelogOldver();
1a34ba6f338a (svn r13375) -Add: logging of actions that could possibly cause desyncs and crashes to simplify debugging. See readme.txt for details
smatz
parents:
diff changeset
    34
void GamelogPatch(const char *name, int32 oldval, int32 newval);
1a34ba6f338a (svn r13375) -Add: logging of actions that could possibly cause desyncs and crashes to simplify debugging. See readme.txt for details
smatz
parents:
diff changeset
    35
1a34ba6f338a (svn r13375) -Add: logging of actions that could possibly cause desyncs and crashes to simplify debugging. See readme.txt for details
smatz
parents:
diff changeset
    36
void GamelogGRFUpdate(const GRFConfig *oldg, const GRFConfig *newg);
1a34ba6f338a (svn r13375) -Add: logging of actions that could possibly cause desyncs and crashes to simplify debugging. See readme.txt for details
smatz
parents:
diff changeset
    37
void GamelogGRFAddList(const GRFConfig *newg);
1a34ba6f338a (svn r13375) -Add: logging of actions that could possibly cause desyncs and crashes to simplify debugging. See readme.txt for details
smatz
parents:
diff changeset
    38
void GamelogGRFRemove(uint32 grfid);
1a34ba6f338a (svn r13375) -Add: logging of actions that could possibly cause desyncs and crashes to simplify debugging. See readme.txt for details
smatz
parents:
diff changeset
    39
void GamelogGRFAdd(const GRFConfig *newg);
1a34ba6f338a (svn r13375) -Add: logging of actions that could possibly cause desyncs and crashes to simplify debugging. See readme.txt for details
smatz
parents:
diff changeset
    40
void GamelogGRFCompatible(const GRFIdentifier *newg);
1a34ba6f338a (svn r13375) -Add: logging of actions that could possibly cause desyncs and crashes to simplify debugging. See readme.txt for details
smatz
parents:
diff changeset
    41
1a34ba6f338a (svn r13375) -Add: logging of actions that could possibly cause desyncs and crashes to simplify debugging. See readme.txt for details
smatz
parents:
diff changeset
    42
void GamelogTestRevision();
1a34ba6f338a (svn r13375) -Add: logging of actions that could possibly cause desyncs and crashes to simplify debugging. See readme.txt for details
smatz
parents:
diff changeset
    43
void GamelogTestMode();
1a34ba6f338a (svn r13375) -Add: logging of actions that could possibly cause desyncs and crashes to simplify debugging. See readme.txt for details
smatz
parents:
diff changeset
    44
void GamelogTestGRF();
1a34ba6f338a (svn r13375) -Add: logging of actions that could possibly cause desyncs and crashes to simplify debugging. See readme.txt for details
smatz
parents:
diff changeset
    45
1a34ba6f338a (svn r13375) -Add: logging of actions that could possibly cause desyncs and crashes to simplify debugging. See readme.txt for details
smatz
parents:
diff changeset
    46
#endif /* GAMELOG_H */