diff --git a/findversion.sh b/findversion.sh index 6be52b696f..639d2a0eeb 100755 --- a/findversion.sh +++ b/findversion.sh @@ -99,7 +99,7 @@ elif [ -d "$ROOT_DIR/.git" ]; then # No rev? Maybe it is a custom git-svn clone REV_NR=`LC_ALL=C git log --pretty=format:%b --grep="git-svn-id:.*@[0-9]*" -1 | sed "s@.*\@\([0-9]*\).*@\1@"` fi - TAG="`git name-rev --name-only --tags --no-undefined HEAD 2>/dev/null | sed 's@\^0$@@'`" + TAG="`git describe --tags 2>/dev/null`" if [ -n "$TAG" ]; then BRANCH="" REV="$TAG" diff --git a/src/saveload/saveload.h b/src/saveload/saveload.h index 711d9ac7ac..e34d4f3e9e 100644 --- a/src/saveload/saveload.h +++ b/src/saveload/saveload.h @@ -234,7 +234,7 @@ typedef SaveLoad SaveLoadGlobVarList; * @note In general, it is better to use one of the SLE_* macros below. */ #define SLE_GENERAL_X(cmd, base, variable, type, length, from, to, extver) {false, cmd, type, length, from, to, (void*)cpp_offsetof(base, variable), cpp_sizeof(base, variable), extver} -#define SLE_GENERAL(cmd, base, variable, type, length, from, to) SLE_GENERAL_X(cmd, base, variable, type, length, from, to, {}) +#define SLE_GENERAL(cmd, base, variable, type, length, from, to) SLE_GENERAL_X(cmd, base, variable, type, length, from, to, SlXvFeatureTest()) /** * Storage of a variable in some savegame versions. @@ -246,7 +246,7 @@ typedef SaveLoad SaveLoadGlobVarList; * @param extver SlXvFeatureTest to test (along with from and to) which savegames have the field */ #define SLE_CONDVAR_X(base, variable, type, from, to, extver) SLE_GENERAL_X(SL_VAR, base, variable, type, 0, from, to, extver) -#define SLE_CONDVAR(base, variable, type, from, to) SLE_CONDVAR_X(base, variable, type, from, to, {}) +#define SLE_CONDVAR(base, variable, type, from, to) SLE_CONDVAR_X(base, variable, type, from, to, SlXvFeatureTest()) /** * Storage of a reference in some savegame versions. @@ -258,7 +258,7 @@ typedef SaveLoad SaveLoadGlobVarList; * @param extver SlXvFeatureTest to test (along with from and to) which savegames have the field */ #define SLE_CONDREF_X(base, variable, type, from, to, extver) SLE_GENERAL_X(SL_REF, base, variable, type, 0, from, to, extver) -#define SLE_CONDREF(base, variable, type, from, to) SLE_CONDREF_X(base, variable, type, from, to, {}) +#define SLE_CONDREF(base, variable, type, from, to) SLE_CONDREF_X(base, variable, type, from, to, SlXvFeatureTest()) /** * Storage of an array in some savegame versions. @@ -271,7 +271,7 @@ typedef SaveLoad SaveLoadGlobVarList; * @param extver SlXvFeatureTest to test (along with from and to) which savegames have the field */ #define SLE_CONDARR_X(base, variable, type, length, from, to, extver) SLE_GENERAL_X(SL_ARR, base, variable, type, length, from, to, extver) -#define SLE_CONDARR(base, variable, type, length, from, to) SLE_CONDARR_X(base, variable, type, length, from, to, {}) +#define SLE_CONDARR(base, variable, type, length, from, to) SLE_CONDARR_X(base, variable, type, length, from, to, SlXvFeatureTest()) /** * Storage of a string in some savegame versions. @@ -284,7 +284,7 @@ typedef SaveLoad SaveLoadGlobVarList; * @param extver SlXvFeatureTest to test (along with from and to) which savegames have the field */ #define SLE_CONDSTR_X(base, variable, type, length, from, to, extver) SLE_GENERAL_X(SL_STR, base, variable, type, length, from, to, extver) -#define SLE_CONDSTR(base, variable, type, length, from, to) SLE_CONDSTR_X(base, variable, type, length, from, to, {}) +#define SLE_CONDSTR(base, variable, type, length, from, to) SLE_CONDSTR_X(base, variable, type, length, from, to, SlXvFeatureTest()) /** * Storage of a list in some savegame versions. @@ -296,7 +296,7 @@ typedef SaveLoad SaveLoadGlobVarList; * @param extver SlXvFeatureTest to test (along with from and to) which savegames have the field */ #define SLE_CONDLST_X(base, variable, type, from, to, extver) SLE_GENERAL_X(SL_LST, base, variable, type, 0, from, to, extver) -#define SLE_CONDLST(base, variable, type, from, to) SLE_CONDLST_X(base, variable, type, from, to, {}) +#define SLE_CONDLST(base, variable, type, from, to) SLE_CONDLST_X(base, variable, type, from, to, SlXvFeatureTest()) /** * Storage of a variable in every version of a savegame. @@ -354,16 +354,16 @@ typedef SaveLoad SaveLoadGlobVarList; * @param extver SlXvFeatureTest to test (along with from and to) which savegames have empty space */ #define SLE_CONDNULL_X(length, from, to, extver) SLE_CONDARR_X(NullStruct, null, SLE_FILE_U8 | SLE_VAR_NULL | SLF_NOT_IN_CONFIG, length, from, to, extver) -#define SLE_CONDNULL(length, from, to) SLE_CONDNULL_X(length, from, to, {}) +#define SLE_CONDNULL(length, from, to) SLE_CONDNULL_X(length, from, to, SlXvFeatureTest()) /** 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) -#define SLE_VEH_INCLUDE() {false, SL_VEH_INCLUDE, 0, 0, 0, SL_MAX_VERSION, NULL, 0, {}} -#define SLE_ST_INCLUDE() {false, SL_ST_INCLUDE, 0, 0, 0, SL_MAX_VERSION, NULL, 0, {}} +#define SLE_VEH_INCLUDE() {false, SL_VEH_INCLUDE, 0, 0, 0, SL_MAX_VERSION, NULL, 0, SlXvFeatureTest()} +#define SLE_ST_INCLUDE() {false, SL_ST_INCLUDE, 0, 0, 0, SL_MAX_VERSION, NULL, 0, SlXvFeatureTest()} /** End marker of a struct/class save or load. */ -#define SLE_END() {false, SL_END, 0, 0, 0, 0, NULL, 0, {}} +#define SLE_END() {false, SL_END, 0, 0, 0, 0, NULL, 0, SlXvFeatureTest()} /** * Storage of global simple variables, references (pointers), and arrays. @@ -376,7 +376,7 @@ typedef SaveLoad SaveLoadGlobVarList; * @note In general, it is better to use one of the SLEG_* macros below. */ #define SLEG_GENERAL_X(cmd, variable, type, length, from, to, extver) {true, cmd, type, length, from, to, (void*)&variable, sizeof(variable), extver} -#define SLEG_GENERAL(cmd, variable, type, length, from, to) SLEG_GENERAL_X(cmd, variable, type, length, from, to, {}) +#define SLEG_GENERAL(cmd, variable, type, length, from, to) SLEG_GENERAL_X(cmd, variable, type, length, from, to, SlXvFeatureTest()) /** * Storage of a global variable in some savegame versions. @@ -387,7 +387,7 @@ typedef SaveLoad SaveLoadGlobVarList; * @param extver SlXvFeatureTest to test (along with from and to) which savegames have the field */ #define SLEG_CONDVAR_X(variable, type, from, to, extver) SLEG_GENERAL_X(SL_VAR, variable, type, 0, from, to, extver) -#define SLEG_CONDVAR(variable, type, from, to) SLEG_CONDVAR_X(variable, type, from, to, {}) +#define SLEG_CONDVAR(variable, type, from, to) SLEG_CONDVAR_X(variable, type, from, to, SlXvFeatureTest()) /** * Storage of a global reference in some savegame versions. @@ -398,7 +398,7 @@ typedef SaveLoad SaveLoadGlobVarList; * @param extver SlXvFeatureTest to test (along with from and to) which savegames have the field */ #define SLEG_CONDREF_X(variable, type, from, to, extver) SLEG_GENERAL_X(SL_REF, variable, type, 0, from, to, extver) -#define SLEG_CONDREF(variable, type, from, to) SLEG_CONDREF_X(variable, type, from, to, {}) +#define SLEG_CONDREF(variable, type, from, to) SLEG_CONDREF_X(variable, type, from, to, SlXvFeatureTest()) /** * Storage of a global array in some savegame versions. @@ -410,7 +410,7 @@ typedef SaveLoad SaveLoadGlobVarList; * @param extver SlXvFeatureTest to test (along with from and to) which savegames have the field */ #define SLEG_CONDARR_X(variable, type, length, from, to, extver) SLEG_GENERAL_X(SL_ARR, variable, type, length, from, to, extver) -#define SLEG_CONDARR(variable, type, length, from, to) SLEG_CONDARR_X(variable, type, length, from, to, {}) +#define SLEG_CONDARR(variable, type, length, from, to) SLEG_CONDARR_X(variable, type, length, from, to, SlXvFeatureTest()) /** * Storage of a global string in some savegame versions. @@ -422,7 +422,7 @@ typedef SaveLoad SaveLoadGlobVarList; * @param extver SlXvFeatureTest to test (along with from and to) which savegames have the field */ #define SLEG_CONDSTR_X(variable, type, length, from, to, extver) SLEG_GENERAL_X(SL_STR, variable, type, length, from, to, extver) -#define SLEG_CONDSTR(variable, type, length, from, to) SLEG_CONDSTR_X(variable, type, length, from, to, {}) +#define SLEG_CONDSTR(variable, type, length, from, to) SLEG_CONDSTR_X(variable, type, length, from, to, SlXvFeatureTest()) /** * Storage of a global list in some savegame versions. @@ -433,7 +433,7 @@ typedef SaveLoad SaveLoadGlobVarList; * @param extver SlXvFeatureTest to test (along with from and to) which savegames have the field */ #define SLEG_CONDLST_X(variable, type, from, to, extver) SLEG_GENERAL_X(SL_LST, variable, type, 0, from, to, extver) -#define SLEG_CONDLST(variable, type, from, to) SLEG_CONDLST_X(variable, type, from, to, {}) +#define SLEG_CONDLST(variable, type, from, to) SLEG_CONDLST_X(variable, type, from, to, SlXvFeatureTest()) /** * Storage of a global variable in every savegame version. @@ -477,10 +477,10 @@ typedef SaveLoad SaveLoadGlobVarList; * @param to Last savegame version that has the empty space. * @param extver SlXvFeatureTest to test (along with from and to) which savegames have empty space */ -#define SLEG_CONDNULL(length, from, to) {true, SL_ARR, SLE_FILE_U8 | SLE_VAR_NULL | SLF_NOT_IN_CONFIG, 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, SlXvFeatureTest()} /** End marker of global variables save or load. */ -#define SLEG_END() {true, SL_END, 0, 0, 0, 0, NULL, 0, {}} +#define SLEG_END() {true, SL_END, 0, 0, 0, 0, NULL, 0, SlXvFeatureTest()} /** * Checks whether the savegame is below \a major.\a minor. diff --git a/src/table/company_settings.ini b/src/table/company_settings.ini index 5c839c2af7..e49f4094fa 100644 --- a/src/table/company_settings.ini +++ b/src/table/company_settings.ini @@ -34,7 +34,7 @@ load = NULL from = 0 to = SL_MAX_VERSION cat = SC_ADVANCED -extver = {} +extver = SlXvFeatureTest() diff --git a/src/table/currency_settings.ini b/src/table/currency_settings.ini index 3c476ee5df..6a8665379a 100644 --- a/src/table/currency_settings.ini +++ b/src/table/currency_settings.ini @@ -28,7 +28,7 @@ load = NULL from = 0 to = SL_MAX_VERSION cat = SC_ADVANCED -extver = {} +extver = SlXvFeatureTest() diff --git a/src/table/gameopt_settings.ini b/src/table/gameopt_settings.ini index 9e5fa3d0ff..a5bc766ecb 100644 --- a/src/table/gameopt_settings.ini +++ b/src/table/gameopt_settings.ini @@ -62,7 +62,7 @@ load = NULL from = 0 to = SL_MAX_VERSION cat = SC_ADVANCED -extver = {} +extver = SlXvFeatureTest() diff --git a/src/table/misc_settings.ini b/src/table/misc_settings.ini index b58d9a962c..c77eba5ad0 100644 --- a/src/table/misc_settings.ini +++ b/src/table/misc_settings.ini @@ -35,7 +35,7 @@ load = NULL from = 0 to = SL_MAX_VERSION cat = SC_ADVANCED -extver = {} +extver = SlXvFeatureTest() diff --git a/src/table/settings.ini b/src/table/settings.ini index 122da30607..45490ed1ff 100644 --- a/src/table/settings.ini +++ b/src/table/settings.ini @@ -95,7 +95,7 @@ load = NULL from = 0 to = SL_MAX_VERSION cat = SC_ADVANCED -extver = {} +extver = SlXvFeatureTest() patxname = NULL diff --git a/src/table/win32_settings.ini b/src/table/win32_settings.ini index 6f62db63f6..a22e1a54e7 100644 --- a/src/table/win32_settings.ini +++ b/src/table/win32_settings.ini @@ -33,7 +33,7 @@ load = NULL from = 0 to = SL_MAX_VERSION cat = SC_ADVANCED -extver = {} +extver = SlXvFeatureTest() diff --git a/src/table/window_settings.ini b/src/table/window_settings.ini index 4565d9b35f..a7b1742040 100644 --- a/src/table/window_settings.ini +++ b/src/table/window_settings.ini @@ -29,7 +29,7 @@ load = NULL from = 0 to = SL_MAX_VERSION cat = SC_ADVANCED -extver = {} +extver = SlXvFeatureTest()