diff --git a/include/RE/B/BGSSaveLoadManager.h b/include/RE/B/BGSSaveLoadManager.h index 2147573c8..b1d25e231 100644 --- a/include/RE/B/BGSSaveLoadManager.h +++ b/include/RE/B/BGSSaveLoadManager.h @@ -20,25 +20,41 @@ namespace RE class BGSSaveLoadFileEntry { public: + enum class SaveType : std::uint32_t + { + kAutosave = 0x0, + kSave = 0x1, + kQuicksave = 0x2 + }; + // members - BSFixedString fileName; // 00 - BSFixedString playerName; // 08 - BSFixedString playerTitle; // 10 - BSFixedString location; // 18 - BSFixedString playTime; // 20 - BSFixedString raceName; // 28 - std::uint32_t unk30; // 30 - std::uint32_t unk34; // 34 - std::uint32_t unk38; // 38 - std::uint32_t unk3C; // 3C - std::uint32_t unk40; // 40 - std::uint32_t unk44; // 44 - std::uint64_t unk48; // 48 - std::uint64_t unk50; // 50 - std::uint64_t unk58; // 58 - std::uint64_t unk60; // 60 - std::uint64_t unk68; // 68 - std::uint64_t unk70; // 70 + BSFixedString fileName; // 00 + BSFixedString characterName; // 08 + BSFixedString characterTitle; // 10 + BSFixedString currentLocation; // 18 + BSFixedString playTime; // 20 + BSFixedString characterRace; // 28 + std::int32_t saveVersion; // 30 + std::uint32_t saveNumber; // 34 + std::uint32_t characterLevel; // 38 + float currentExperience; // 3C + float requiredExperience; // 40 + std::uint32_t screenshotWidth; // 44 + std::uint32_t screenshotHeight; // 48 + std::uint32_t unk4C; // 4C + REX::W32::FILETIME fileTime; // 50 + REX::W32::FILETIME saveTime; // 58 + std::int32_t unk60; // 60 + bool loaded; // 64 + bool unk65; // 65 + bool unk66; // 66 + std::uint8_t unk67; // 67 + std::uint8_t unk68; // 68 + bool unk69; // 69 + std::uint16_t pad6A; // 6A + std::uint32_t characterID; // 6C + stl::enumeration saveType; // 70 + std::uint32_t pad74; // 74 }; static_assert(sizeof(BGSSaveLoadFileEntry) == 0x78); @@ -89,6 +105,7 @@ namespace RE void Save(const char* a_fileName); void Load(const char* a_fileName); void Load(const char* a_fileName, bool a_checkForMods); + bool PopulateSaveList(); bool LoadMostRecentSaveGame(); diff --git a/src/RE/B/BGSSaveLoadManager.cpp b/src/RE/B/BGSSaveLoadManager.cpp index e6bc344fd..76a138c1f 100644 --- a/src/RE/B/BGSSaveLoadManager.cpp +++ b/src/RE/B/BGSSaveLoadManager.cpp @@ -23,6 +23,13 @@ namespace RE Load_Impl(a_fileName, -1, 0, a_checkForMods); } + void BGSSaveLoadManager::PopulateSaveList() + { + using func_t = decltype(&BGSSaveLoadManager::PopulateSaveList); + static REL::Relocation func{ RELOCATION_ID(34850, 35760) }; + return func(this); + } + bool BGSSaveLoadManager::LoadMostRecentSaveGame() { using func_t = decltype(&BGSSaveLoadManager::LoadMostRecentSaveGame);