File diff r25753:722d782a707d → r25754:d19207ab5c69
src/saveload/saveload.h
Show inline comments
 
@@ -777,26 +777,12 @@ struct SaveLoadCompat {
 
 * @param variable Name of the variable in the class or struct referenced by \a base.
 
 * @param type     Storage of the data in memory and in the savegame.
 
 */
 
#define SLE_REFLIST(base, variable, type) SLE_CONDREFLIST(base, variable, type, SL_MIN_VERSION, SL_MAX_VERSION)
 

	
 
/**
 
 * Empty space in every savegame version.
 
 * @param length Length of the empty space.
 
 */
 
#define SLE_NULL(length) SLE_CONDNULL(length, SL_MIN_VERSION, SL_MAX_VERSION)
 

	
 
/**
 
 * Empty space in some savegame versions.
 
 * @param length Length of the empty space.
 
 * @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) SaveLoad {"", SL_NULL, SLE_FILE_U8 | SLE_VAR_NULL, length, from, to, 0, nullptr, 0, nullptr}
 

	
 
/**
 
 * Only write byte during saving; never read it during loading.
 
 * When using SLE_SAVEBYTE you will have to read this byte before the table
 
 * this is in is read. This also means SLE_SAVEBYTE can only be used at the
 
 * top of a chunk.
 
 * This is intended to be used to indicate what type of entry this is in a
 
 * list of entries.
 
@@ -976,20 +962,12 @@ struct SaveLoadCompat {
 
 * @param name    The name of the field.
 
 * @param handler SaveLoadHandler for the list of structs.
 
 */
 
#define SLEG_STRUCTLIST(name, handler) SLEG_CONDSTRUCTLIST(name, handler, SL_MIN_VERSION, SL_MAX_VERSION)
 

	
 
/**
 
 * Empty global space in some savegame versions.
 
 * @param length Length of the empty space.
 
 * @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) SaveLoad {"", SL_NULL, SLE_FILE_U8 | SLE_VAR_NULL, length, from, to, 0, nullptr, 0, nullptr}
 

	
 
/**
 
 * Field name where the real SaveLoad can be located.
 
 * @param name The name of the field.
 
 */
 
#define SLC_VAR(name) {name, 0, SL_MIN_VERSION, SL_MAX_VERSION}
 

	
 
/**