|
@@ -94,7 +94,8 @@ enum ChunkType {
|
|
|
CH_AUTO_LENGTH = 16,
|
|
|
};
|
|
|
|
|
|
/** VarTypes is the general bitmasked magic type that tells us
|
|
|
/**
|
|
|
* VarTypes is the general bitmasked magic type that tells us
|
|
|
* certain characteristics about the variable it refers to. For example
|
|
|
* SLE_FILE_* gives the size(type) as it would be in the savegame and
|
|
|
* SLE_VAR_* the size(type) as it is in memory during runtime. These are
|
|
@@ -251,7 +252,8 @@ typedef SaveLoad SaveLoadGlobVarList;
|
|
|
|
|
|
#define SLEG_END() {true, SL_END, 0, 0, 0, 0, NULL}
|
|
|
|
|
|
/** Checks if the savegame is below major.minor.
|
|
|
/**
|
|
|
* Checks if the savegame is below major.minor.
|
|
|
*/
|
|
|
static inline bool CheckSavegameVersionOldStyle(uint16 major, byte minor)
|
|
|
{
|
|
@@ -260,7 +262,8 @@ static inline bool CheckSavegameVersionO
|
|
|
return (_sl_version < major) || (_sl_version == major && _sl_minor_version < minor);
|
|
|
}
|
|
|
|
|
|
/** Checks if the savegame is below version.
|
|
|
/**
|
|
|
* Checks if the savegame is below version.
|
|
|
*/
|
|
|
static inline bool CheckSavegameVersion(uint16 version)
|
|
|
{
|
|
@@ -268,7 +271,8 @@ static inline bool CheckSavegameVersion(
|
|
|
return _sl_version < version;
|
|
|
}
|
|
|
|
|
|
/** Checks if some version from/to combination falls within the range of the
|
|
|
/**
|
|
|
* Checks if some version from/to combination falls within the range of the
|
|
|
* active savegame version */
|
|
|
static inline bool SlIsObjectCurrentlyValid(uint16 version_from, uint16 version_to)
|
|
|
{
|
|
@@ -310,7 +314,8 @@ static inline bool IsNumericType(VarType
|
|
|
return GetVarMemType(conv) <= SLE_VAR_U64;
|
|
|
}
|
|
|
|
|
|
/** Get the address of the variable. Which one to pick depends on the object
|
|
|
/**
|
|
|
* Get the address of the variable. Which one to pick depends on the object
|
|
|
* pointer. If it is NULL we are dealing with global variables so the address
|
|
|
* is taken. If non-null only the offset is stored in the union and we need
|
|
|
* to add this to the address of the object */
|