aboutsummaryrefslogtreecommitdiff
path: root/scumm/resource.cpp
diff options
context:
space:
mode:
authorTravis Howell2004-08-30 00:10:36 +0000
committerTravis Howell2004-08-30 00:10:36 +0000
commit704ad7f63b70cfe90d968127bf7140a590f79d9f (patch)
tree3c20a55ef33e697c2390da35d0d539379a1d3177 /scumm/resource.cpp
parentc7a7f00577e610e349d088f67acb5c7b9f12b9ba (diff)
downloadscummvm-rg350-704ad7f63b70cfe90d968127bf7140a590f79d9f.tar.gz
scummvm-rg350-704ad7f63b70cfe90d968127bf7140a590f79d9f.tar.bz2
scummvm-rg350-704ad7f63b70cfe90d968127bf7140a590f79d9f.zip
Correct resource value, to match original.
Adjust rtLast svn-id: r14833
Diffstat (limited to 'scumm/resource.cpp')
-rw-r--r--scumm/resource.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/scumm/resource.cpp b/scumm/resource.cpp
index 599a2c6525..7fc256c688 100644
--- a/scumm/resource.cpp
+++ b/scumm/resource.cpp
@@ -2033,7 +2033,7 @@ byte *ScummEngine::createResource(int type, int idx, uint32 size) {
}
bool ScummEngine::validateResource(const char *str, int type, int idx) const {
- if (type < rtFirst || type > 19 || (uint) idx >= (uint) res.num[type]) {
+ if (type < rtFirst || type > rtLast || (uint) idx >= (uint) res.num[type]) {
warning("%s Illegal Glob type %s (%d) num %d", str, resTypeFromId(type), type, idx);
return false;
}
@@ -2669,12 +2669,16 @@ const char *resTypeFromId(int id) {
return "Matrix";
case rtBox:
return "Box";
- case rtLast:
- return "Last";
- case rtNumTypes:
- return "NumTypes";
+ case rtObjectName:
+ return "ObjectName";
+ case rtRoomScripts:
+ return "RoomScripts";
+ case rtRoomImage:
+ return "RoomImage";
case rtImage:
return "Image";
+ case rtNumTypes:
+ return "NumTypes";
default:
sprintf(buf, "%d", id);
return buf;