OpenTTD
gamelog_internal.h
Go to the documentation of this file.
1 /* $Id: gamelog_internal.h 18809 2010-01-15 16:41:15Z rubidium $ */
2 
3 /*
4  * This file is part of OpenTTD.
5  * 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.
6  * 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.
7  * 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/>.
8  */
9 
12 #ifndef GAMELOG_INTERNAL_H
13 #define GAMELOG_INTERNAL_H
14 
15 #include "network/core/config.h"
16 #include "gamelog.h"
17 
32  GLCT_NONE = 0xFF,
33 };
34 
35 
37 struct LoggedChange {
39  union {
40  struct {
41  byte mode;
42  byte landscape;
43  } mode;
44  struct {
46  uint32 newgrf;
47  uint16 slver;
48  byte modified;
49  } revision;
50  struct {
51  uint32 type;
52  uint32 version;
53  } oldver;
55  struct {
56  uint32 grfid;
57  } grfrem;
59  struct {
60  uint32 grfid;
61  } grfparam;
62  struct {
63  uint32 grfid;
64  int32 offset;
65  } grfmove;
66  struct {
67  char *name;
68  int32 oldval;
69  int32 newval;
70  } setting;
71  struct {
72  uint64 data;
73  uint32 grfid;
74  byte bug;
75  } grfbug;
76  };
77 };
78 
79 
81 struct LoggedAction {
83  uint32 changes;
85  uint16 tick;
86 };
87 
89 extern uint _gamelog_actions;
90 
91 #endif /* GAMELOG_INTERNAL_H */
byte bug
type of bug,
GRF bug triggered.
byte modified
_openttd_revision_modified
Loaded from savegame without logged data.
GamelogChangeType ct
Type of change logged in this struct.
Functions to be called to log possibly unsafe game events.
In savegames, end of list.
uint32 changes
Number of changes in this action.
uint32 grfid
ID of removed GRF.
So we know how many GLCTs are there.
GRF parameter changed.
Removed GRF.
Configuration options of the network stuff.
Loading compatible GRF.
Non-networksafe setting value changed.
GRFIdentifier grfcompat
ID and new md5sum of changed GRF.
Basic data to distinguish a GRF.
Definition: newgrf_config.h:84
GamelogActionType
The actions we log.
Definition: gamelog.h:18
GRFIdentifier grfadd
ID and md5sum of added GRF.
int32 newval
new value
uint32 newgrf
_openttd_newgrf_version
uint32 type
type of savegame,
Contains information about one logged action that caused at least one logged change.
Added GRF.
LoggedAction * _gamelog_action
first logged action
Definition: gamelog.cpp:37
char text[NETWORK_REVISION_LENGTH]
revision string, _openttd_revision
byte mode
new game mode - Editor x Game
uint32 version
major and minor version OR ttdp version
Emergency savegame.
uint16 tick
Tick when it happened.
Scenario editor x Game, different landscape.
Changed game revision string.
char * name
name of the setting
int32 oldval
old value
GamelogActionType at
Type of action.
GamelogChangeType
Type of logged change.
LoggedChange * change
First logged change in this action.
uint _gamelog_actions
number of actions
Definition: gamelog.cpp:38
Contains information about one logged change.
uint16 slver
_sl_version
byte landscape
landscape (temperate, arctic, ...)
int32 offset
offset, positive = move down
uint64 data
additional data
static const uint NETWORK_REVISION_LENGTH
The maximum length of the revision, in bytes including &#39;\0&#39;.
Definition: config.h:46
GRF order changed.