mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-16 22:58:09 +00:00
VOYEUR: Minor fix to getNextRecord and added a few debug lines
This commit is contained in:
parent
c479aed9d1
commit
09b22952ce
@ -241,7 +241,7 @@ const byte *ThreadResource::getNextRecord(const byte *p) {
|
|||||||
case 74:
|
case 74:
|
||||||
return p + 4;
|
return p + 4;
|
||||||
case 192:
|
case 192:
|
||||||
if (*p * 0x80)
|
if (*p & 0x80)
|
||||||
p += 4;
|
p += 4;
|
||||||
return p + 2;
|
return p + 2;
|
||||||
default:
|
default:
|
||||||
@ -252,6 +252,7 @@ const byte *ThreadResource::getNextRecord(const byte *p) {
|
|||||||
const byte *ThreadResource::getSTAMPCard(int cardId) {
|
const byte *ThreadResource::getSTAMPCard(int cardId) {
|
||||||
const byte *p;
|
const byte *p;
|
||||||
int count = 0;
|
int count = 0;
|
||||||
|
|
||||||
for (p = _field4A; count <= cardId && *p != 0x49; p = getNextRecord(p)) {
|
for (p = _field4A; count <= cardId && *p != 0x49; p = getNextRecord(p)) {
|
||||||
if (*p == 0xC0)
|
if (*p == 0xC0)
|
||||||
++count;
|
++count;
|
||||||
@ -1063,6 +1064,8 @@ void ThreadResource::addVideoEventEnd() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool ThreadResource::goToStateID(int stackId, int sceneId) {
|
bool ThreadResource::goToStateID(int stackId, int sceneId) {
|
||||||
|
debugC(DEBUG_BASIC, kDebugScripts, "goToStateID - %d, %d", stackId, sceneId);
|
||||||
|
|
||||||
// Save current stack
|
// Save current stack
|
||||||
savePrevious();
|
savePrevious();
|
||||||
|
|
||||||
@ -1082,6 +1085,8 @@ bool ThreadResource::goToStateID(int stackId, int sceneId) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool ThreadResource::goToState(int stackId, int sceneId) {
|
bool ThreadResource::goToState(int stackId, int sceneId) {
|
||||||
|
debugC(DEBUG_BASIC, kDebugScripts, "goToState - %d, %d", stackId, sceneId);
|
||||||
|
|
||||||
savePrevious();
|
savePrevious();
|
||||||
if (stackId == -1 || loadAStack(stackId)) {
|
if (stackId == -1 || loadAStack(stackId)) {
|
||||||
if (sceneId != -1)
|
if (sceneId != -1)
|
||||||
|
@ -53,9 +53,11 @@ namespace Voyeur {
|
|||||||
#define MAX_RESOLVE 1000
|
#define MAX_RESOLVE 1000
|
||||||
|
|
||||||
enum VoyeurDebugChannels {
|
enum VoyeurDebugChannels {
|
||||||
kDebugPath = 1 << 0
|
kDebugPath = 1 << 0,
|
||||||
|
kDebugScripts = 1 << 1
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
struct VoyeurGameDescription;
|
struct VoyeurGameDescription;
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user