(by Codex) Import verified Diamond 3.7 native save containers
This commit is contained in:
1 parent
8862bd4f89
commit
c6341aa4f9
8 files changed
+128
-5
No files matched your search
@@ -1,4 +1,5 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
#include "formats/native_save_version.hpp"
|
||||
#include "formats/badge_policy.hpp"
|
||||
#include "formats/executable_layout.hpp"
|
||||
#include "ui/desk_state.hpp"
|
||||
@@ -690,8 +691,7 @@ DeskState desk_from_game(const GameState& g, const LeImage& exe, uint64_t revisi
|
||||
|
||||
DeskState load_reference_desk(const std::filesystem::path& path, const LeImage& exe) {
|
||||
auto fbm = load_savegame(path);
|
||||
if (!fbm.checksum_ok) throw FormatError("desk: FBM checksum mismatch");
|
||||
if (fbm.version != "V2.24") throw FormatError("desk: unsupported FBM version");
|
||||
require_native_savegame(fbm);
|
||||
DbCounts counts{exe.u32(::bmh::layout::CareerSession_DataDirectory_RuntimeField), exe.u32(::bmh::layout::CareerSession_DataDirectory_RuntimeField3), exe.u32(::bmh::layout::CareerSession_DataDirectory_RuntimeField2), exe.u32(::bmh::layout::CareerSession_DataDirectory_RuntimeField4)};
|
||||
SaveState save(fbm.stream, counts);
|
||||
auto d = desk_from_save(save, exe);
|
||||
|
||||
Reference in new issue
Block a user