From c983e879e11a38d98f038a43943f92e93fdc58b1 Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Fri, 1 Jun 2007 23:12:22 +0000 Subject: Fix regressions, caused by VGATimerEntry type changes. svn-id: r27044 --- engines/agos/script.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/agos/script.cpp') diff --git a/engines/agos/script.cpp b/engines/agos/script.cpp index 8a4457faf2..d3197f6d90 100644 --- a/engines/agos/script.cpp +++ b/engines/agos/script.cpp @@ -453,7 +453,7 @@ void AGOSEngine::o_haltAnimation() { if (getGameType() == GType_SIMON1 || getGameType() == GType_SIMON2) { VgaTimerEntry *vte = _vgaTimerList; while (vte->delay) { - if (vte->type == 0) + if (vte->type == ANIMATE_EVENT) vte->delay += 10; vte++; } -- cgit v1.2.3 From 64413f9cc8492a3f278575b21927b5ee8ee40ba1 Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Mon, 4 Jun 2007 14:25:02 +0000 Subject: Only call MIDI code, in games which use MIDI based music. svn-id: r27080 --- engines/agos/script.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'engines/agos/script.cpp') diff --git a/engines/agos/script.cpp b/engines/agos/script.cpp index d3197f6d90..5e86766066 100644 --- a/engines/agos/script.cpp +++ b/engines/agos/script.cpp @@ -722,13 +722,12 @@ void AGOSEngine::o_doClassIcons() { void AGOSEngine::o_playTune() { // 127: play tune - int music = getVarOrWord(); - int track = getVarOrWord(); + uint16 music = getVarOrWord(); + uint16 track = getVarOrWord(); if (music != _lastMusicPlayed) { _lastMusicPlayed = music; - loadMusic(music); - _midi.startTrack(track); + playMusic(music, track); } } -- cgit v1.2.3 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 From 2d2bda501e549169f4b6726e60d21b10dcfdf982 Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Sun, 10 Jun 2007 04:14:53 +0000 Subject: Fix timer code in Puzzle Pack, to match original speed. svn-id: r27275 --- engines/agos/script.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'engines/agos/script.cpp') diff --git a/engines/agos/script.cpp b/engines/agos/script.cpp index ed82fd5316..4541f3d002 100644 --- a/engines/agos/script.cpp +++ b/engines/agos/script.cpp @@ -508,7 +508,14 @@ void AGOSEngine::o_picture() { return; } - _picture8600 = (vga_res == 8600); + if (getGameType() == GType_PP && getGameId() != GID_DIMP) { + if (vga_res == 8700 && getBitFlag(107)) { + _vgaPeriod = 30; + } + + _picture8600 = (vga_res == 8600); + } + setWindowImageEx(mode, vga_res); } -- cgit v1.2.3 From ab9b9a1bf362e68f5f6a69462ef2b7c146e6e08f Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Tue, 19 Jun 2007 11:50:22 +0000 Subject: Cleanup, could cause regressions. svn-id: r27547 --- engines/agos/script.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/agos/script.cpp') diff --git a/engines/agos/script.cpp b/engines/agos/script.cpp index 4541f3d002..d083e0251b 100644 --- a/engines/agos/script.cpp +++ b/engines/agos/script.cpp @@ -1000,7 +1000,7 @@ void AGOSEngine::sendSync(uint a) { _lockWord &= ~0x8000; } -void AGOSEngine::stopAnimate(uint a) { +void AGOSEngine::stopAnimate(uint16 a) { uint16 b = to16Wrapper(a); _lockWord |= 0x8000; _vcPtr = (byte *)&b; -- cgit v1.2.3 From 00829f15c87689e649489ec4d97c78d8b8748f83 Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Thu, 21 Jun 2007 06:37:00 +0000 Subject: Minor cleanup. svn-id: r27580 --- engines/agos/script.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'engines/agos/script.cpp') diff --git a/engines/agos/script.cpp b/engines/agos/script.cpp index d083e0251b..c5cf6c5872 100644 --- a/engines/agos/script.cpp +++ b/engines/agos/script.cpp @@ -156,7 +156,7 @@ void AGOSEngine::o_gtf() { void AGOSEngine::o_chance() { // 23: chance - uint a = getVarOrWord(); + int16 a = getVarOrWord(); if (a == 0) { setScriptCondition(false); @@ -173,7 +173,7 @@ void AGOSEngine::o_chance() { if (a <= 0) { _chanceModifier = 0; setScriptCondition(false); - } else if ((uint)_rnd.getRandomNumber(99) < a) { + } else if ((int16)_rnd.getRandomNumber(99) < a) { if (_chanceModifier <= 0) _chanceModifier -= 5; else @@ -410,7 +410,7 @@ void AGOSEngine::o_process() { void AGOSEngine::o_when() { // 76: add timeout - uint timeout = getVarOrWord(); + uint16 timeout = getVarOrWord(); addTimeEvent(timeout, getVarOrWord()); } @@ -894,7 +894,7 @@ uint AGOSEngine::getNextVarContents() { return (uint16)readVariable(getVarWrapper()); } -uint AGOSEngine::readVariable(uint variable) { +uint AGOSEngine::readVariable(uint16 variable) { if (variable >= _numVars) error("readVariable: Variable %d out of range", variable); @@ -914,7 +914,7 @@ void AGOSEngine::writeNextVarContents(uint16 contents) { writeVariable(getVarWrapper(), contents); } -void AGOSEngine::writeVariable(uint variable, uint16 contents) { +void AGOSEngine::writeVariable(uint16 variable, uint16 contents) { if (variable >= _numVars) error("writeVariable: Variable %d out of range", variable); @@ -1009,7 +1009,7 @@ void AGOSEngine::stopAnimate(uint16 a) { } void AGOSEngine::waitForSync(uint a) { - const uint maxCount = (getGameType() == GType_SIMON1) ? 500 : 1000; + const uint maxCount = (getGameType() == GType_SIMON1) ? 1000 : 2500; if (getGameType() == GType_SIMON1 && (getFeatures() & GF_TALKIE)) { if (a != 200) { -- cgit v1.2.3