aboutsummaryrefslogtreecommitdiff
path: root/engines/simon
diff options
context:
space:
mode:
authorTravis Howell2006-06-01 12:06:53 +0000
committerTravis Howell2006-06-01 12:06:53 +0000
commitd64ea1ad87066aae2fae5f06b70d7b0358b78af9 (patch)
tree28b4ae9f586162a243bb8c6b65c7ed8784c000e5 /engines/simon
parent4c9b3ce5e3e6997f20e662ce61ded442edfa84e4 (diff)
downloadscummvm-rg350-d64ea1ad87066aae2fae5f06b70d7b0358b78af9.tar.gz
scummvm-rg350-d64ea1ad87066aae2fae5f06b70d7b0358b78af9.tar.bz2
scummvm-rg350-d64ea1ad87066aae2fae5f06b70d7b0358b78af9.zip
Fix wait timeout during introduction of demo version of Simon the Sorcerer 1 (With speech)
svn-id: r22815
Diffstat (limited to 'engines/simon')
-rw-r--r--engines/simon/simon.cpp15
-rw-r--r--engines/simon/simon.h4
-rw-r--r--engines/simon/vga.cpp3
3 files changed, 20 insertions, 2 deletions
diff --git a/engines/simon/simon.cpp b/engines/simon/simon.cpp
index 865a3c9765..ea8fedfc68 100644
--- a/engines/simon/simon.cpp
+++ b/engines/simon/simon.cpp
@@ -281,7 +281,10 @@ SimonEngine::SimonEngine(OSystem *syst)
_frameRate = 0;
_zoneNumber = 0;
+
_vgaWaitFor = 0;
+ _lastVgaWaitFor = 0;
+
_vgaCurZoneNum = 0;
_vgaCurSpriteId = 0;
_vgaCurSpritePriority = 0;
@@ -1571,6 +1574,15 @@ void SimonEngine::set_video_mode_internal(uint16 mode, uint16 vga_res_id) {
void SimonEngine::waitForSync(uint a) {
const uint maxCount = (getGameType() == GType_SIMON1) ? 500 : 1000;
+ if (getGameType() == GType_SIMON1 && (getFeatures() & GF_TALKIE)) {
+ if (a != 200) {
+ uint16 tmp = _lastVgaWaitFor;
+ _lastVgaWaitFor = 0;
+ if (tmp == a)
+ return;
+ }
+ }
+
_vgaWaitFor = a;
_syncCount = 0;
_exitCutscene = false;
@@ -1779,6 +1791,9 @@ void SimonEngine::loadSprite(uint windowNum, uint zoneNum, uint vgaSpriteId, uin
byte *p, *pp;
uint count;
+ if (vgaSpriteId >= 400)
+ _lastVgaWaitFor = 0;
+
_lockWord |= 0x40;
if (isSpriteLoaded(vgaSpriteId, zoneNum)) {
diff --git a/engines/simon/simon.h b/engines/simon/simon.h
index 6e4dc1805b..1d1b8ba85c 100644
--- a/engines/simon/simon.h
+++ b/engines/simon/simon.h
@@ -377,8 +377,8 @@ protected:
uint16 _frameRate;
uint16 _zoneNumber;
- uint16 _vgaWaitFor, _vgaCurZoneNum;
- uint16 _vgaCurSpriteId;
+ uint16 _vgaWaitFor, _lastVgaWaitFor;
+ uint16 _vgaCurSpriteId, _vgaCurZoneNum;
uint16 _vgaCurSpritePriority;
int16 _baseY;
diff --git a/engines/simon/vga.cpp b/engines/simon/vga.cpp
index dd381b1887..98a0c4953c 100644
--- a/engines/simon/vga.cpp
+++ b/engines/simon/vga.cpp
@@ -1540,6 +1540,7 @@ void SimonEngine::vc15_sync() {
}
}
+ _lastVgaWaitFor = id;
/* clear a wait event */
if (id == _vgaWaitFor)
_vgaWaitFor = 0;
@@ -1713,6 +1714,8 @@ void SimonEngine::vc27_resetSprite() {
_lockWord |= 8;
+ _lastVgaWaitFor = 0;
+
memset(&bak, 0, sizeof(bak));
vsp = _vgaSprites;