[Scummvm-cvs-logs] CVS: scummvm/scumm script_v8.cpp,2.104,2.105
James Brown
ender at users.sourceforge.net
Sat Jan 11 11:22:02 CET 2003
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1:/tmp/cvs-serv21460/scumm
Modified Files:
script_v8.cpp
Log Message:
Fix lock/unlock object
Index: script_v8.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v8.cpp,v
retrieving revision 2.104
retrieving revision 2.105
diff -u -d -r2.104 -r2.105
--- script_v8.cpp 10 Jan 2003 17:21:22 -0000 2.104
+++ script_v8.cpp 11 Jan 2003 19:21:38 -0000 2.105
@@ -1325,22 +1325,34 @@
int len = getStackList(args, sizeof(args) / sizeof(args[0]));
switch (args[0]) {
- case 11: // lockObject
-// warning("o8_kernelSetFunctions: lockObject(%d)", args[1]);
- lock(rtFlObject, args[1]); // FIXME - no idea if this is right?
-// getObjectIndex(args[1]);
+ case 11: { // lockObject
+ int objidx = getObjectIndex(args[1]);
+ if (objidx == -1) {
+ warning("Cannot find object %d to lock\n", args[1]);
+ break;
+ }
+
+ lock(rtFlObject, objidx);
+
// if (ObjData.field28 != 0) {
// ObjData.field32 = 1;
// }
break;
- case 12: // unlockObject
- warning("o8_kernelSetFunctions: unlockObject(%d)", args[1]);
- unlock(rtFlObject, args[1]); // FIXME - no idea if this is right?
-// getObjectIndex(args[1]);
+ }
+ case 12: { // unlockObject
+ int objidx = getObjectIndex(args[1]);
+ if (objidx == -1) {
+ warning("Cannot find object %d to unlock\n", args[1]);
+ break;
+ }
+
+ unlock(rtFlObject, objidx);
+
// if (ObjData.field28 != 0) {
// ObjData.field32 = 0;
// }
break;
+ }
case 13: // remapCostume
a = derefActorSafe(args[1], "o8_kernelSetFunctions:remapCostume");
assert(a);
More information about the Scummvm-git-logs
mailing list