aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2017-02-17 18:51:09 +0100
committerEugene Sandulenko2017-02-17 18:51:09 +0100
commitfb7992568fb9a93c17eef16d9c0bfa0d55e237e0 (patch)
tree7b3f71fd34038f6f19567f59ccb971b78574e695
parentc5295a1e03c4fc917d87341918a515594fe89ba2 (diff)
downloadscummvm-rg350-fb7992568fb9a93c17eef16d9c0bfa0d55e237e0.tar.gz
scummvm-rg350-fb7992568fb9a93c17eef16d9c0bfa0d55e237e0.tar.bz2
scummvm-rg350-fb7992568fb9a93c17eef16d9c0bfa0d55e237e0.zip
DIRECTOR: Beutify debug output
-rw-r--r--engines/director/lingo/lingo.cpp4
-rw-r--r--engines/director/score.cpp18
-rw-r--r--engines/director/score.h2
3 files changed, 22 insertions, 2 deletions
diff --git a/engines/director/lingo/lingo.cpp b/engines/director/lingo/lingo.cpp
index a37b66f360..759d40e819 100644
--- a/engines/director/lingo/lingo.cpp
+++ b/engines/director/lingo/lingo.cpp
@@ -247,7 +247,7 @@ void Lingo::executeScript(ScriptType type, uint16 id) {
return;
}
- debugC(2, kDebugLingoExec, "Executing script type: %d, id: %d", type, id);
+ debugC(2, kDebugLingoExec, "Executing script type: %s, id: %d", scriptType2str(type), id);
_currentScript = _scripts[type][id];
_pc = 0;
@@ -294,7 +294,7 @@ void Lingo::processEvent(LEvent event, ScriptType st, int entityId) {
if (entityId <= 0)
return;
- debugC(1, kDebugEvents, "Lingo::processEvent(%s, %d, %d)", _eventHandlerTypes[event], st, entityId);
+ debugC(1, kDebugEvents, "Lingo::processEvent(%s, %s, %d)", _eventHandlerTypes[event], scriptType2str(st), entityId);
_currentEntityId = entityId;
diff --git a/engines/director/score.cpp b/engines/director/score.cpp
index d4bebdc0fc..2544a612c0 100644
--- a/engines/director/score.cpp
+++ b/engines/director/score.cpp
@@ -41,6 +41,24 @@
namespace Director {
+const char *scriptTypes[] = {
+ "MovieScript",
+ "SpriteScript",
+ "FrameScript",
+ "CastScript"
+};
+
+const char *scriptType2str(ScriptType scr) {
+ if (scr < 0)
+ return "NoneScript";
+
+ if (scr > kMaxScriptType)
+ return "<unknown>";
+
+ return scriptTypes[scr];
+}
+
+
Score::Score(DirectorEngine *vm, Archive *archive) {
_vm = vm;
_surface = new Graphics::ManagedSurface;
diff --git a/engines/director/score.h b/engines/director/score.h
index 61d911800e..6db5e33988 100644
--- a/engines/director/score.h
+++ b/engines/director/score.h
@@ -52,6 +52,8 @@ enum ScriptType {
kMaxScriptType = 3
};
+const char *scriptType2str(ScriptType scr);
+
class Score {
public:
Score(DirectorEngine *vm, Archive *);