From 2c65b050e465c4b19e05771f9f27505a3a42a261 Mon Sep 17 00:00:00 2001 From: Jonathan G Rennison Date: Sat, 31 Dec 2022 21:24:58 +0000 Subject: [PATCH] Saveload: Add SLEG_CONDVARVEC macros --- src/saveload/saveload.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/saveload/saveload.h b/src/saveload/saveload.h index 9abcca02ab..cc49a57f95 100644 --- a/src/saveload/saveload.h +++ b/src/saveload/saveload.h @@ -523,6 +523,17 @@ DECLARE_ENUM_AS_BIT_SET(SaveLoadChunkExtHeaderFlags) #define SLEG_CONDVEC_X(variable, type, from, to, extver) SLEG_GENERAL_X(SL_VEC, variable, type, 0, from, to, extver) #define SLEG_CONDVEC(variable, type, from, to) SLEG_CONDVEC_X(variable, type, from, to, SlXvFeatureTest()) +/** + * Storage of a variable vector in some savegame versions. + * @param variable Name of the global variable. + * @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. + * @param extver SlXvFeatureTest to test (along with from and to) which savegames have the field + */ +#define SLEG_CONDVARVEC_X(variable, type, from, to, extver) SLEG_GENERAL_X(SL_VARVEC, variable, type, 0, from, to, extver) +#define SLEG_CONDVARVEC(variable, type, from, to) SLEG_CONDVARVEC_X(variable, type, from, to, SlXvFeatureTest()) + /** * Storage of a global variable in every savegame version. * @param variable Name of the global variable.