diff options
author | rubidium <rubidium@openttd.org> | 2009-07-24 19:09:48 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2009-07-24 19:09:48 +0000 |
commit | 7a24fba918f924df87f4fbc9bb304068d6b71faa (patch) | |
tree | 903451da8b1b290ab6065b198eb605d2c357bc6e /src/saveload/saveload.h | |
parent | d11ec2d1afb4bf542b1caf196379d83934d97d39 (diff) | |
download | openttd-7a24fba918f924df87f4fbc9bb304068d6b71faa.tar.xz |
(svn r16944) -Codechange: remove needlessly complex way of getting the offset of items within a struct that are within a struct
Diffstat (limited to 'src/saveload/saveload.h')
-rw-r--r-- | src/saveload/saveload.h | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/src/saveload/saveload.h b/src/saveload/saveload.h index 25e1e35b6..f4b240ba5 100644 --- a/src/saveload/saveload.h +++ b/src/saveload/saveload.h @@ -225,18 +225,8 @@ typedef SaveLoad SaveLoadGlobVarList; /* Translate values ingame to different values in the savegame and vv */ #define SLE_WRITEBYTE(base, variable, value) SLE_GENERAL(SL_WRITEBYTE, base, variable, 0, 0, value, value) -/* The same as the ones at the top, only the offset is given directly; used for unions */ -#define SLE_GENERALX(cmd, offset, type, length, param1, param2) {false, cmd, type, length, param1, param2, (void*)(offset)} -#define SLE_CONDVARX(offset, type, from, to) SLE_GENERALX(SL_VAR, offset, type, 0, from, to) -#define SLE_CONDARRX(offset, type, length, from, to) SLE_GENERALX(SL_ARR, offset, type, length, from, to) -#define SLE_CONDREFX(offset, type, from, to) SLE_GENERALX(SL_REF, offset, type, 0, from, to) - -#define SLE_VARX(offset, type) SLE_CONDVARX(offset, type, 0, SL_MAX_VERSION) -#define SLE_REFX(offset, type) SLE_CONDREFX(offset, type, 0, SL_MAX_VERSION) - -#define SLE_WRITEBYTEX(offset, something) SLE_GENERALX(SL_WRITEBYTE, offset, 0, 0, something, 0) -#define SLE_VEH_INCLUDEX() SLE_GENERALX(SL_VEH_INCLUDE, 0, 0, 0, 0, SL_MAX_VERSION) -#define SLE_ST_INCLUDEX() SLE_GENERALX(SL_ST_INCLUDE, 0, 0, 0, 0, SL_MAX_VERSION) +#define SLE_VEH_INCLUDE() {false, SL_VEH_INCLUDE, 0, 0, 0, SL_MAX_VERSION, NULL} +#define SLE_ST_INCLUDE() {false, SL_ST_INCLUDE, 0, 0, 0, SL_MAX_VERSION, NULL} /* End marker */ #define SLE_END() {false, SL_END, 0, 0, 0, 0, NULL} |