mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-08 10:51:11 +00:00
ULTIMA4: Implement loading savegames from launcher
This commit is contained in:
parent
365187a9d8
commit
beb8f34a55
@ -104,9 +104,9 @@ void Ultima4Engine::startup() {
|
||||
creatureMgr->getInstance();
|
||||
++pb;
|
||||
|
||||
intro = new IntroController();
|
||||
if (!skipInfo) {
|
||||
/* do the intro */
|
||||
intro = new IntroController();
|
||||
intro->init();
|
||||
++pb;
|
||||
|
||||
@ -129,6 +129,12 @@ Common::Error Ultima4Engine::run() {
|
||||
if (!shouldQuit()) {
|
||||
g_game->init();
|
||||
|
||||
int saveSlot = ConfMan.hasKey("save_slot") ? ConfMan.getInt("save_slot") : -1;
|
||||
if (saveSlot != -1) {
|
||||
if (loadGameState(saveSlot).getCode() != Common::kNoError)
|
||||
error("Error loading save");
|
||||
}
|
||||
|
||||
eventHandler->setControllerDone(false);
|
||||
eventHandler->pushController(g_game);
|
||||
eventHandler->run();
|
||||
|
Loading…
Reference in New Issue
Block a user