OpenTTD: src/gamelog_internal.h Source File

OpenTTD

- Main Page
- Related Pages
- Modules
- Namespaces
- Data Structures
- Files

- File List
- Globals

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
19 enum GamelogChangeType {
20 GLCT_MODE,
21 GLCT_REVISION,
22 GLCT_OLDVER,
23 GLCT_SETTING,
24 GLCT_GRFADD,
25 GLCT_GRFREM,
26 GLCT_GRFCOMPAT,
27 GLCT_GRFPARAM,
28 GLCT_GRFMOVE,
29 GLCT_GRFBUG,
30 GLCT_EMERGENCY,
31 GLCT_END,
32 GLCT_NONE = 0xFF,
33 };
34
35
37 struct LoggedChange {
38 GamelogChangeType ct;
39 union {
40 struct {
41 byte mode;
42 byte landscape;
43 } mode;
44 struct {
45 char text[NETWORK_REVISION_LENGTH];
46 uint32 newgrf;
47 uint16 slver;
48 byte modified;
49 } revision;
50 struct {
51 uint32 type;
52 uint32 version;
53 } oldver;
54 GRFIdentifier grfadd;
55 struct {
56 uint32 grfid;
57 } grfrem;
58 GRFIdentifier grfcompat;
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 {
82 LoggedChange *change;
83 uint32 changes;
84 GamelogActionType at;
85 uint16 tick;
86 };
87
88 extern LoggedAction *_gamelog_action;
89 extern uint _gamelog_actions;
90
91 #endif /* GAMELOG_INTERNAL_H */