From 26747d0400ae1afebf98fbf49d0d915ab3312118 Mon Sep 17 00:00:00 2001
From: Eugene Sandulenko
Date: Sun, 3 Dec 2017 19:56:21 +0100
Subject: FULLPIPE: Added more debug output to the class loading
---
engines/fullpipe/messages.cpp | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)
(limited to 'engines')
diff --git a/engines/fullpipe/messages.cpp b/engines/fullpipe/messages.cpp
index f08397f2ee..48be017cf1 100644
--- a/engines/fullpipe/messages.cpp
+++ b/engines/fullpipe/messages.cpp
@@ -56,6 +56,29 @@ ExCommand::ExCommand(int16 parentId, int messageKind, int messageNum, int x, int
_parId = 0;
}
+struct exDesc {
+ byte num;
+ const char *name;
+} static const exTypes[] = {
+ { 1, "START_MOVEMENT" },
+ { 5, "SHOW" },
+ { 17, "MESSAGE" },
+ { 63, "USER" },
+ { 0, "" }
+};
+
+static const char *exCommandType2str(int type) {
+ static char buf[10];
+
+ for (int i = 0; exTypes[i].num; i++)
+ if (exTypes[i].num == type)
+ return exTypes[i].name;
+
+ snprintf(buf, 10, "%d", type);
+
+ return buf;
+}
+
bool ExCommand::load(MfcArchive &file) {
debugC(5, kDebugLoading, "ExCommand::load()");
@@ -84,6 +107,10 @@ bool ExCommand::load(MfcArchive &file) {
_objtype = kObjTypeExCommand;
+ debugC(6, kDebugLoading, "%% ",
+ _parentId, exCommandType2str(_messageKind), _x, _y, _field_14, _sceneClickX, _sceneClickY, _field_20, _field_24, _param, _field_2C,
+ _field_30, _field_34, _messageNum, _excFlags, _parId);
+
return true;
}
@@ -213,6 +240,8 @@ bool ObjstateCommand::load(MfcArchive &file) {
_objCommandName = file.readPascalString();
+ debugC(6, kDebugLoading, "%% ", transCyrillic(_objCommandName.c_str()), _value);
+
return true;
}
--
cgit v1.2.3