diff options
author | Travis Howell | 2005-04-10 06:17:49 +0000 |
---|---|---|
committer | Travis Howell | 2005-04-10 06:17:49 +0000 |
commit | 5b802a03e5c248ae14eab01233a86132ac278db4 (patch) | |
tree | 38ef25fc3874cb8f1678ea7e07a986806ea3955b | |
parent | 02a724a619b027c4f1fbaaf148064c33c0c4fce1 (diff) | |
download | scummvm-rg350-5b802a03e5c248ae14eab01233a86132ac278db4.tar.gz scummvm-rg350-5b802a03e5c248ae14eab01233a86132ac278db4.tar.bz2 scummvm-rg350-5b802a03e5c248ae14eab01233a86132ac278db4.zip |
Enable object lock/unlock in HE 100 too.
Add comments
svn-id: r17503
-rw-r--r-- | scumm/script_v100he.cpp | 19 | ||||
-rw-r--r-- | scumm/script_v7he.cpp | 19 |
2 files changed, 25 insertions, 13 deletions
diff --git a/scumm/script_v100he.cpp b/scumm/script_v100he.cpp index 19f893c22a..3430936c68 100644 --- a/scumm/script_v100he.cpp +++ b/scumm/script_v100he.cpp @@ -1075,7 +1075,7 @@ void ScummEngine_v100he::o100_setSpriteGroupInfo() { } void ScummEngine_v100he::o100_resourceRoutines() { - int obj, objidx, room; + int objidx, room; byte subOp = fetchScriptByte(); @@ -1098,9 +1098,8 @@ void ScummEngine_v100he::o100_resourceRoutines() { 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 @@ void ScummEngine_v100he::o100_resourceRoutines() { 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 @@ void ScummEngine_v100he::o100_resourceRoutines() { // 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 @@ void ScummEngine_v100he::o100_resourceRoutines() { 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); } diff --git a/scumm/script_v7he.cpp b/scumm/script_v7he.cpp index ec5561edcc..8b635f0d45 100644 --- a/scumm/script_v7he.cpp +++ b/scumm/script_v7he.cpp @@ -603,12 +603,25 @@ void ScummEngine_v70he::o70_resourceRoutines() { 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 @@ void ScummEngine_v70he::o70_resourceRoutines() { 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 @@ void ScummEngine_v70he::o70_resourceRoutines() { 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 |