diff options
-rw-r--r-- | scumm/script.cpp | 10 | ||||
-rw-r--r-- | scumm/script_v2.cpp | 4 | ||||
-rw-r--r-- | scumm/scumm.h | 3 |
3 files changed, 9 insertions, 8 deletions
diff --git a/scumm/script.cpp b/scumm/script.cpp index f7625f67c2..233307a5a6 100644 --- a/scumm/script.cpp +++ b/scumm/script.cpp @@ -484,12 +484,12 @@ void Scumm::setResult(int value) { } void Scumm::push(int a) { - assert(_scummStackPos >= 0 && (unsigned int)_scummStackPos < ARRAYSIZE(_scummStack)); + assert(_scummStackPos >= 0 && _scummStackPos < ARRAYSIZE(_scummStack)); _scummStack[_scummStackPos++] = a; } int Scumm::pop() { - if ((_scummStackPos < 1) || ((unsigned int)_scummStackPos > ARRAYSIZE(_scummStack))) { + if (_scummStackPos < 1 || _scummStackPos > ARRAYSIZE(_scummStack)) { error("No items on stack to pop() for %s (0x%X) at [%d-%d]", getOpcodeDesc(_opcode), _opcode, _roomResource, vm.slot[_currentScript].number); } @@ -556,7 +556,7 @@ void Scumm::freezeScripts(int flag) { } } - for (i = 0; i < 6; i++) + for (i = 0; i < NUM_SENTENCE; i++) _sentence[i].freezeCount++; if (vm.cutSceneScriptIndex != 0xFF) { @@ -575,7 +575,7 @@ void Scumm::unfreezeScripts() { } } - for (i = 0; i < 6; i++) { + for (i = 0; i < NUM_SENTENCE; i++) { if (_sentence[i].freezeCount > 0) _sentence[i].freezeCount--; } @@ -594,7 +594,7 @@ void Scumm::runAllScripts() { _currentScript = 0xFF; for (_curExecScript = 0; _curExecScript < NUM_SCRIPT_SLOT; _curExecScript++) { if (vm.slot[_curExecScript].status == ssRunning && vm.slot[_curExecScript].didexec == 0) { - _currentScript = (char)_curExecScript; + _currentScript = (byte)_curExecScript; getScriptBaseAddress(); getScriptEntryPoint(); executeScript(); diff --git a/scumm/script_v2.cpp b/scumm/script_v2.cpp index 81b5412311..b71f81b30e 100644 --- a/scumm/script_v2.cpp +++ b/scumm/script_v2.cpp @@ -920,8 +920,8 @@ void Scumm_v2::o2_walkActorTo() { y = getVarOrDirectByte(0x20) * 2; assert(a); - a->ignoreBoxes = true; // FIXME: Disabling walkboxes - a->startWalkActor(x, y, -1); // for now, just to debug the intro + a->ignoreBoxes = true; // FIXME: Disabling walkboxes for now, just to debug the intro + a->startWalkActor(x, y, -1); } void Scumm_v2::o2_putActor() { diff --git a/scumm/scumm.h b/scumm/scumm.h index a208333e1c..b91e67be64 100644 --- a/scumm/scumm.h +++ b/scumm/scumm.h @@ -56,6 +56,7 @@ extern Scumm *g_scumm; enum { NUM_SCRIPT_SLOT = 40, NUM_LOCALSCRIPT = 60, + NUM_SENTENCE = 6, NUM_SHADOW_PALETTE = 8, KEY_SET_OPTIONS = 3456 // WinCE }; @@ -724,7 +725,7 @@ public: /* Actor talking stuff */ byte _actorToPrintStrFor; int _sentenceNum; - SentenceTab _sentence[6]; + SentenceTab _sentence[NUM_SENTENCE]; StringTab _string[6]; void actorTalk(); void stopTalk(); |