MCPcopy Create free account
hub / github.com/EasyRPG/Player / PopulateSaveWindow

Method PopulateSaveWindow

src/scene_import.cpp:34–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32}
33
34void Scene_Import::PopulateSaveWindow(Window_SaveFile& win, int id) {
35 // File access is already determined
36 if (id < static_cast<int>(files.size())) {
37 win.SetDisplayOverride(files[id].short_path, files[id].file_id);
38
39 std::unique_ptr<lcf::rpg::Save> savegame =
40 lcf::LSD_Reader::Load(files[id].full_path, Player::encoding);
41
42 if (savegame.get()) {
43 PopulatePartyFaces(win, id, *savegame);
44 UpdateLatestTimestamp(id, *savegame);
45 } else {
46 win.SetCorrupted(true);
47 }
48 } else {
49 win.SetDisplayOverride("No lcf::Data", 0);
50 }
51}
52
53void Scene_Import::Start() {
54 CreateHelpWindow();

Callers

nothing calls this directly

Calls 4

SetDisplayOverrideMethod · 0.80
SetCorruptedMethod · 0.80
sizeMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected