[Scummvm-cvs-logs] CVS: scummvm/scumm akos.cpp,1.157,1.158 intern.h,2.217,2.218 script_v6he.cpp,2.110,2.111
Eugene Sandulenko
sev at users.sourceforge.net
Sun Sep 5 15:58:01 CEST 2004
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23590
Modified Files:
akos.cpp intern.h script_v6he.cpp
Log Message:
Implement roomOp 234
Index: akos.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/akos.cpp,v
retrieving revision 1.157
retrieving revision 1.158
diff -u -d -r1.157 -r1.158
--- akos.cpp 4 Sep 2004 10:29:06 -0000 1.157
+++ akos.cpp 5 Sep 2004 22:57:09 -0000 1.158
@@ -323,6 +323,7 @@
break;
case 32:
// TODO Add codec32
+ warning("akos_drawLimb codec32");
result = 1;
break;
default:
@@ -364,6 +365,7 @@
break;
case 32:
// TODO Add codec32
+ warning("akos_drawLimb: codec32 stub");
result = 1;
break;
default:
Index: intern.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/intern.h,v
retrieving revision 2.217
retrieving revision 2.218
diff -u -d -r2.217 -r2.218
--- intern.h 5 Sep 2004 17:39:52 -0000 2.217
+++ intern.h 5 Sep 2004 22:57:09 -0000 2.218
@@ -573,6 +573,7 @@
uint8 virtScreenLoadUnpack(vsUnpackCtx *ctx, byte *data);
void seekFilePos(int slot, int offset, int mode);
virtual void decodeParseString(int a, int b);
+ void swapObjects(int object1, int object2);
/* Version 6 script opcodes */
void o6_setState();
Index: script_v6he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v6he.cpp,v
retrieving revision 2.110
retrieving revision 2.111
diff -u -d -r2.110 -r2.111
--- script_v6he.cpp 5 Sep 2004 09:36:50 -0000 2.110
+++ script_v6he.cpp 5 Sep 2004 22:57:09 -0000 2.111
@@ -535,7 +535,7 @@
case 234: // HE 7.2
b = pop();
a = pop();
- warning("o6_roomOps: case %d (%d, %d)", op, b, a);
+ swapObjects(a, b);
break;
case 236: // HE 7.2
b = pop();
@@ -547,6 +547,32 @@
}
}
+void ScummEngine_v6he::swapObjects(int object1, int object2) {
+ int idx1 = -1, idx2 = -1;
+
+ if (_numObjectsInRoom >= 0) { // how could it be negative?
+ for (int i = 0; i < _numObjectsInRoom; i++) {
+ if (_objs[i].obj_nr == object1)
+ idx1 = i;
+
+ if (_objs[i].obj_nr == object2)
+ idx2 = i;
+ }
+ }
+
+ if (idx1 == -1 || idx2 == -1 || idx1 >= idx2)
+ return;
+
+ stopObjectScript(object1);
+ stopObjectScript(object2);
+
+ struct ObjectData tmpOd;
+
+ memcpy(&tmpOd, &_objs[idx1], sizeof(tmpOd));
+ memcpy(&_objs[idx1], &_objs[idx2], sizeof(tmpOd));
+ memcpy(&_objs[idx2], &tmpOd, sizeof(tmpOd));
+}
+
void ScummEngine_v6he::o6_actorOps() {
Actor *a;
int i, j, k;
More information about the Scummvm-git-logs
mailing list