aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 *);