diff options
author | Eugene Sandulenko | 2017-01-13 00:03:42 +0100 |
---|---|---|
committer | Eugene Sandulenko | 2017-01-13 00:03:42 +0100 |
commit | 042f5cc2cad6206e47a77a6164185de11b18b10f (patch) | |
tree | b777606a8385345713de5ae1bb0ff1582e239660 /engines/director | |
parent | d34e5266edc86c8680a3eb314d711b6d10bf171b (diff) | |
download | scummvm-rg350-042f5cc2cad6206e47a77a6164185de11b18b10f.tar.gz scummvm-rg350-042f5cc2cad6206e47a77a6164185de11b18b10f.tar.bz2 scummvm-rg350-042f5cc2cad6206e47a77a6164185de11b18b10f.zip |
DIRECTOR: Lingo: Added stubs of List functions in D4
Diffstat (limited to 'engines/director')
-rw-r--r-- | engines/director/lingo/lingo-builtins.cpp | 159 | ||||
-rw-r--r-- | engines/director/lingo/lingo-the.cpp | 1 | ||||
-rw-r--r-- | engines/director/lingo/lingo-the.h | 106 | ||||
-rw-r--r-- | engines/director/lingo/lingo.h | 26 |
4 files changed, 234 insertions, 58 deletions
diff --git a/engines/director/lingo/lingo-builtins.cpp b/engines/director/lingo/lingo-builtins.cpp index f26990caa2..4d3b7ddf5b 100644 --- a/engines/director/lingo/lingo-builtins.cpp +++ b/engines/director/lingo/lingo-builtins.cpp @@ -55,6 +55,31 @@ static struct BuiltinProto { { "offset", Lingo::b_offset, 2, 2, true }, // D2 { "string", Lingo::b_string, 1, 1, true }, // D2 { "value", Lingo::b_value, 1, 1, true }, // D2 + // Lists + { "add", Lingo::b_add, 2, 2, false }, // D4 + { "addAt", Lingo::b_addAt, 3, 3, false }, // D4 + { "addProp", Lingo::b_addProp, 3, 3, false }, // D4 + { "append", Lingo::b_append, 2, 2, false }, // D4 + { "count", Lingo::b_count, 1, 1, true }, // D4 + { "deleteAt", Lingo::b_deleteAt, 2, 2, false }, // D4 + { "deleteProp", Lingo::b_deleteProp, 2, 2, false }, // D4 + { "findPos", Lingo::b_findPos, 2, 2, true }, // D4 + { "findPosNear", Lingo::b_findPosNear, 2, 2, true }, // D4 + { "getaProp", Lingo::b_getaProp, 2, 2, true }, // D4 + { "getAt", Lingo::b_getAt, 2, 2, true }, // D4 + { "getLast", Lingo::b_getLast, 1, 1, true }, // D4 + { "getOne", Lingo::b_getOne, 2, 2, true }, // D4 + { "getPos", Lingo::b_getPos, 2, 2, true }, // D4 + { "getProp", Lingo::b_getProp, 2, 2, true }, // D4 + { "getPropAt", Lingo::b_getPropAt, 2, 2, true }, // D4 + { "list", Lingo::b_list, -1, 0, true }, // D4 + { "listP", Lingo::b_listP, 1, 1, true }, // D4 + { "max", Lingo::b_max, 1, 1, true }, // D4 + { "min", Lingo::b_min, 1, 1, true }, // D4 + { "setaProp", Lingo::b_setaProp, 3, 3, false }, // D4 + { "setAt", Lingo::b_setAt, 3, 3, false }, // D4 + { "setProp", Lingo::b_setProp, 3, 3, false }, // D4 + { "sort", Lingo::b_sort, 1, 1, false }, // D4 // Files { "closeDA", Lingo::b_closeDA, 0, 0, false }, // D2 { "closeResFile", Lingo::b_closeResFile, 0, 1, false }, // D2 @@ -68,6 +93,7 @@ static struct BuiltinProto { { "showXlib", Lingo::b_showXlib, 0, 1, false }, // D2 { "xFactoryList", Lingo::b_xFactoryList, 1, 1, true }, // D3 // Control + { "abort", Lingo::b_abort, 0, 0, false }, // D4 { "continue", Lingo::b_continue, 0, 0, false }, // D2 { "dontPassEvent", Lingo::b_dontPassEvent, 0, 0, false }, // D2 { "delay", Lingo::b_delay, 1, 1, false }, // D2 @@ -89,7 +115,7 @@ static struct BuiltinProto { // when timeOut // D2 // Types { "floatP", Lingo::b_floatP, 1, 1, true }, // D3 - { "ilk", Lingo::b_ilk, 1, 2, true }, // D4 + { "ilk", Lingo::b_ilk, 1, 2, false }, // D4 { "integerp", Lingo::b_integerp, 1, 1, true }, // D2 { "objectp", Lingo::b_objectp, 1, 1, true }, // D2 { "stringp", Lingo::b_stringp, 1, 1, true }, // D2 @@ -436,6 +462,129 @@ void Lingo::b_value(int nargs) { g_lingo->push(d); } +/////////////////// +// Lists +/////////////////// +void Lingo::b_add(int nargs) { + g_lingo->printStubWithArglist("b_add", nargs); + g_lingo->dropStack(nargs); +} + +void Lingo::b_addAt(int nargs) { + g_lingo->printStubWithArglist("b_addAt", nargs); + g_lingo->dropStack(nargs); +} + +void Lingo::b_addProp(int nargs) { + g_lingo->printStubWithArglist("b_addProp", nargs); + g_lingo->dropStack(nargs); +} + +void Lingo::b_append(int nargs) { + g_lingo->printStubWithArglist("b_append", nargs); + g_lingo->dropStack(nargs); +} + +void Lingo::b_count(int nargs) { + g_lingo->printStubWithArglist("b_count", nargs); + g_lingo->dropStack(nargs); +} + +void Lingo::b_deleteAt(int nargs) { + g_lingo->printStubWithArglist("b_deleteAt", nargs); + g_lingo->dropStack(nargs); +} + +void Lingo::b_deleteProp(int nargs) { + g_lingo->printStubWithArglist("b_deleteProp", nargs); + g_lingo->dropStack(nargs); +} + +void Lingo::b_findPos(int nargs) { + g_lingo->printStubWithArglist("b_findPos", nargs); + g_lingo->dropStack(nargs); +} + +void Lingo::b_findPosNear(int nargs) { + g_lingo->printStubWithArglist("b_findPosNear", nargs); + g_lingo->dropStack(nargs); +} + +void Lingo::b_getaProp(int nargs) { + g_lingo->printStubWithArglist("b_getaProp", nargs); + g_lingo->dropStack(nargs); +} + +void Lingo::b_getAt(int nargs) { + g_lingo->printStubWithArglist("b_getAt", nargs); + g_lingo->dropStack(nargs); +} + +void Lingo::b_getLast(int nargs) { + g_lingo->printStubWithArglist("b_getLast", nargs); + g_lingo->dropStack(nargs); +} + +void Lingo::b_getOne(int nargs) { + g_lingo->printStubWithArglist("b_getOne", nargs); + g_lingo->dropStack(nargs); +} + +void Lingo::b_getPos(int nargs) { + g_lingo->printStubWithArglist("b_getPos", nargs); + g_lingo->dropStack(nargs); +} + +void Lingo::b_getProp(int nargs) { + g_lingo->printStubWithArglist("b_getProp", nargs); + g_lingo->dropStack(nargs); +} + +void Lingo::b_getPropAt(int nargs) { + g_lingo->printStubWithArglist("b_getPropAt", nargs); + g_lingo->dropStack(nargs); +} + +void Lingo::b_list(int nargs) { + g_lingo->printStubWithArglist("b_list", nargs); + g_lingo->dropStack(nargs); +} + +void Lingo::b_listP(int nargs) { + g_lingo->printStubWithArglist("b_listP", nargs); + g_lingo->dropStack(nargs); +} + +void Lingo::b_max(int nargs) { + g_lingo->printStubWithArglist("b_max", nargs); + g_lingo->dropStack(nargs); +} + +void Lingo::b_min(int nargs) { + g_lingo->printStubWithArglist("b_min", nargs); + g_lingo->dropStack(nargs); +} + +void Lingo::b_setaProp(int nargs) { + g_lingo->printStubWithArglist("b_setaProp", nargs); + g_lingo->dropStack(nargs); +} + +void Lingo::b_setAt(int nargs) { + g_lingo->printStubWithArglist("b_setAt", nargs); + g_lingo->dropStack(nargs); +} + +void Lingo::b_setProp(int nargs) { + g_lingo->printStubWithArglist("b_setProp", nargs); + g_lingo->dropStack(nargs); +} + +void Lingo::b_sort(int nargs) { + g_lingo->printStubWithArglist("b_sort", nargs); + g_lingo->dropStack(nargs); +} + /////////////////// // Files @@ -531,14 +680,18 @@ void Lingo::b_xFactoryList(int nargs) { /////////////////// // Control /////////////////// -void Lingo::b_dontPassEvent(int nargs) { - warning("STUB: b_dontPassEvent"); +void Lingo::b_abort(int nargs) { + warning("STUB: b_continue"); } void Lingo::b_continue(int nargs) { warning("STUB: b_continue"); } +void Lingo::b_dontPassEvent(int nargs) { + warning("STUB: b_dontPassEvent"); +} + void Lingo::b_nothing(int nargs) { warning("STUB: b_nothing"); } diff --git a/engines/director/lingo/lingo-the.cpp b/engines/director/lingo/lingo-the.cpp index b1cf3a6326..81dc490897 100644 --- a/engines/director/lingo/lingo-the.cpp +++ b/engines/director/lingo/lingo-the.cpp @@ -29,6 +29,7 @@ namespace Director { class Sprite; TheEntity entities[] = { + { kTheActorList, "actorList", false }, // D4 property { kTheBeepOn, "beepOn", false }, // D2 property { kTheButtonStyle, "buttonStyle", false }, // D2 p { kTheCast, "cast", true }, // D3 diff --git a/engines/director/lingo/lingo-the.h b/engines/director/lingo/lingo-the.h index 9614edb404..82b679ee99 100644 --- a/engines/director/lingo/lingo-the.h +++ b/engines/director/lingo/lingo-the.h @@ -27,102 +27,98 @@ namespace Director { enum TheEntityType { kTheNOEntity = 0, - kTheDate = 1, - kTheFrame, - kTheFreeBlock, - kTheFreeBytes, - kThePathName, - kTheMenu, - kTheMenuItem, - kTheMenuItems, - kTheMenus, - kTheMovie, - kTheMouseH, - kTheMouseV, - kTheMouseDownScript, - kTheMouseUpScript, - kTheTime, - - kTheField, - - kTheChars, - kTheItems, - kTheLines, - kTheWords, - - kTheSprite, - kTheCast, - kTheCastMembers, - kThePerFrameHook, - kTheTicks, - kTheTimer, - kTheTimeoutKeydown, - kTheTimeoutLapsed, - kTheTimeoutLength, - kTheTimeoutMouse, - kTheTimeoutPlay, - kTheTimeoutScript, - kTheWindow, - + kTheActorList = 1, kTheBeepOn, kTheButtonStyle, + kTheCast, + kTheCastMembers, kTheCenterStage, + kTheChars, kTheCheckBoxAccess, kTheCheckBoxType, kTheClickOn, - kTheControlDown, + kTheColorDepth, + kTheColorQD, kTheCommandDown, + kTheControlDown, + kTheDate, kTheDoubleClick, + kTheExitLock, + kTheField, kTheFixStageSize, + kTheFloatPrecision, + kTheFrame, + kTheFreeBlock, + kTheFreeBytes, kTheFullColorPermit, kTheImageDirect, + kTheItemDelimiter, + kTheItems, kTheKey, - kTheKeyDownScript, kTheKeyCode, + kTheKeyDownScript, kTheLabelList, kTheLastClick, kTheLastEvent, kTheLastFrame, kTheLastKey, kTheLastRoll, + kTheLines, kTheMachineType, kTheMemorySize, + kTheMenu, + kTheMenuItem, + kTheMenuItems, + kTheMenus, kTheMouseCast, kTheMouseChar, kTheMouseDown, + kTheMouseDownScript, + kTheMouseH, kTheMouseItem, kTheMouseLine, kTheMouseUp, + kTheMouseUpScript, + kTheMouseV, kTheMouseWord, + kTheMovie, + kTheMultiSound, kTheOptionDown, + kThePathName, kThePauseState, - kTheRightMouseUp, - kTheRightMouseDown, - kTheSoundEnabled, - kTheSoundLevel, - kTheStillDown, - kTheSwitchColorDepth, + kThePerFrameHook, + kThePreloadEventAbort, kTheResult, + kTheRightMouseDown, + kTheRightMouseUp, + kTheRomanLingo, kTheSelection, kTheSelEnd, kTheSelStart, kTheShiftDown, + kTheSoundEnabled, + kTheSoundLevel, + kTheSprite, kTheSqrt, - - kTheColorDepth, - kTheColorQD, - kTheExitLock, - kTheFloatPrecision, - kTheItemDelimiter, - kTheMultiSound, - kThePreloadEventAbort, - kTheRomanLingo, kTheStage, kTheStageBottom, kTheStageColor, kTheStageLeft, kTheStageRight, - kTheStageTop + kTheStageTop, + kTheStillDown, + kTheSwitchColorDepth, + kTheTicks, + kTheTime, + kTheTimeoutKeydown, + kTheTimeoutLapsed, + kTheTimeoutLength, + kTheTimeoutMouse, + kTheTimeoutPlay, + kTheTimeoutScript, + kTheTimer, + kTheWindow, + kTheWords }; enum TheFieldType { diff --git a/engines/director/lingo/lingo.h b/engines/director/lingo/lingo.h index dc796d7760..4cd7b3c11e 100644 --- a/engines/director/lingo/lingo.h +++ b/engines/director/lingo/lingo.h @@ -335,6 +335,31 @@ public: static void b_offset(int nargs); static void b_string(int nargs); + static void b_add(int nargs); + static void b_addAt(int nargs); + static void b_addProp(int nargs); + static void b_append(int nargs); + static void b_count(int nargs); + static void b_deleteAt(int nargs); + static void b_deleteProp(int nargs); + static void b_findPos(int nargs); + static void b_findPosNear(int nargs); + static void b_getaProp(int nargs); + static void b_getAt(int nargs); + static void b_getLast(int nargs); + static void b_getOne(int nargs); + static void b_getPos(int nargs); + static void b_getProp(int nargs); + static void b_getPropAt(int nargs); + static void b_list(int nargs); + static void b_listP(int nargs); + static void b_max(int nargs); + static void b_min(int nargs); + static void b_setaProp(int nargs); + static void b_setAt(int nargs); + static void b_setProp(int nargs); + static void b_sort(int nargs); + static void b_floatP(int nargs); static void b_ilk(int nargs); static void b_integerp(int nargs); @@ -370,6 +395,7 @@ public: static void b_updateStage(int nargs); static void b_zoomBox(int nargs); + static void b_abort(int nargs); static void b_continue(int nargs); static void b_dontPassEvent(int nargs); static void b_delay(int nargs); |