more cleanup

svn-id: r7653
This commit is contained in:
Max Horn 2003-05-18 23:46:30 +00:00
parent ac9a392a5b
commit b43bca21cb
3 changed files with 9 additions and 8 deletions

View file

@ -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();

View file

@ -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() {

View file

@ -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();