DIRECTOR: Lingo: More documentation for D3 differences

This commit is contained in:
Eugene Sandulenko 2017-01-10 00:02:45 +01:00
parent 2c69ffc3ff
commit 5ee51026c7
4 changed files with 41 additions and 1 deletions

View File

@ -75,6 +75,8 @@ static struct BuiltinProto {
// play // D2 // play // D2
{ "playAccel", Lingo::b_playAccel, -1,0, false }, // D2 { "playAccel", Lingo::b_playAccel, -1,0, false }, // D2
// play done // 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 { "quit", Lingo::b_quit, 0, 0, false }, // D2
{ "restart", Lingo::b_restart, 0, 0, false }, // D2 { "restart", Lingo::b_restart, 0, 0, false }, // D2
{ "shutDown", Lingo::b_shutDown, 0, 0, false }, // D2 { "shutDown", Lingo::b_shutDown, 0, 0, false }, // D2
@ -136,6 +138,7 @@ static struct BuiltinProto {
{ "return", Lingo::b_return, 0, 0, false }, // D2 { "return", Lingo::b_return, 0, 0, false }, // D2
{ "tab", Lingo::b_tab, 0, 0, false }, // D2 { "tab", Lingo::b_tab, 0, 0, false }, // D2
{ "true", Lingo::b_true, 0, 0, false }, // D2 { "true", Lingo::b_true, 0, 0, false }, // D2
{ "version", Lingo::b_version, 0, 0, false }, // D3
// References // References
{ "field", Lingo::b_field, 1, 1, false }, // D3 { "field", Lingo::b_field, 1, 1, false }, // D3
{ "me", Lingo::b_me, -1,0, false }, // D3 { "me", Lingo::b_me, -1,0, false }, // D3
@ -526,6 +529,18 @@ void Lingo::b_playAccel(int nargs) {
g_lingo->dropStack(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) { void Lingo::b_printFrom(int nargs) {
g_lingo->printStubWithArglist("b_printFrom", nargs); g_lingo->printStubWithArglist("b_printFrom", nargs);
@ -851,6 +866,10 @@ void Lingo::b_true(int nargs) {
g_lingo->push(Datum(1)); g_lingo->push(Datum(1));
} }
void Lingo::b_version(int nargs) {
g_lingo->push(Datum(g_director->getVersion()));
}
/////////////////// ///////////////////
// Factory // Factory
/////////////////// ///////////////////
@ -858,6 +877,20 @@ void Lingo::b_factory(int nargs) {
// This is intentionally empty // 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) { void Lingo::factoryCall(Common::String &name, int nargs) {
Common::String s("factoryCall: "); Common::String s("factoryCall: ");

View File

@ -44,7 +44,7 @@ TheEntity entities[] = {
{ kTheDoubleClick, "doubleClick", false }, // D2 f { kTheDoubleClick, "doubleClick", false }, // D2 f
{ kTheExitLock, "exitLock", false }, // D2 p { kTheExitLock, "exitLock", false }, // D2 p
{ kTheFixStageSize, "fixStageSize", false }, // D2 p { kTheFixStageSize, "fixStageSize", false }, // D2 p
{ kTheFloatPrecision, "floatPrecision", false }, { kTheFloatPrecision, "floatPrecision", false }, // D3 p
{ kTheFrame, "frame", false }, // D2 f { kTheFrame, "frame", false }, // D2 f
{ kTheFreeBlock, "freeBlock", false }, // D2 f { kTheFreeBlock, "freeBlock", false }, // D2 f
{ kTheFreeBytes, "freeBytes", false }, // D2 f { kTheFreeBytes, "freeBytes", false }, // D2 f
@ -54,6 +54,7 @@ TheEntity entities[] = {
{ kTheKey, "key", false }, // D2 f { kTheKey, "key", false }, // D2 f
{ kTheKeyCode, "keyCode", false }, // D2 f { kTheKeyCode, "keyCode", false }, // D2 f
{ kTheKeyDownScript, "keyDownScript", false }, // D2 p { kTheKeyDownScript, "keyDownScript", false }, // D2 p
{ kTheLabelList, "labelList", false }, // D3 f
{ kTheLastClick, "lastClick", false }, // D2 f { kTheLastClick, "lastClick", false }, // D2 f
{ kTheLastEvent, "lastEvent", false }, // D2 f { kTheLastEvent, "lastEvent", false }, // D2 f
{ kTheLastFrame, "lastFrame", false }, { kTheLastFrame, "lastFrame", false },
@ -95,6 +96,7 @@ TheEntity entities[] = {
{ kTheSqrt, "sqrt", false }, // D2 f { kTheSqrt, "sqrt", false }, // D2 f
{ kTheStage, "stage", false }, { kTheStage, "stage", false },
{ kTheStageBottom, "stageBottom", false }, // D2 f { kTheStageBottom, "stageBottom", false }, // D2 f
{ kTheStageColor, "stageColor", false }, // D3 p
{ kTheStageLeft, "stageLeft", false }, // D2 f { kTheStageLeft, "stageLeft", false }, // D2 f
{ kTheStageRight, "stageRight", false }, // D2 f { kTheStageRight, "stageRight", false }, // D2 f
{ kTheStageTop, "stageTop", false }, // D2 f { kTheStageTop, "stageTop", false }, // D2 f

View File

@ -70,6 +70,7 @@ enum TheEntityType {
kTheKey, kTheKey,
kTheKeyDownScript, kTheKeyDownScript,
kTheKeyCode, kTheKeyCode,
kTheLabelList,
kTheLastClick, kTheLastClick,
kTheLastEvent, kTheLastEvent,
kTheLastFrame, kTheLastFrame,
@ -107,6 +108,7 @@ enum TheEntityType {
kTheRomanLingo, kTheRomanLingo,
kTheStage, kTheStage,
kTheStageBottom, kTheStageBottom,
kTheStageColor,
kTheStageLeft, kTheStageLeft,
kTheStageRight, kTheStageRight,
kTheStageTop kTheStageTop

View File

@ -358,6 +358,8 @@ public:
static void b_nothing(int nargs); static void b_nothing(int nargs);
static void b_pause(int nargs); static void b_pause(int nargs);
static void b_playAccel(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_quit(int nargs);
static void b_restart(int nargs); static void b_restart(int nargs);
static void b_shutDown(int nargs); static void b_shutDown(int nargs);
@ -393,6 +395,7 @@ public:
static void b_return(int nargs); static void b_return(int nargs);
static void b_tab(int nargs); static void b_tab(int nargs);
static void b_true(int nargs); static void b_true(int nargs);
static void b_version(int nargs);
static void b_factory(int nargs); static void b_factory(int nargs);
void factoryCall(Common::String &name, int nargs); void factoryCall(Common::String &name, int nargs);