diff --git a/src/sl/animated_tile_sl.cpp b/src/sl/animated_tile_sl.cpp index b0eaca342d..cdbf7650c7 100644 --- a/src/sl/animated_tile_sl.cpp +++ b/src/sl/animated_tile_sl.cpp @@ -22,8 +22,8 @@ struct AnimatedTileStructHandler : public SaveLoadStructHandler { NamedSaveLoadTable GetDescription() const override { static const NamedSaveLoad _anim_tiles_sub_desc[] = { - NSLT("tile", SLTAG(SLTAG_CUSTOM_START, SLE_VAR(AnimatedTilePair, first, SLE_UINT32))), - NSLT("speed", SLTAG(SLTAG_CUSTOM_START + 1, SLE_VAR(AnimatedTilePair, second.speed, SLE_UINT8))), + NSLT("tile", SLTAG(SLTAG_CUSTOM_0, SLE_VAR(AnimatedTilePair, first, SLE_UINT32))), + NSLT("speed", SLTAG(SLTAG_CUSTOM_1, SLE_VAR(AnimatedTilePair, second.speed, SLE_UINT8))), }; return _anim_tiles_sub_desc; } @@ -45,7 +45,7 @@ struct AnimatedTileStructHandler : public SaveLoadStructHandler { void Load([[maybe_unused]] void *object) const override { auto slt = this->GetLoadDescription(); - if (slt.size() != 2 || slt[0].label_tag != SLTAG_CUSTOM_START || slt[1].label_tag != SLTAG_CUSTOM_START + 1) { + if (slt.size() != 2 || slt[0].label_tag != SLTAG_CUSTOM_0 || slt[1].label_tag != SLTAG_CUSTOM_1) { SlErrorCorrupt("Table format ANIT chunk fields not as expected"); } diff --git a/src/sl/order_sl.cpp b/src/sl/order_sl.cpp index 355f09cc08..2db1481833 100644 --- a/src/sl/order_sl.cpp +++ b/src/sl/order_sl.cpp @@ -313,8 +313,8 @@ using DispatchSupplementaryNamePair = std::pair; NamedSaveLoadTable GetDispatchSupplementaryNamePairDescription() { static const NamedSaveLoad _dispatch_name_pair_desc[] = { - NSL("key", SLTAG(SLTAG_CUSTOM_START, SLE_VAR(DispatchSupplementaryNamePair, first, SLE_UINT32))), - NSL("value", SLTAG(SLTAG_CUSTOM_START + 1, SLE_SSTR(DispatchSupplementaryNamePair, second, SLE_STR))), + NSL("key", SLTAG(SLTAG_CUSTOM_0, SLE_VAR(DispatchSupplementaryNamePair, first, SLE_UINT32))), + NSL("value", SLTAG(SLTAG_CUSTOM_1, SLE_SSTR(DispatchSupplementaryNamePair, second, SLE_STR))), }; return _dispatch_name_pair_desc; @@ -338,7 +338,7 @@ struct DispatchNameStructHandler final : public TypedSaveLoadStructHandlerGetLoadDescription(); - if (slt.size() != 2 || slt[0].label_tag != SLTAG_CUSTOM_START || slt[1].label_tag != SLTAG_CUSTOM_START + 1) { + if (slt.size() != 2 || slt[0].label_tag != SLTAG_CUSTOM_0 || slt[1].label_tag != SLTAG_CUSTOM_1) { SlErrorCorrupt("Dispatch names sub-chunk fields not as expected"); } diff --git a/src/sl/saveload_types.h b/src/sl/saveload_types.h index ca4ccf02f0..cab457fb1a 100644 --- a/src/sl/saveload_types.h +++ b/src/sl/saveload_types.h @@ -160,6 +160,8 @@ enum SaveLoadTags { SLTAG_DEFAULT, SLTAG_TABLE_UNKNOWN, SLTAG_CUSTOM_START, + SLTAG_CUSTOM_0 = SLTAG_CUSTOM_START, + SLTAG_CUSTOM_1, }; enum NamedSaveLoadFlags : uint8_t {