[Scummvm-cvs-logs] CVS: scummvm/scumm script_v100he.cpp,2.117,2.118 script_v7he.cpp,2.141,2.142
kirben
kirben at users.sourceforge.net
Sat Apr 9 23:18:13 CEST 2005
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4184/scumm
Modified Files:
script_v100he.cpp script_v7he.cpp
Log Message:
Enable object lock/unlock in HE 100 too.
Add comments
Index: script_v100he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v100he.cpp,v
retrieving revision 2.117
retrieving revision 2.118
diff -u -d -r2.117 -r2.118
--- script_v100he.cpp 9 Apr 2005 06:39:20 -0000 2.117
+++ script_v100he.cpp 10 Apr 2005 06:17:49 -0000 2.118
@@ -1075,7 +1075,7 @@
}
void ScummEngine_v100he::o100_resourceRoutines() {
- int obj, objidx, room;
+ int objidx, room;
byte subOp = fetchScriptByte();
@@ -1098,9 +1098,8 @@
break;
case 47:
if (_heResType == rtFlObject) {
- obj = _heResId;
- room= getObjectRoom(obj);
- loadFlObject(obj, room);
+ room = getObjectRoom(_heResId);
+ loadFlObject(_heResId, room);
} else if (_heResType == rtCharset) {
loadCharset(_heResId);
} else {
@@ -1127,8 +1126,9 @@
if (_heResType == rtFlObject) {
objidx = getObjectIndex(_heResId);
- //assert(objidx != -1);
- //res.lock(_heResType, objidx);
+ if (objidx == -1)
+ break;
+ res.lock(rtFlObject, _objs[objidx].fl_object_index);
} else {
res.lock(_heResType, _heResId);
}
@@ -1144,7 +1144,7 @@
// Heap related
break;
case 136:
- debug(5,"stub queueload (%d) resource %d", _heResType, _heResId);
+ // Queue loading
break;
case 137:
if (_heResType == rtScript && _heResId >= _numGlobalScripts)
@@ -1152,8 +1152,9 @@
if (_heResType == rtFlObject) {
objidx = getObjectIndex(_heResId);
- //assert(objidx != -1);
- //res.unlock(_heResType, objidx);
+ if (objidx == -1)
+ break;
+ res.unlock(rtFlObject, _objs[objidx].fl_object_index);
} else {
res.unlock(_heResType, _heResId);
}
Index: script_v7he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v7he.cpp,v
retrieving revision 2.141
retrieving revision 2.142
diff -u -d -r2.141 -r2.142
--- script_v7he.cpp 9 Apr 2005 09:57:54 -0000 2.141
+++ script_v7he.cpp 10 Apr 2005 06:17:49 -0000 2.142
@@ -603,12 +603,25 @@
loadFlObject(obj, room);
break;
}
- case 120: /* queue for load */
+ case 120:
+ // Queue load script
+ resid = pop();
+ break;
case 121:
+ // Queue load sound
+ resid = pop();
+ break;
case 122:
+ // Queue load costume
+ resid = pop();
+ break;
case 123:
+ // Queue load room image
+ resid = pop();
+ break;
case 203:
- debug(5,"stub queueload (%d) resource %d", subOp, pop());
+ // Queue load image
+ resid = pop();
break;
case 159:
resid = pop();
@@ -632,7 +645,6 @@
if (objidx == -1)
break;
res.lock(rtFlObject, _objs[objidx].fl_object_index);
- debug(0,"stub o70_resourceRoutines lock object %d", resid);
break;
case 235:
resid = pop();
@@ -640,7 +652,6 @@
if (objidx == -1)
break;
res.unlock(rtFlObject, _objs[objidx].fl_object_index);
- debug(0,"stub o70_resourceRoutines unlock object %d", resid);
break;
case 239:
// Used in airport
More information about the Scummvm-git-logs
mailing list