aboutsummaryrefslogtreecommitdiff
path: root/scumm
diff options
context:
space:
mode:
authorMax Horn2003-05-22 13:57:34 +0000
committerMax Horn2003-05-22 13:57:34 +0000
commit711c6989480d76c1d9ca3e2139e3afca68561ca8 (patch)
tree4d4ede5209682e19a7b6ed471c26117e119480cb /scumm
parent552f9fad615ba5019b8e0a9d1728bb7561ee5cc2 (diff)
downloadscummvm-rg350-711c6989480d76c1d9ca3e2139e3afca68561ca8.tar.gz
scummvm-rg350-711c6989480d76c1d9ca3e2139e3afca68561ca8.tar.bz2
scummvm-rg350-711c6989480d76c1d9ca3e2139e3afca68561ca8.zip
fixed o2_ifClassOfIs
svn-id: r7826
Diffstat (limited to 'scumm')
-rw-r--r--scumm/script_v2.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/scumm/script_v2.cpp b/scumm/script_v2.cpp
index 7d6787d5c5..abc12e2653 100644
--- a/scumm/script_v2.cpp
+++ b/scumm/script_v2.cpp
@@ -946,16 +946,16 @@ void Scumm_v2::o2_drawSentence() {
}
void Scumm_v2::o2_ifClassOfIs() {
- int act = getVarOrDirectWord(0x80);
+ int obj = getVarOrDirectWord(0x80);
int clsop = getVarOrDirectByte(0x40);
- if (getObjectIndex(act) == -1) {
+ if (getObjectIndex(obj) == -1) {
o5_jumpRelative();
return;
}
- ObjectData *od = &_objs[getObjectIndex(act)];
- byte cls = *(getResourceAddress(rtRoom, _currentRoom) + od->OBCDoffset + 10);
+ byte *obcd = getOBCDFromObject(obj);
+ byte cls = *(obcd + 6);
if ((cls & clsop) != clsop) {
o5_jumpRelative();
return;