#ifndef __URDE_CMEMORYCARDSYS_HPP__ #define __URDE_CMEMORYCARDSYS_HPP__ #include "CToken.hpp" #include "World/CWorld.hpp" #include "CGameHintInfo.hpp" #include "CSaveWorld.hpp" #include namespace urde { class CDummyWorld; class CStringTable; class CSaveWorldMemory { friend class CMemoryCardSys; ResId x0_strgId = -1; ResId x4_savwId = -1; u32 x8_areaCount; std::vector xc_areaIds; /* 4 byte element */ std::vector x1c_; /* 16 byte element */ TLockedToken x2c_worldName; /* used to be optional */ TLockedToken x3c_saveWorld; /* used to be optional */ public: ResId GetSaveWorldAssetId() const { return x4_savwId; } u32 GetAreaCount() const { return x8_areaCount; } const TLockedToken& GetWorldName() const { return x2c_worldName; } const TLockedToken& GetSaveWorld() const { return x3c_saveWorld; } }; class CSaveWorldIntermediate { friend class CMemoryCardSys; u32 x0_mlvlId; u32 x4_strgId; u32 x8_savwId; std::vector xc_areaIds; std::vector x1c_; std::unique_ptr x2c_dummyWorld; TLockedToken x34_saveWorld; /* Used to be auto_ptr */ public: CSaveWorldIntermediate(ResId mlvl, ResId savw); bool InitializePump(); }; class CMemoryCardSys { TLockedToken x0_hints; std::vector> xc_memoryWorlds; /* MLVL as key */ std::experimental::optional> x1c_worldInter; /* used to be auto_ptr of vector */ std::unordered_map x20_scanStates; public: const std::vector& GetHints() const { return x0_hints->GetHints(); } const std::vector>& GetMemoryWorlds() const { return xc_memoryWorlds; } CMemoryCardSys(); bool InitializePump(); }; } #endif // __URDE_CMEMORYCARDSYS_HPP__