| 32 | } |
| 33 | |
| 34 | void 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 | |
| 53 | void Scene_Import::Start() { |
| 54 | CreateHelpWindow(); |
nothing calls this directly
no test coverage detected