aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorKari Salminen2008-05-29 12:22:14 +0000
committerKari Salminen2008-05-29 12:22:14 +0000
commit3f91c579fcdc4ed43a18792f6bd84d9e156efa13 (patch)
treeaf3ee65489af7195f224b8b793ba7dd8b694445b /engines
parent7a22a632448a0067419757fe431e25eb343a2a38 (diff)
downloadscummvm-rg350-3f91c579fcdc4ed43a18792f6bd84d9e156efa13.tar.gz
scummvm-rg350-3f91c579fcdc4ed43a18792f6bd84d9e156efa13.tar.bz2
scummvm-rg350-3f91c579fcdc4ed43a18792f6bd84d9e156efa13.zip
Verified most parts of opcode 0x01 (o1_modifyObjectParam) against Future Wars's and Operation Stealth's disassembly (Only part of switch case 3 still left to do).
svn-id: r32360
Diffstat (limited to 'engines')
-rw-r--r--engines/cine/object.cpp24
1 files changed, 11 insertions, 13 deletions
diff --git a/engines/cine/object.cpp b/engines/cine/object.cpp
index 89d6b99592..d7b4b853ae 100644
--- a/engines/cine/object.cpp
+++ b/engines/cine/object.cpp
@@ -185,39 +185,37 @@ void addObjectParam(byte objIdx, byte paramIdx, int16 newValue) {
}
void modifyObjectParam(byte objIdx, byte paramIdx, int16 newValue) {
- paramIdx--;
-
- assert(paramIdx <= 5);
-
switch (paramIdx) {
- case 0:
+ case 1:
objectTable[objIdx].x = newValue;
break;
- case 1:
+ case 2:
objectTable[objIdx].y = newValue;
break;
- case 2:
+ case 3:
objectTable[objIdx].mask = newValue;
+ // TODO: Check this part against disassembly
if (removeOverlay(objIdx, 0)) {
addOverlay(objIdx, 0);
}
break;
- case 3:
+ case 4:
objectTable[objIdx].frame = newValue;
break;
- case 4:
- // is it really in Future Wars? it breaks the newspaper machine
- // on the airport in Operation Stealth
- if (newValue == -1 && g_cine->getGameType() != Cine::GType_OS) {
+ case 5:
+ // TODO: Test if this really breaks the newspaper machine on the airport in Operation Stealth.
+ if (g_cine->getGameType() == Cine::GType_FW && newValue == -1) {
objectTable[objIdx].costume = globalVars[0];
} else {
objectTable[objIdx].costume = newValue;
}
break;
- case 5:
+ case 6:
objectTable[objIdx].part = newValue;
break;
+ default: // No-operation
+ break;
}
}