aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTravis Howell2004-08-25 08:49:34 +0000
committerTravis Howell2004-08-25 08:49:34 +0000
commitc6a9167362d933f06b775e48afa16d1866e81ad1 (patch)
treea54072b2f22fd36f2f5362604cee20345c5fd401
parenta8a53b1e54e837287d5b27eb44a3cba7354a7063 (diff)
downloadscummvm-rg350-c6a9167362d933f06b775e48afa16d1866e81ad1.tar.gz
scummvm-rg350-c6a9167362d933f06b775e48afa16d1866e81ad1.tar.bz2
scummvm-rg350-c6a9167362d933f06b775e48afa16d1866e81ad1.zip
Rename var/opcode
Add missing breaks svn-id: r14747
-rw-r--r--scumm/intern.h2
-rw-r--r--scumm/script_v72he.cpp15
2 files changed, 10 insertions, 7 deletions
diff --git a/scumm/intern.h b/scumm/intern.h
index 21c5e8fa1b..649b5325e9 100644
--- a/scumm/intern.h
+++ b/scumm/intern.h
@@ -679,7 +679,7 @@ protected:
void copyScriptString(byte *dst);
/* Version 7 script opcodes */
- void o72_pushDWordVar();
+ void o72_pushDWord();
void o72_addMessageToStack();
void o72_wordArrayRead();
void o72_wordArrayIndexedRead();
diff --git a/scumm/script_v72he.cpp b/scumm/script_v72he.cpp
index b995890f21..d9379c9b7a 100644
--- a/scumm/script_v72he.cpp
+++ b/scumm/script_v72he.cpp
@@ -48,7 +48,7 @@ void ScummEngine_v72he::setupOpcodes() {
/* 00 */
OPCODE(o6_pushByte),
OPCODE(o6_pushWord),
- OPCODE(o72_pushDWordVar),
+ OPCODE(o72_pushDWord),
OPCODE(o6_pushWordVar),
/* 04 */
OPCODE(o72_addMessageToStack),
@@ -485,12 +485,15 @@ void ScummEngine_v72he::writeArray(int array, int idx2, int idx1, int value) {
case kByteArray:
case kStringArray:
ah->data[offset] = value;
+ break;
case kIntArray:
WRITE_LE_UINT16(ah->data + offset * 2, value);
+ break;
case kDwordArray:
WRITE_LE_UINT32(ah->data + offset * 4, value);
+ break;
}
}
@@ -524,7 +527,7 @@ void ScummEngine_v72he::copyScriptString(byte *dst) {
}
}
-void ScummEngine_v72he::o72_pushDWordVar() {
+void ScummEngine_v72he::o72_pushDWord() {
int a;
if (*_lastCodePtr + sizeof(MemBlkHeader) != _scriptOrgPointer) {
uint32 oldoffs = _scriptPointer - _scriptOrgPointer;
@@ -720,7 +723,7 @@ void ScummEngine_v72he::o72_arrayOps() {
switch (subOp) {
case 7: // SO_ASSIGN_STRING
array = fetchScriptWord();
- ah = defineArray(array, kStringArray, 0, 0, 0, 100);
+ ah = defineArray(array, kStringArray, 0, 0, 0, 256);
copyScriptString(ah->data);
break;
case 208: // SO_ASSIGN_INT_LIST
@@ -852,11 +855,11 @@ void ScummEngine_v72he::o72_jumpToScript() {
}
void ScummEngine_v72he::o72_findAllObjects() {
- int a = pop();
+ int room = pop();
int i = 1;
- if (a != _currentRoom)
- warning("o72_findAllObjects: current room is not %d", a);
+ if (room != _currentRoom)
+ warning("o72_findAllObjects: current room is not %d", room);
writeVar(0, 0);
defineArray(0, kDwordArray, 0, 0, 0, _numLocalObjects + 1);
writeArray(0, 0, 0, _numLocalObjects);