From 27083f8fb43424a415d83469b211bc64f66588f2 Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Tue, 5 Jun 2007 06:04:07 +0000 Subject: Fix loading and saving game through the options screen in Amiga CD32 version of Simon the Sorcerer 1. svn-id: r27097 --- engines/agos/script.cpp | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) (limited to 'engines/agos/script.cpp') diff --git a/engines/agos/script.cpp b/engines/agos/script.cpp index 5e86766066..ed82fd5316 100644 --- a/engines/agos/script.cpp +++ b/engines/agos/script.cpp @@ -745,16 +745,32 @@ void AGOSEngine::o_setAdjNoun() { void AGOSEngine::o_saveUserGame() { // 132: save user game - _system->setFeatureState(OSystem::kFeatureVirtualKeyboard, true); - userGame(false); - _system->setFeatureState(OSystem::kFeatureVirtualKeyboard, false); + if (getGameId() == GID_SIMON1CD32) { + // The Amiga CD32 version of Simon the Sorcerer 1uses a single slot + if (!saveGame(0, "Default Saved Game")) { + vc33_setMouseOn(); + fileError(_windowArray[5], true); + } + } else { + _system->setFeatureState(OSystem::kFeatureVirtualKeyboard, true); + userGame(false); + _system->setFeatureState(OSystem::kFeatureVirtualKeyboard, false); + } } void AGOSEngine::o_loadUserGame() { // 133: load user game - _system->setFeatureState(OSystem::kFeatureVirtualKeyboard, true); - userGame(true); - _system->setFeatureState(OSystem::kFeatureVirtualKeyboard, false); + if (getGameId() == GID_SIMON1CD32) { + // The Amiga CD32 version of Simon the Sorcerer 1 uses a single slot + if (!loadGame(genSaveName(0))) { + vc33_setMouseOn(); + fileError(_windowArray[5], false); + } + } else { + _system->setFeatureState(OSystem::kFeatureVirtualKeyboard, true); + userGame(true); + _system->setFeatureState(OSystem::kFeatureVirtualKeyboard, false); + } } void AGOSEngine::o_copysf() { -- cgit v1.2.3