[Scummvm-cvs-logs] CVS: scummvm/scumm intern.h,2.58,2.59 script_v2.cpp,2.15,2.16
Pawel Kolodziejski
aquadran at users.sourceforge.net
Mon Apr 21 08:26:09 CEST 2003
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1:/tmp/cvs-serv12816
Modified Files:
intern.h script_v2.cpp
Log Message:
added o2_ifClassOfIs opcode
Index: intern.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/intern.h,v
retrieving revision 2.58
retrieving revision 2.59
diff -u -d -r2.58 -r2.59
--- intern.h 21 Apr 2003 14:59:19 -0000 2.58
+++ intern.h 21 Apr 2003 15:25:27 -0000 2.59
@@ -240,6 +240,7 @@
void o2_resourceRoutines();
void o2_verbOps();
void o2_doSentence();
+ void o2_ifClassOfIs();
void o2_isEqual();
void o2_isGreater();
Index: script_v2.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v2.cpp,v
retrieving revision 2.15
retrieving revision 2.16
diff -u -d -r2.15 -r2.16
--- script_v2.cpp 21 Apr 2003 14:59:19 -0000 2.15
+++ script_v2.cpp 21 Apr 2003 15:25:29 -0000 2.16
@@ -51,7 +51,7 @@
OPCODE(o2_resourceRoutines),
OPCODE(o5_walkActorToActor),
OPCODE(o5_putActorAtObject),
- OPCODE(o5_getObjectState),
+ OPCODE(o2_ifNotState08),
/* 10 */
OPCODE(o5_getObjectOwner),
OPCODE(o5_animateActor),
@@ -69,7 +69,7 @@
OPCODE(o2_setBitVar),
/* 1C */
OPCODE(o5_startSound),
- OPCODE(o5_ifClassOfIs),
+ OPCODE(o2_ifClassOfIs),
OPCODE(o5_walkActorTo),
OPCODE(o2_ifState02),
/* 20 */
@@ -149,7 +149,7 @@
OPCODE(o2_setBitVar),
/* 5C */
OPCODE(o5_oldRoomEffect),
- OPCODE(o5_ifClassOfIs),
+ OPCODE(o2_ifClassOfIs),
OPCODE(o5_walkActorTo),
OPCODE(o2_ifNotState02),
/* 60 */
@@ -229,7 +229,7 @@
OPCODE(o2_setBitVar),
/* 9C */
OPCODE(o5_startSound),
- OPCODE(o5_ifClassOfIs),
+ OPCODE(o2_ifClassOfIs),
OPCODE(o5_walkActorTo),
OPCODE(o2_ifState02),
/* A0 */
@@ -309,7 +309,7 @@
OPCODE(o5_divide),
/* DC */
OPCODE(o5_oldRoomEffect),
- OPCODE(o5_ifClassOfIs),
+ OPCODE(o2_ifClassOfIs),
OPCODE(o5_walkActorTo),
OPCODE(o2_ifNotState02),
/* E0 */
@@ -867,3 +867,18 @@
//_scriptPointer = _messagePtr;
}
+void Scumm_v2::o2_ifClassOfIs() {
+ int act = getVarOrDirectWord(0x80);
+ int clsop = getVarOrDirectByte(0x40);
+
+ if (getObjectIndex(act) != 0xFF) {
+ o5_jumpRelative();
+ return;
+ }
+
+ ObjectData *od = &_objs[getObjectIndex(act)];
+ byte cls = *(getResourceAddress(rtRoom, _currentRoom) + od->OBCDoffset + 10);
+ if ((cls & clsop) != clsop) {
+ o5_jumpRelative();
+ }
+}
More information about the Scummvm-git-logs
mailing list