diff options
author | Paul Gilbert | 2013-12-13 20:51:06 -0500 |
---|---|---|
committer | Paul Gilbert | 2013-12-13 20:51:06 -0500 |
commit | 09b22952ce6d108ae5063c79a2e08bcddda1fc6c (patch) | |
tree | b5cab269aaf97034d54a910653feb52ac9a82c77 | |
parent | c479aed9d1282469656fa74bafd5d99758c03931 (diff) | |
download | scummvm-rg350-09b22952ce6d108ae5063c79a2e08bcddda1fc6c.tar.gz scummvm-rg350-09b22952ce6d108ae5063c79a2e08bcddda1fc6c.tar.bz2 scummvm-rg350-09b22952ce6d108ae5063c79a2e08bcddda1fc6c.zip |
VOYEUR: Minor fix to getNextRecord and added a few debug lines
-rw-r--r-- | engines/voyeur/files_threads.cpp | 7 | ||||
-rw-r--r-- | engines/voyeur/voyeur.h | 4 |
2 files changed, 9 insertions, 2 deletions
diff --git a/engines/voyeur/files_threads.cpp b/engines/voyeur/files_threads.cpp index bba87cfda4..40febd75ae 100644 --- a/engines/voyeur/files_threads.cpp +++ b/engines/voyeur/files_threads.cpp @@ -241,7 +241,7 @@ const byte *ThreadResource::getNextRecord(const byte *p) { case 74: return p + 4; case 192: - if (*p * 0x80) + if (*p & 0x80) p += 4; return p + 2; default: @@ -252,6 +252,7 @@ const byte *ThreadResource::getNextRecord(const byte *p) { const byte *ThreadResource::getSTAMPCard(int cardId) { const byte *p; int count = 0; + for (p = _field4A; count <= cardId && *p != 0x49; p = getNextRecord(p)) { if (*p == 0xC0) ++count; @@ -1063,6 +1064,8 @@ void ThreadResource::addVideoEventEnd() { } bool ThreadResource::goToStateID(int stackId, int sceneId) { + debugC(DEBUG_BASIC, kDebugScripts, "goToStateID - %d, %d", stackId, sceneId); + // Save current stack savePrevious(); @@ -1082,6 +1085,8 @@ bool ThreadResource::goToStateID(int stackId, int sceneId) { } bool ThreadResource::goToState(int stackId, int sceneId) { + debugC(DEBUG_BASIC, kDebugScripts, "goToState - %d, %d", stackId, sceneId); + savePrevious(); if (stackId == -1 || loadAStack(stackId)) { if (sceneId != -1) diff --git a/engines/voyeur/voyeur.h b/engines/voyeur/voyeur.h index 248d150022..9712f2b4f2 100644 --- a/engines/voyeur/voyeur.h +++ b/engines/voyeur/voyeur.h @@ -53,9 +53,11 @@ namespace Voyeur { #define MAX_RESOLVE 1000 enum VoyeurDebugChannels { - kDebugPath = 1 << 0 + kDebugPath = 1 << 0, + kDebugScripts = 1 << 1 }; + struct VoyeurGameDescription; |