From e0e8c58c61b139e7dc8171a808bd8b34d30e33db Mon Sep 17 00:00:00 2001 From: scawful Date: Wed, 21 Aug 2024 00:13:04 -0400 Subject: [PATCH] Refactor Rom class to support additional game versions --- src/app/rom.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/app/rom.h b/src/app/rom.h index 42a87d81..f549f58b 100644 --- a/src/app/rom.h +++ b/src/app/rom.h @@ -39,7 +39,9 @@ namespace yaze { namespace app { -// Define an enum class for the different versions of the game +/** + * @brief Different versions of the game supported by the Rom class. + */ enum class Z3_Version { US = 1, // US version JP = 2, // JP version @@ -48,7 +50,7 @@ enum class Z3_Version { }; /** - * @brief A struct to hold version constants for each version of the game. + * @brief Constants for each version of the game. */ struct VersionConstants { uint32_t kGfxAnimatedPointer; @@ -116,7 +118,10 @@ static const std::map kVersionConstantsMap = { 0x233C0, // kMap32TileBR 0x5B97, // kSpriteBlocksetPointer 0x67DD0, // kDungeonPalettesGroups - }}}; + }}, + {Z3_Version::SD, {}}, + {Z3_Version::RANDO, {}}, +}; constexpr uint32_t kNumGfxSheets = 223; constexpr uint32_t kNumLinkSheets = 14;