summaryrefslogtreecommitdiff
path: root/src/saveload
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2011-03-05 11:16:44 +0000
committerrubidium <rubidium@openttd.org>2011-03-05 11:16:44 +0000
commite48967541a8ce602267f80d295bcb4fe89ca70fb (patch)
tree4e3475e4a57297a7850beadc4c8f1f325f750268 /src/saveload
parent2636a4809b27bac69448e583889056e56938decd (diff)
downloadopenttd-e48967541a8ce602267f80d295bcb4fe89ca70fb.tar.xz
(svn r22198) -Codechange: make some constants name more explicit
Diffstat (limited to 'src/saveload')
-rw-r--r--src/saveload/saveload.cpp4
-rw-r--r--src/saveload/saveload.h10
2 files changed, 7 insertions, 7 deletions
diff --git a/src/saveload/saveload.cpp b/src/saveload/saveload.cpp
index 25c1fe958..3c7700e93 100644
--- a/src/saveload/saveload.cpp
+++ b/src/saveload/saveload.cpp
@@ -1326,7 +1326,7 @@ static void SlList(void *list, SLRefType conv)
static inline bool SlIsObjectValidInSavegame(const SaveLoad *sld)
{
if (_sl_version < sld->version_from || _sl_version > sld->version_to) return false;
- if (sld->conv & SLF_SAVE_NO) return false;
+ if (sld->conv & SLF_NOT_IN_SAVE) return false;
return true;
}
@@ -1338,7 +1338,7 @@ static inline bool SlIsObjectValidInSavegame(const SaveLoad *sld)
*/
static inline bool SlSkipVariableOnLoad(const SaveLoad *sld)
{
- if ((sld->conv & SLF_NETWORK_NO) && _sl.action != SLA_SAVE && _networking && !_network_server) {
+ if ((sld->conv & SLF_NO_NETWORK_SYNC) && _sl.action != SLA_SAVE && _networking && !_network_server) {
SlSkipBytes(SlCalcConvMemLen(sld->conv) * sld->length);
return true;
}
diff --git a/src/saveload/saveload.h b/src/saveload/saveload.h
index 7c8596532..b5fb0010e 100644
--- a/src/saveload/saveload.h
+++ b/src/saveload/saveload.h
@@ -176,9 +176,9 @@ enum VarTypes {
/* 8 bits allocated for a maximum of 8 flags
* Flags directing saving/loading of a variable */
- SLF_SAVE_NO = 1 << 8, ///< do not save with savegame, basically client-based
- SLF_CONFIG_NO = 1 << 9, ///< do not save to config file
- SLF_NETWORK_NO = 1 << 10, ///< do not synchronize over network (but it is saved if SSF_SAVE_NO is not set)
+ SLF_NOT_IN_SAVE = 1 << 8, ///< do not save with savegame, basically client-based
+ SLF_NOT_IN_CONFIG = 1 << 9, ///< do not save to config file
+ SLF_NO_NETWORK_SYNC = 1 << 10, ///< do not synchronize over network (but it is saved if SLF_NOT_IN_SAVE is not set)
/* 5 more possible flags */
};
@@ -336,7 +336,7 @@ typedef SaveLoad SaveLoadGlobVarList;
* @param from First savegame version that has the empty space.
* @param to Last savegame version that has the empty space.
*/
-#define SLE_CONDNULL(length, from, to) SLE_CONDARR(NullStruct, null, SLE_FILE_U8 | SLE_VAR_NULL | SLF_CONFIG_NO, length, from, to)
+#define SLE_CONDNULL(length, from, to) SLE_CONDARR(NullStruct, null, SLE_FILE_U8 | SLE_VAR_NULL | SLF_NOT_IN_CONFIG, length, from, to)
/** 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)
@@ -446,7 +446,7 @@ typedef SaveLoad SaveLoadGlobVarList;
* @param from First savegame version that has the empty space.
* @param to Last savegame version that has the empty space.
*/
-#define SLEG_CONDNULL(length, from, to) {true, SL_ARR, SLE_FILE_U8 | SLE_VAR_NULL | SLF_CONFIG_NO, length, from, to, (void*)NULL}
+#define SLEG_CONDNULL(length, from, to) {true, SL_ARR, SLE_FILE_U8 | SLE_VAR_NULL | SLF_NOT_IN_CONFIG, length, from, to, (void*)NULL}
/** End marker of global variables save or load. */
#define SLEG_END() {true, SL_END, 0, 0, 0, 0, NULL}