1 /* $Id: gamelog_internal.h 18809 2010-01-15 16:41:15Z rubidium $ */
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/>.
10 /** @file gamelog_internal.h Declaration shared among gamelog.cpp and saveload/gamelog_sl.cpp */
12 #ifndef GAMELOG_INTERNAL_H
13 #define GAMELOG_INTERNAL_H
15 #include "network/core/config.h"
18 /** Type of logged change */
19 enum GamelogChangeType
{
20 GLCT_MODE
, ///< Scenario editor x Game, different landscape
21 GLCT_REVISION
, ///< Changed game revision string
22 GLCT_OLDVER
, ///< Loaded from savegame without logged data
23 GLCT_SETTING
, ///< Non-networksafe setting value changed
24 GLCT_GRFADD
, ///< Removed GRF
25 GLCT_GRFREM
, ///< Added GRF
26 GLCT_GRFCOMPAT
, ///< Loading compatible GRF
27 GLCT_GRFPARAM
, ///< GRF parameter changed
28 GLCT_GRFMOVE
, ///< GRF order changed
29 GLCT_GRFBUG
, ///< GRF bug triggered
30 GLCT_EMERGENCY
, ///< Emergency savegame
31 GLCT_END
, ///< So we know how many GLCTs are there
32 GLCT_NONE
= 0xFF, ///< In savegames, end of list
36 /** Contains information about one logged change */
38 GamelogChangeType ct
; ///< Type of change logged in this struct
41 byte mode
; ///< new game mode - Editor x Game
42 byte landscape
; ///< landscape (temperate, arctic, ...)
45 char text
[NETWORK_REVISION_LENGTH
]; ///< revision string, _openttd_revision
46 uint32 newgrf
; ///< _openttd_newgrf_version
47 uint16 slver
; ///< _sl_version
48 byte modified
; ///< _openttd_revision_modified
51 uint32 type
; ///< type of savegame, @see SavegameType
52 uint32 version
; ///< major and minor version OR ttdp version
54 GRFIdentifier grfadd
; ///< ID and md5sum of added GRF
56 uint32 grfid
; ///< ID of removed GRF
58 GRFIdentifier grfcompat
; ///< ID and new md5sum of changed GRF
60 uint32 grfid
; ///< ID of GRF with changed parameters
63 uint32 grfid
; ///< ID of moved GRF
64 int32 offset
; ///< offset, positive = move down
67 char *name
; ///< name of the setting
68 int32 oldval
; ///< old value
69 int32 newval
; ///< new value
72 uint64 data
; ///< additional data
73 uint32 grfid
; ///< ID of problematic GRF
74 byte bug
; ///< type of bug, @see enum GRFBugs
80 /** Contains information about one logged action that caused at least one logged change */
82 LoggedChange
*change
; ///< First logged change in this action
83 uint32 changes
; ///< Number of changes in this action
84 GamelogActionType at
; ///< Type of action
85 uint16 tick
; ///< Tick when it happened
88 extern LoggedAction
*_gamelog_action
;
89 extern uint _gamelog_actions
;
91 #endif /* GAMELOG_INTERNAL_H */