aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorEugene Sandulenko2013-06-09 13:33:22 +0300
committerEugene Sandulenko2013-09-06 14:48:10 +0300
commitda00b7143e08a0ed95142e4401896bd7653b04ab (patch)
tree1a96639889ce2dbb11db0df0a51316ffef094be9 /engines
parent0b1bda78fc5144c8ea03e597face630c29a5a88f (diff)
downloadscummvm-rg350-da00b7143e08a0ed95142e4401896bd7653b04ab.tar.gz
scummvm-rg350-da00b7143e08a0ed95142e4401896bd7653b04ab.tar.bz2
scummvm-rg350-da00b7143e08a0ed95142e4401896bd7653b04ab.zip
FULLPIPE: Add more debug output to archive loading
Diffstat (limited to 'engines')
-rw-r--r--engines/fullpipe/utils.cpp18
1 files changed, 14 insertions, 4 deletions
diff --git a/engines/fullpipe/utils.cpp b/engines/fullpipe/utils.cpp
index 5da63114b1..6534c64269 100644
--- a/engines/fullpipe/utils.cpp
+++ b/engines/fullpipe/utils.cpp
@@ -71,8 +71,18 @@ const struct {
{ 0, 0 }
};
+static const char *lookupObjectId(int id) {
+ for (int i = 0; classMap[i].name; i++) {
+ if (classMap[i].id == id)
+ return classMap[i].name;
+ }
+
+ return "";
+}
+
+
MfcArchive::MfcArchive() {
- for (int i; classMap[i].name; i++) {
+ for (int i = 0; classMap[i].name; i++) {
_classMap[classMap[i].name] = classMap[i].id;
}
@@ -87,7 +97,7 @@ CObject *MfcArchive::parseClass() {
uint obTag = readUint16LE();
- debug(0, "parseClass::obTag = %d (%04x)", obTag, obTag);
+ debug(0, "parseClass::obTag = %d (%04x) at 0x%08x", obTag, obTag, pos() - 2);
if (obTag == 0xffff) {
int schema = readUint16LE();
@@ -113,12 +123,12 @@ CObject *MfcArchive::parseClass() {
obTag &= ~0x8000;
- debug(0, "parseClass::obTag <%d>", obTag);
-
if (_objectMap.size() < obTag) {
error("Object index too big: %d at 0x%08x", obTag, pos() - 2);
}
+ debug(0, "parseClass::obTag <%s>", lookupObjectId(_objectMap[obTag]));
+
objectId = _objectMap[obTag];
}