aboutsummaryrefslogtreecommitdiff
path: root/engines/parallaction
diff options
context:
space:
mode:
authorNicola Mettifogo2007-02-04 11:16:40 +0000
committerNicola Mettifogo2007-02-04 11:16:40 +0000
commit854e351e5b68e2d5f4189c80c22050d589f6ad9d (patch)
tree67010ff8e86090c9e5af136d6a86dd5e7220c4dd /engines/parallaction
parentd89bfde4a674cc9fcd8b48506aaefa94daff2bb8 (diff)
downloadscummvm-rg350-854e351e5b68e2d5f4189c80c22050d589f6ad9d.tar.gz
scummvm-rg350-854e351e5b68e2d5f4189c80c22050d589f6ad9d.tar.bz2
scummvm-rg350-854e351e5b68e2d5f4189c80c22050d589f6ad9d.zip
Implemented workaround to avoid crashes on location switches, using knowledge from Big Red Adventure.
svn-id: r25378
Diffstat (limited to 'engines/parallaction')
-rw-r--r--engines/parallaction/parallaction.cpp21
1 files changed, 16 insertions, 5 deletions
diff --git a/engines/parallaction/parallaction.cpp b/engines/parallaction/parallaction.cpp
index a437010c54..31c1dc19f2 100644
--- a/engines/parallaction/parallaction.cpp
+++ b/engines/parallaction/parallaction.cpp
@@ -421,9 +421,20 @@ void Parallaction::runGame() {
while ((_engineFlags & kEngineQuit) == 0) {
_keyDown = updateInput();
- if ((_mouseHidden == 0) && ((_engineFlags & kEngineMouse) == 0) && ((_engineFlags & kEngineWalking) == 0)) {
- debugC(1, kDebugLocation, "runGame: checking input");
-
+ debugC(1, kDebugLocation, "runGame: input flags (%i, %i, %i, %i)",
+ _mouseHidden == 0,
+ (_engineFlags & kEngineMouse) == 0,
+ (_engineFlags & kEngineWalking) == 0,
+ (_engineFlags & kEngineChangeLocation) == 0
+ );
+
+ // WORKAROUND: the engine doesn't check for displayed labels before performing a location
+ // switch, thus crashing whenever a jobDisplayLabel/jEraseLabel pair is left into the
+ // queue after the character enters a door.
+ // Skipping input processing when kEngineChangeLocation is set solves the issue. It's
+ // noteworthy that the programmers added this very check in Big Red Adventure's engine,
+ // so it should be ok here in Nippon Safes too.
+ if ((_mouseHidden == 0) && ((_engineFlags & kEngineMouse) == 0) && ((_engineFlags & kEngineWalking) == 0) && ((_engineFlags & kEngineChangeLocation) == 0)) {
InputData *v8 = translateInput();
if (v8) processInput(v8);
}
@@ -969,12 +980,12 @@ void runJobs() {
// and is in fact only used to remove jEraseLabel jobs
//
void jobWaitRemoveJob(void *parm, Job *j) {
-// printf("jobWaitRemoveJob(%x)\n", parm);
-
Job *arg = (Job*)parm;
static uint16 count = 0;
+ debugC(1, kDebugLocation, "jobWaitRemoveJob: count = %i", count);
+
_engineFlags |= kEngineMouse;
count++;