aboutsummaryrefslogtreecommitdiff
path: root/scumm/script_v2.cpp
diff options
context:
space:
mode:
authorTravis Howell2003-09-06 08:46:36 +0000
committerTravis Howell2003-09-06 08:46:36 +0000
commit52a59049c793b63e52485330adfcfde749391ffd (patch)
treee483a9eb1ea1ba48c03ad46190462f11699f5090 /scumm/script_v2.cpp
parentd1c325a8c72d3b92fdee4d606a40fd320a82dc7e (diff)
downloadscummvm-rg350-52a59049c793b63e52485330adfcfde749391ffd.tar.gz
scummvm-rg350-52a59049c793b63e52485330adfcfde749391ffd.tar.bz2
scummvm-rg350-52a59049c793b63e52485330adfcfde749391ffd.zip
Other v1/v2 resources are invalid, checked again v1 maniac and v1/v2 zak.
svn-id: r10040
Diffstat (limited to 'scumm/script_v2.cpp')
-rw-r--r--scumm/script_v2.cpp24
1 files changed, 8 insertions, 16 deletions
diff --git a/scumm/script_v2.cpp b/scumm/script_v2.cpp
index 244fc03dab..1ac7dc1b14 100644
--- a/scumm/script_v2.cpp
+++ b/scumm/script_v2.cpp
@@ -767,11 +767,11 @@ void Scumm_v2::o2_drawObject() {
void Scumm_v2::o2_resourceRoutines() {
const ResTypes resTypes[] = {
- rtNumTypes, // Unknown / invalid
- rtNumTypes, // Unknown / invalid
+ rtNumTypes, // Invalid
+ rtNumTypes, // Invalid
rtCostume,
rtRoom,
- rtNumTypes, // Unknown / invalid
+ rtNumTypes, // Invalid
rtScript,
rtSound
};
@@ -782,24 +782,16 @@ void Scumm_v2::o2_resourceRoutines() {
if (0 <= (opcode >> 4) && (opcode >> 4) < (int)ARRAYSIZE(resTypes))
type = resTypes[opcode >> 4];
- if (type == rtNumTypes) {
- warning("o2_resourceRoutines: unknown restype %d", (opcode >> 4));
+ if (type == rtNumTypes)
return;
- }
- if (((opcode & 0x0f) == 0) || ((opcode & 0x0f) == 1)) {
- if (opcode & 1) {
- ensureResourceLoaded(type, resid);
- } else {
- // Seems the nuke opcodes do nothing?
- warning("o2_resourceRoutines: nuking resType %d, id %d does nothing", type, resid);
- }
+ if ((opcode & 0x0f) == 1) {
+ ensureResourceLoaded(type, resid);
} else {
- if (opcode & 1) {
+ if (opcode & 1)
lock(type, resid);
- } else {
+ else
unlock(type, resid);
- }
}
}