aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSven Hesse2009-07-17 00:55:42 +0000
committerSven Hesse2009-07-17 00:55:42 +0000
commit922f721108b2a77c47add7055ff4fb5119f1c745 (patch)
tree9987884340d08d18b3df174ca4af64b61e90e2f1
parentcff307e55db7cfe088885214bfc75b545223f9bd (diff)
downloadscummvm-rg350-922f721108b2a77c47add7055ff4fb5119f1c745.tar.gz
scummvm-rg350-922f721108b2a77c47add7055ff4fb5119f1c745.tar.bz2
scummvm-rg350-922f721108b2a77c47add7055ff4fb5119f1c745.zip
Added some more debug warnings when resources can't be loaded
svn-id: r42551
-rw-r--r--engines/gob/resources.cpp16
1 files changed, 13 insertions, 3 deletions
diff --git a/engines/gob/resources.cpp b/engines/gob/resources.cpp
index a16514fcbc..eeb880485f 100644
--- a/engines/gob/resources.cpp
+++ b/engines/gob/resources.cpp
@@ -588,15 +588,22 @@ Resource *Resources::getTOTResource(uint16 id) const {
if (totItem.type == kResourceTOT)
data = getTOTData(totItem);
- if (!data)
+ if (!data) {
+ warning("Failed to load TOT resource (%s, %d/%d, %d)",
+ _totFile.c_str(), id, _totResourceTable->itemsCount - 1, totItem.type);
return 0;
+ }
return new Resource(data, totItem.size, false, totItem.width, totItem.height);
}
Resource *Resources::getEXTResource(uint16 id) const {
- if (!_extResourceTable || (id > _extResourceTable->itemsCount))
+ if (!_extResourceTable || (id > _extResourceTable->itemsCount)) {
+ warning("Trying to load non-existent EXT resource (%s, %d/%d)",
+ _totFile.c_str(), id,
+ _extResourceTable ? (_extResourceTable->itemsCount - 1) : -1);
return 0;
+ }
EXTResourceItem &extItem = _extResourceTable->items[id];
@@ -617,8 +624,11 @@ Resource *Resources::getEXTResource(uint16 id) const {
if (extItem.type == kResourceEX)
data = getEXData(extItem, size);
- if (!data)
+ if (!data) {
+ warning("Failed to load EXT resource (%s, %d/%d, %d)",
+ _totFile.c_str(), id, _extResourceTable->itemsCount - 1, extItem.type);
return 0;
+ }
if (extItem.packed) {
byte *packedData = data;