From 711c6989480d76c1d9ca3e2139e3afca68561ca8 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Thu, 22 May 2003 13:57:34 +0000 Subject: fixed o2_ifClassOfIs svn-id: r7826 --- scumm/script_v2.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'scumm') 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; -- cgit v1.2.3