#pragma once #include #include #include #include #include "Utils/Directory.h" #include "tinyxml2.h" struct TexturePoolEntry { fs::path path = ""; // Path to Shared Texture }; class ExternalFile { public: fs::path xmlPath, outPath; ExternalFile(fs::path nXmlPath, fs::path nOutPath); }; // Stores data from the XML file, the integer is the index (via ATOI) and the string is the value class EnumData { public: // Common std::map cutsceneCmd; std::map miscType; std::map fadeOutSeqPlayer; std::map transitionType; std::map naviQuestHintType; std::map ocarinaSongActionId; std::map seqId; // OoT std::map textType; std::map destination; std::map playerCueId; // MM std::map modifySeqType; std::map chooseCreditsSceneType; std::map destinationType; std::map motionBlurType; std::map transitionGeneralType; std::map rumbleType; std::map spawnFlag; std::map endSfx; std::map interpType; std::map relTo; }; class ZFile; class GameConfig { public: std::string configFilePath; std::map> segmentRefFiles; std::map symbolMap; std::vector actorList; std::vector objectList; std::vector entranceList; std::vector specialEntranceList; std::map texturePool; // Key = CRC EnumData enumData; // ZBackground uint32_t bgScreenWidth = 320, bgScreenHeight = 240; bool useScreenWidthHeightConstants = true; // If true, ZBackground's will be declared with // SCREEN_WIDTH * SCREEN_HEIGHT in the C file // ExternalFile fs::path externalXmlFolder; std::vector externalFiles; GameConfig() = default; ~GameConfig(); void ReadTexturePool(const fs::path& texturePoolXmlPath); void GenSymbolMap(const fs::path& symbolMapPath); void ConfigFunc_SymbolMap(const tinyxml2::XMLElement& element); void ConfigFunc_ActorList(const tinyxml2::XMLElement& element); void ConfigFunc_ObjectList(const tinyxml2::XMLElement& element); void ConfigFunc_EntranceList(const tinyxml2::XMLElement& element); void ConfigFunc_specialEntranceList(const tinyxml2::XMLElement& element); void ConfigFunc_TexturePool(const tinyxml2::XMLElement& element); void ConfigFunc_BGConfig(const tinyxml2::XMLElement& element); void ConfigFunc_ExternalXMLFolder(const tinyxml2::XMLElement& element); void ConfigFunc_ExternalFile(const tinyxml2::XMLElement& element); void ConfigFunc_EnumData(const tinyxml2::XMLElement& element); void ReadConfigFile(const fs::path& configFilePath); };