Skip to content

Commit

Permalink
DIRECTOR: Lingo: More documentation for D3 differences
Browse files Browse the repository at this point in the history
  • Loading branch information
sev- committed Jan 10, 2017
1 parent 2c69ffc commit 5ee5102
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 1 deletion.
33 changes: 33 additions & 0 deletions engines/director/lingo/lingo-builtins.cpp
Expand Up @@ -75,6 +75,8 @@ static struct BuiltinProto {
// play // D2
{ "playAccel", Lingo::b_playAccel, -1,0, false }, // D2
// play done // D2
{ "preLoad", Lingo::b_preLoad, -1,0, false }, // D3
{ "preLoadCast", Lingo::b_preLoadCast, -1,0, false }, // D3
{ "quit", Lingo::b_quit, 0, 0, false }, // D2
{ "restart", Lingo::b_restart, 0, 0, false }, // D2
{ "shutDown", Lingo::b_shutDown, 0, 0, false }, // D2
Expand Down Expand Up @@ -136,6 +138,7 @@ static struct BuiltinProto {
{ "return", Lingo::b_return, 0, 0, false }, // D2
{ "tab", Lingo::b_tab, 0, 0, false }, // D2
{ "true", Lingo::b_true, 0, 0, false }, // D2
{ "version", Lingo::b_version, 0, 0, false }, // D3
// References
{ "field", Lingo::b_field, 1, 1, false }, // D3
{ "me", Lingo::b_me, -1,0, false }, // D3
Expand Down Expand Up @@ -526,6 +529,18 @@ void Lingo::b_playAccel(int nargs) {
g_lingo->dropStack(nargs);
}

void Lingo::b_preLoad(int nargs) {
g_lingo->printStubWithArglist("b_preLoad", nargs);

g_lingo->dropStack(nargs);
}

void Lingo::b_preLoadCast(int nargs) {
g_lingo->printStubWithArglist("b_preLoadCast", nargs);

g_lingo->dropStack(nargs);
}

void Lingo::b_printFrom(int nargs) {
g_lingo->printStubWithArglist("b_printFrom", nargs);

Expand Down Expand Up @@ -851,13 +866,31 @@ void Lingo::b_true(int nargs) {
g_lingo->push(Datum(1));
}

void Lingo::b_version(int nargs) {
g_lingo->push(Datum(g_director->getVersion()));
}

///////////////////
// Factory
///////////////////
void Lingo::b_factory(int nargs) {
// This is intentionally empty
}

// TODO:
// List of predefined methods in D3
// mAtFrame
// mDescribe
// mDispose
// mGet
// mInstanceRespondsTo
// mMessageList
// mName
// mNew
// mPerform
// mPut
// mRespondsTo

void Lingo::factoryCall(Common::String &name, int nargs) {
Common::String s("factoryCall: ");

Expand Down
4 changes: 3 additions & 1 deletion engines/director/lingo/lingo-the.cpp
Expand Up @@ -44,7 +44,7 @@ TheEntity entities[] = {
{ kTheDoubleClick, "doubleClick", false }, // D2 f
{ kTheExitLock, "exitLock", false }, // D2 p
{ kTheFixStageSize, "fixStageSize", false }, // D2 p
{ kTheFloatPrecision, "floatPrecision", false },
{ kTheFloatPrecision, "floatPrecision", false }, // D3 p
{ kTheFrame, "frame", false }, // D2 f
{ kTheFreeBlock, "freeBlock", false }, // D2 f
{ kTheFreeBytes, "freeBytes", false }, // D2 f
Expand All @@ -54,6 +54,7 @@ TheEntity entities[] = {
{ kTheKey, "key", false }, // D2 f
{ kTheKeyCode, "keyCode", false }, // D2 f
{ kTheKeyDownScript, "keyDownScript", false }, // D2 p
{ kTheLabelList, "labelList", false }, // D3 f
{ kTheLastClick, "lastClick", false }, // D2 f
{ kTheLastEvent, "lastEvent", false }, // D2 f
{ kTheLastFrame, "lastFrame", false },
Expand Down Expand Up @@ -95,6 +96,7 @@ TheEntity entities[] = {
{ kTheSqrt, "sqrt", false }, // D2 f
{ kTheStage, "stage", false },
{ kTheStageBottom, "stageBottom", false }, // D2 f
{ kTheStageColor, "stageColor", false }, // D3 p
{ kTheStageLeft, "stageLeft", false }, // D2 f
{ kTheStageRight, "stageRight", false }, // D2 f
{ kTheStageTop, "stageTop", false }, // D2 f
Expand Down
2 changes: 2 additions & 0 deletions engines/director/lingo/lingo-the.h
Expand Up @@ -70,6 +70,7 @@ enum TheEntityType {
kTheKey,
kTheKeyDownScript,
kTheKeyCode,
kTheLabelList,
kTheLastClick,
kTheLastEvent,
kTheLastFrame,
Expand Down Expand Up @@ -107,6 +108,7 @@ enum TheEntityType {
kTheRomanLingo,
kTheStage,
kTheStageBottom,
kTheStageColor,
kTheStageLeft,
kTheStageRight,
kTheStageTop
Expand Down
3 changes: 3 additions & 0 deletions engines/director/lingo/lingo.h
Expand Up @@ -358,6 +358,8 @@ class Lingo {
static void b_nothing(int nargs);
static void b_pause(int nargs);
static void b_playAccel(int nargs);
static void b_preLoad(int nargs);
static void b_preLoadCast(int nargs);
static void b_quit(int nargs);
static void b_restart(int nargs);
static void b_shutDown(int nargs);
Expand Down Expand Up @@ -393,6 +395,7 @@ class Lingo {
static void b_return(int nargs);
static void b_tab(int nargs);
static void b_true(int nargs);
static void b_version(int nargs);

static void b_factory(int nargs);
void factoryCall(Common::String &name, int nargs);
Expand Down

0 comments on commit 5ee5102

Please sign in to comment.