Change: Add ability to save/load std::deque<> containers.
This commit is contained in:
@@ -195,6 +195,7 @@ enum SaveLoadTypes {
|
||||
SL_ARR = 2, ///< Save/load an array.
|
||||
SL_STR = 3, ///< Save/load a string.
|
||||
SL_LST = 4, ///< Save/load a list.
|
||||
SL_DEQUE = 5, ///< Save/load a deque.
|
||||
/* non-normal save-load types */
|
||||
SL_WRITEBYTE = 8,
|
||||
SL_VEH_INCLUDE = 9,
|
||||
@@ -287,6 +288,16 @@ typedef SaveLoad SaveLoadGlobVarList;
|
||||
*/
|
||||
#define SLE_CONDLST(base, variable, type, from, to) SLE_GENERAL(SL_LST, base, variable, type, 0, from, to)
|
||||
|
||||
/**
|
||||
* Storage of a deque in some savegame versions.
|
||||
* @param base Name of the class or struct containing the list.
|
||||
* @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.
|
||||
* @param from First savegame version that has the list.
|
||||
* @param to Last savegame version that has the list.
|
||||
*/
|
||||
#define SLE_CONDDEQUE(base, variable, type, from, to) SLE_GENERAL(SL_DEQUE, base, variable, type, 0, from, to)
|
||||
|
||||
/**
|
||||
* Storage of a variable in every version of a savegame.
|
||||
* @param base Name of the class or struct containing the variable.
|
||||
|
Reference in New Issue
Block a user