aboutsummaryrefslogtreecommitdiff
path: root/engines/fullpipe/utils.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/fullpipe/utils.cpp')
-rw-r--r--engines/fullpipe/utils.cpp92
1 files changed, 47 insertions, 45 deletions
diff --git a/engines/fullpipe/utils.cpp b/engines/fullpipe/utils.cpp
index ee73aeaa64..3304a93667 100644
--- a/engines/fullpipe/utils.cpp
+++ b/engines/fullpipe/utils.cpp
@@ -44,14 +44,14 @@ bool CObject::loadFile(const char *fname) {
return load(archive);
}
-bool CObList::load(MfcArchive &file) {
- debug(5, "CObList::load()");
+bool ObList::load(MfcArchive &file) {
+ debug(5, "ObList::load()");
int count = file.readCount();
- debug(9, "CObList::count: %d:", count);
+ debug(9, "ObList::count: %d:", count);
for (int i = 0; i < count; i++) {
- debug(9, "CObList::[%d]", i);
+ debug(9, "ObList::[%d]", i);
CObject *t = file.readClass();
push_back(t);
@@ -60,8 +60,8 @@ bool CObList::load(MfcArchive &file) {
return true;
}
-bool CObArray::load(MfcArchive &file) {
- debug(5, "CObArray::load()");
+bool ObArray::load(MfcArchive &file) {
+ debug(5, "ObArray::load()");
int count = file.readCount();
resize(count);
@@ -75,11 +75,11 @@ bool CObArray::load(MfcArchive &file) {
return true;
}
-bool CDWordArray::load(MfcArchive &file) {
- debug(5, "CWordArray::load()");
+bool DWordArray::load(MfcArchive &file) {
+ debug(5, "DWordArray::load()");
int count = file.readCount();
- debug(9, "CDWordArray::count: %d", count);
+ debug(9, "DWordArray::count: %d", count);
resize(count);
@@ -262,34 +262,34 @@ double MfcArchive::readDouble() {
enum {
kNullObject,
- kCInteraction,
+ kInteraction,
kMessageQueue,
kExCommand,
- kCObjstateCommand,
- kCGameVar,
- kCMctlCompound,
- kCMovGraph,
- kCMovGraphLink,
- kCMovGraphNode,
- kCReactParallel,
- kCReactPolygonal
+ kObjstateCommand,
+ kGameVar,
+ kMctlCompound,
+ kMovGraph,
+ kMovGraphLink,
+ kMovGraphNode,
+ kReactParallel,
+ kReactPolygonal
};
const struct {
const char *name;
int id;
} classMap[] = {
- { "CInteraction", kCInteraction },
+ { "CInteraction", kInteraction },
{ "MessageQueue", kMessageQueue },
{ "ExCommand", kExCommand },
- { "CObjstateCommand", kCObjstateCommand },
- { "CGameVar", kCGameVar },
- { "CMctlCompound", kCMctlCompound },
- { "CMovGraph", kCMovGraph },
- { "CMovGraphLink", kCMovGraphLink },
- { "CMovGraphNode", kCMovGraphNode },
- { "CReactParallel", kCReactParallel },
- { "CReactPolygonal", kCReactPolygonal },
+ { "CObjstateCommand", kObjstateCommand },
+ { "CGameVar", kGameVar },
+ { "CMctlCompound", kMctlCompound },
+ { "CMovGraph", kMovGraph },
+ { "CMovGraphLink", kMovGraphLink },
+ { "CMovGraphNode", kMovGraphNode },
+ { "CReactParallel", kReactParallel },
+ { "CReactPolygonal", kReactPolygonal },
{ 0, 0 }
};
@@ -306,28 +306,28 @@ static CObject *createObject(int objectId) {
switch (objectId) {
case kNullObject:
return 0;
- case kCInteraction:
- return new CInteraction();
+ case kInteraction:
+ return new Interaction();
case kMessageQueue:
return new MessageQueue();
case kExCommand:
return new ExCommand();
- case kCObjstateCommand:
- return new CObjstateCommand();
- case kCGameVar:
- return new CGameVar();
- case kCMctlCompound:
- return new CMctlCompound();
- case kCMovGraph:
- return new CMovGraph();
- case kCMovGraphLink:
- return new CMovGraphLink();
- case kCMovGraphNode:
- return new CMovGraphNode();
- case kCReactParallel:
- return new CReactParallel();
- case kCReactPolygonal:
- return new CReactPolygonal();
+ case kObjstateCommand:
+ return new ObjstateCommand();
+ case kGameVar:
+ return new GameVar();
+ case kMctlCompound:
+ return new MctlCompound();
+ case kMovGraph:
+ return new MovGraph();
+ case kMovGraphLink:
+ return new MovGraphLink();
+ case kMovGraphNode:
+ return new MovGraphNode();
+ case kReactParallel:
+ return new ReactParallel();
+ case kReactPolygonal:
+ return new ReactPolygonal();
default:
error("Unknown objectId: %d", objectId);
}
@@ -396,6 +396,8 @@ CObject *MfcArchive::parseClass(bool *isCopyReturned) {
if (_objectMap.size() < obTag) {
error("Object index too big: %d at 0x%08x", obTag, pos() - 2);
}
+ debug(7, "parseClass::obTag <%s>", lookupObjectId(_objectIdMap[obTag]));
+
res = _objectMap[obTag];
*isCopyReturned = true;