gamelog_internal.h
Go to the documentation of this file.00001
00002
00005 #ifndef GAMELOG_INTERNAL_H
00006 #define GAMELOG_INTERNAL_H
00007
00008 #include "network/core/config.h"
00009
00011 enum GamelogChangeType {
00012 GLCT_MODE,
00013 GLCT_REVISION,
00014 GLCT_OLDVER,
00015 GLCT_SETTING,
00016 GLCT_GRFADD,
00017 GLCT_GRFREM,
00018 GLCT_GRFCOMPAT,
00019 GLCT_GRFPARAM,
00020 GLCT_GRFMOVE,
00021 GLCT_GRFBUG,
00022 GLCT_END,
00023 GLCT_NONE = 0xFF,
00024 };
00025
00026
00028 struct LoggedChange {
00029 GamelogChangeType ct;
00030 union {
00031 struct {
00032 byte mode;
00033 byte landscape;
00034 } mode;
00035 struct {
00036 char text[NETWORK_REVISION_LENGTH];
00037 uint32 newgrf;
00038 uint16 slver;
00039 byte modified;
00040 } revision;
00041 struct {
00042 uint32 type;
00043 uint32 version;
00044 } oldver;
00045 GRFIdentifier grfadd;
00046 struct {
00047 uint32 grfid;
00048 } grfrem;
00049 GRFIdentifier grfcompat;
00050 struct {
00051 uint32 grfid;
00052 } grfparam;
00053 struct {
00054 uint32 grfid;
00055 int32 offset;
00056 } grfmove;
00057 struct {
00058 char *name;
00059 int32 oldval;
00060 int32 newval;
00061 } setting;
00062 struct {
00063 uint64 data;
00064 uint32 grfid;
00065 byte bug;
00066 } grfbug;
00067 };
00068 };
00069
00070
00072 struct LoggedAction {
00073 LoggedChange *change;
00074 uint32 changes;
00075 GamelogActionType at;
00076 uint16 tick;
00077 };
00078
00079 extern LoggedAction *_gamelog_action;
00080 extern uint _gamelog_actions;
00081
00082 #endif