diff options
Diffstat (limited to 'engines/voyeur/files_threads.cpp')
| -rw-r--r-- | engines/voyeur/files_threads.cpp | 7 | 
1 files changed, 6 insertions, 1 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) | 
