From 57af996b4d6f4cdb468a683568cdae9056e2e6f8 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Mon, 6 Feb 2017 22:01:07 +0100 Subject: DIRECTOR: Lingo: Documented D4 "Event handlers and messages" Lingo --- engines/director/lingo/lingo-builtins.cpp | 7 +++++++ engines/director/lingo/lingo-the.cpp | 1 + engines/director/lingo/lingo-the.h | 1 + engines/director/lingo/lingo.cpp | 17 +++++++++-------- engines/director/lingo/lingo.h | 2 ++ 5 files changed, 20 insertions(+), 8 deletions(-) (limited to 'engines/director') diff --git a/engines/director/lingo/lingo-builtins.cpp b/engines/director/lingo/lingo-builtins.cpp index 123ce8cfbf..521b440887 100644 --- a/engines/director/lingo/lingo-builtins.cpp +++ b/engines/director/lingo/lingo-builtins.cpp @@ -126,6 +126,7 @@ static struct BuiltinProto { { "cursor", Lingo::b_cursor, 1, 1, false }, // D2 { "framesToHMS", Lingo::b_framesToHMS, 4, 4, false }, // D3 { "HMStoFrames", Lingo::b_HMStoFrames, 4, 4, false }, // D3 + { "param", Lingo::b_param, 1, 1, true }, // D4 f { "printFrom", Lingo::b_printFrom, -1,0, false }, // D2 // put // D2 // set // D2 @@ -771,6 +772,12 @@ void Lingo::b_HMStoFrames(int nargs) { g_lingo->push(Datum(0)); } +void Lingo::b_param(int nargs) { + g_lingo->printSTUBWithArglist("b_param", nargs); + + g_lingo->dropStack(nargs); +} + void Lingo::b_printFrom(int nargs) { g_lingo->printSTUBWithArglist("b_printFrom", nargs); diff --git a/engines/director/lingo/lingo-the.cpp b/engines/director/lingo/lingo-the.cpp index 8658e64362..8bf2303a4f 100644 --- a/engines/director/lingo/lingo-the.cpp +++ b/engines/director/lingo/lingo-the.cpp @@ -87,6 +87,7 @@ TheEntity entities[] = { { kTheMovie, "movie", false }, // D2 f { kTheMultiSound, "multiSound", false }, { kTheOptionDown, "optionDown", false }, // D2 f + { kTheParamCount, "paramCount", false }, // D4 f { kThePathName, "pathName", false }, // D2 f { kThePauseState, "pauseState", false }, // D2 f { kThePerFrameHook, "perFrameHook", false }, // D2 p diff --git a/engines/director/lingo/lingo-the.h b/engines/director/lingo/lingo-the.h index 08522b45a2..ae0c0ed210 100644 --- a/engines/director/lingo/lingo-the.h +++ b/engines/director/lingo/lingo-the.h @@ -85,6 +85,7 @@ enum TheEntityType { kTheMovie, kTheMultiSound, kTheOptionDown, + kTheParamCount, kThePathName, kThePauseState, kThePerFrameHook, diff --git a/engines/director/lingo/lingo.cpp b/engines/director/lingo/lingo.cpp index 4a9b612649..a6d3ad8979 100644 --- a/engines/director/lingo/lingo.cpp +++ b/engines/director/lingo/lingo.cpp @@ -36,18 +36,19 @@ struct EventHandlerType { const char *name; } static const eventHandlerDescs[] = { { kEventPrepareMovie, "prepareMovie" }, - { kEventStartMovie, "startMovie" }, - { kEventStopMovie, "stopMovie" }, + { kEventStartMovie, "startMovie" }, // D3? + { kEventStepMovie, "stepMovie" }, // D3? + { kEventStopMovie, "stopMovie" }, // D3? { kEventNew, "newSprite" }, { kEventBeginSprite, "beginSprite" }, { kEventEndSprite, "endSprite" }, - { kEventEnterFrame, "enterFrame" }, + { kEventEnterFrame, "enterFrame" }, // D4 { kEventPrepareFrame, "prepareFrame" }, { kEventIdle, "idle" }, { kEventStepFrame, "stepFrame"}, - { kEventExitFrame, "exitFrame" }, + { kEventExitFrame, "exitFrame" }, // D4 { kEventActivateWindow, "activateWindow" }, { kEventDeactivateWindow, "deactivateWindow" }, @@ -57,10 +58,10 @@ struct EventHandlerType { { kEventCloseWindow, "closeWindow" }, { kEventStart, "start" }, - { kEventKeyUp, "keyUp" }, - { kEventKeyDown, "keyDown" }, // D2 as when - { kEventMouseUp, "mouseUp" }, // D2 as when - { kEventMouseDown, "mouseDown" }, // D2 as when + { kEventKeyUp, "keyUp" }, // D4 + { kEventKeyDown, "keyDown" }, // D2 as when D4 + { kEventMouseUp, "mouseUp" }, // D2 w D3? + { kEventMouseDown, "mouseDown" }, // D2 w D3? { kEventRightMouseDown, "rightMouseDown" }, { kEventRightMouseUp, "rightMouseUp" }, { kEventMouseEnter, "mouseEnter" }, diff --git a/engines/director/lingo/lingo.h b/engines/director/lingo/lingo.h index b327853b39..41d423b616 100644 --- a/engines/director/lingo/lingo.h +++ b/engines/director/lingo/lingo.h @@ -36,6 +36,7 @@ namespace Director { enum LEvent { kEventPrepareMovie, kEventStartMovie, + kEventStepMovie, kEventStopMovie, kEventNew, @@ -375,6 +376,7 @@ public: static void b_cursor(int nargs); static void b_framesToHMS(int nargs); static void b_HMStoFrames(int nargs); + static void b_param(int nargs); static void b_printFrom(int nargs); static void b_showGlobals(int nargs); static void b_showLocals(int nargs); -- cgit v1.2.3