[Scummvm-cvs-logs] scummvm master -> 80fd795b80d9e9f5f6ca444b844d867f2172d74e
sev-
sev at scummvm.org
Wed Aug 17 00:15:30 CEST 2016
This automated email contains information about 6 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
6c0b2b50f7 DIRECTOR: Lingo: Added stubs for function up to 'n'
93beb37822 DIRECTOR: Lingo: Fix warnings
4423bb0f1d DIRECTOR: Lingo: Added stubs for functions up to 's'
9c0d910650 DIRECTOR: Lingo: Implement D2 version of 'the sqrt'
9117ca6ad3 DIRECTOR: Lingo: Added stubs for rest of the D2 functions
80fd795b80 DIRECTOR: Marked all D2 'the' functions
Commit: 6c0b2b50f7f39e82c403f14075c5da79dbf2df28
https://github.com/scummvm/scummvm/commit/6c0b2b50f7f39e82c403f14075c5da79dbf2df28
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-08-16T22:09:09+02:00
Commit Message:
DIRECTOR: Lingo: Added stubs for function up to 'n'
Changed paths:
engines/director/lingo/lingo-builtins.cpp
engines/director/lingo/lingo-the.cpp
engines/director/lingo/lingo-the.h
engines/director/lingo/lingo.h
diff --git a/engines/director/lingo/lingo-builtins.cpp b/engines/director/lingo/lingo-builtins.cpp
index e366356..54481ae 100644
--- a/engines/director/lingo/lingo-builtins.cpp
+++ b/engines/director/lingo/lingo-builtins.cpp
@@ -50,6 +50,7 @@ static struct BuiltinProto {
{ "chars", Lingo::b_chars, 3, 3, true }, // D2
{ "charToNum", Lingo::b_charToNum, 1, 1, true }, // D2
{ "length", Lingo::b_length, 1, 1, true }, // D2
+ { "numToChar", Lingo::b_numToChar, 1, 1, true }, // D2
{ "string", Lingo::b_string, 1, 1, true }, // D2
// Files
{ "closeDA", Lingo::b_closeDA, 0, 0, false }, // D2
@@ -95,6 +96,7 @@ static struct BuiltinProto {
// go // D2
{ "installMenu", Lingo::b_installMenu, 1, 1, false }, // D2
{ "label", Lingo::b_label, 1, 1, true }, // D2
+ { "marker", Lingo::b_marker, 1, 1, true }, // D2
{ "moveableSprite", Lingo::b_moveableSprite,0, 0, false }, // D2
{ "puppetPalette", Lingo::b_puppetPalette, -1,0, false }, // D2
{ "puppetSound", Lingo::b_puppetSound, -1,0, false }, // D2
@@ -343,6 +345,14 @@ void Lingo::b_length(int nargs) {
g_lingo->push(d);
}
+void Lingo::b_numToChar(int nargs) {
+ Datum d = g_lingo->pop();
+
+ d.toInt();
+
+ g_lingo->push(Datum((char)d.u.i));
+}
+
void Lingo::b_string(int nargs) {
Datum d = g_lingo->pop();
d.toString();
@@ -566,6 +576,14 @@ void Lingo::b_label(int nargs) {
g_lingo->push(Datum(0));
}
+void Lingo::b_marker(int nargs) {
+ Datum d = g_lingo->pop();
+ d.toInt();
+ warning("STUB: b_marker(%d)", d.u.i);
+
+ g_lingo->push(Datum(0));
+}
+
void Lingo::b_moveableSprite(int nargs) {
Datum d = g_lingo->pop();
warning("STUB: b_moveableSprite(%d)", d.u.i);
diff --git a/engines/director/lingo/lingo-the.cpp b/engines/director/lingo/lingo-the.cpp
index 3b00c09..e6dbb9c 100644
--- a/engines/director/lingo/lingo-the.cpp
+++ b/engines/director/lingo/lingo-the.cpp
@@ -45,6 +45,10 @@ TheEntity entities[] = {
{ kTheLastClick, "lastClick", false },
{ kTheLastEvent, "lastEvent", false },
{ kTheLastFrame, "lastFrame", false },
+ { kTheLastKey, "lastKey", false },
+ { kTheLastRoll, "lastRoll", false },
+ { kTheMachineType, "machineType", false },
+ { kTheMemorySize, "memorySize", false },
{ kTheMenu, "menu", true },
{ kTheMenus, "menus", false },
{ kTheMenuItem, "menuitem", true },
diff --git a/engines/director/lingo/lingo-the.h b/engines/director/lingo/lingo-the.h
index 7a27c0a..17ccb2f 100644
--- a/engines/director/lingo/lingo-the.h
+++ b/engines/director/lingo/lingo-the.h
@@ -52,8 +52,12 @@ enum TheEntityType {
kTheClickOn,
kTheDoubleClick,
kTheLastClick,
- kTheLastFrame,
kTheLastEvent,
+ kTheLastFrame,
+ kTheLastKey,
+ kTheLastRoll,
+ kTheMachineType,
+ kTheMemorySize,
kTheMouseDown,
kTheMouseUp,
kTheRightMouseUp,
diff --git a/engines/director/lingo/lingo.h b/engines/director/lingo/lingo.h
index 911abb6..53722d7 100644
--- a/engines/director/lingo/lingo.h
+++ b/engines/director/lingo/lingo.h
@@ -314,6 +314,7 @@ public:
static void b_chars(int nargs);
static void b_charToNum(int nargs);
static void b_length(int nargs);
+ static void b_numToChar(int nargs);
static void b_string(int nargs);
static void b_ilk(int nargs);
@@ -328,6 +329,7 @@ public:
static void b_editableText(int nargs);
static void b_installMenu(int nargs);
static void b_label(int nargs);
+ static void b_marker(int nargs);
static void b_moveableSprite(int nargs);
static void b_puppetPalette(int nargs);
static void b_puppetSound(int nargs);
Commit: 93beb378229b7a9004cf52d0432c60a38a81d952
https://github.com/scummvm/scummvm/commit/93beb378229b7a9004cf52d0432c60a38a81d952
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-08-16T23:10:19+02:00
Commit Message:
DIRECTOR: Lingo: Fix warnings
Changed paths:
engines/director/lingo/lingo-codegen.cpp
diff --git a/engines/director/lingo/lingo-codegen.cpp b/engines/director/lingo/lingo-codegen.cpp
index ff1fbed..a9659f7 100644
--- a/engines/director/lingo/lingo-codegen.cpp
+++ b/engines/director/lingo/lingo-codegen.cpp
@@ -68,8 +68,11 @@ void Lingo::execute(int pc) {
}
Common::String Lingo::decodeInstruction(int pc) {
- if (_functions.contains((void *)(*_currentScript)[pc])) {
- return _functions[(void *)(*_currentScript)[pc]]->name;
+ Symbol sym;
+
+ sym.u.func = (*_currentScript)[pc];
+ if (_functions.contains((void *)sym.u.s)) {
+ return _functions[(void *)sym.u.s]->name;
} else {
return "<unknown>";
}
Commit: 4423bb0f1ddeafb19aabd3fb4e83c83ecb8fc0bb
https://github.com/scummvm/scummvm/commit/4423bb0f1ddeafb19aabd3fb4e83c83ecb8fc0bb
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-08-16T23:51:12+02:00
Commit Message:
DIRECTOR: Lingo: Added stubs for functions up to 's'
Changed paths:
engines/director/lingo/lingo-builtins.cpp
engines/director/lingo/lingo-the.cpp
engines/director/lingo/lingo-the.h
engines/director/lingo/lingo.h
diff --git a/engines/director/lingo/lingo-builtins.cpp b/engines/director/lingo/lingo-builtins.cpp
index 54481ae..d8a8f2d 100644
--- a/engines/director/lingo/lingo-builtins.cpp
+++ b/engines/director/lingo/lingo-builtins.cpp
@@ -32,26 +32,27 @@ static struct BuiltinProto {
bool parens;
} builtins[] = {
// Math
- { "abs", Lingo::b_abs, 1, 1, true }, // D2
- { "atan", Lingo::b_atan, 1, 1, true }, // D4
- { "cos", Lingo::b_cos, 1, 1, true }, // D4
- { "exp", Lingo::b_exp, 1, 1, true }, // D4
- { "float", Lingo::b_float, 1, 1, true }, // D4
- { "integer",Lingo::b_integer, 1, 1, true },
- { "integerp",Lingo::b_integerp, 1, 1, true },
- { "log", Lingo::b_log, 1, 1, true }, // D4
- { "pi", Lingo::b_pi, 0, 0, true }, // D4
- { "power", Lingo::b_power, 2, 2, true }, // D4
- { "random", Lingo::b_random, 1, 1, true }, // D2
- { "sin", Lingo::b_sin, 1, 1, true },
- { "sqrt", Lingo::b_sqrt, 1, 1, true }, // D2
- { "tan", Lingo::b_tan, 1, 1, true }, // D4
+ { "abs", Lingo::b_abs, 1, 1, true }, // D2
+ { "atan", Lingo::b_atan, 1, 1, true }, // D4
+ { "cos", Lingo::b_cos, 1, 1, true }, // D4
+ { "exp", Lingo::b_exp, 1, 1, true }, // D4
+ { "float", Lingo::b_float, 1, 1, true }, // D4
+ { "integer", Lingo::b_integer, 1, 1, true },
+ { "integerp", Lingo::b_integerp, 1, 1, true },
+ { "log", Lingo::b_log, 1, 1, true }, // D4
+ { "pi", Lingo::b_pi, 0, 0, true }, // D4
+ { "power", Lingo::b_power, 2, 2, true }, // D4
+ { "random", Lingo::b_random, 1, 1, true }, // D2
+ { "sin", Lingo::b_sin, 1, 1, true },
+ { "sqrt", Lingo::b_sqrt, 1, 1, true }, // D2
+ { "tan", Lingo::b_tan, 1, 1, true }, // D4
// String
- { "chars", Lingo::b_chars, 3, 3, true }, // D2
- { "charToNum", Lingo::b_charToNum, 1, 1, true }, // D2
- { "length", Lingo::b_length, 1, 1, true }, // D2
- { "numToChar", Lingo::b_numToChar, 1, 1, true }, // D2
- { "string", Lingo::b_string, 1, 1, true }, // D2
+ { "chars", Lingo::b_chars, 3, 3, true }, // D2
+ { "charToNum", Lingo::b_charToNum, 1, 1, true }, // D2
+ { "length", Lingo::b_length, 1, 1, true }, // D2
+ { "numToChar", Lingo::b_numToChar, 1, 1, true }, // D2
+ { "offset", Lingo::b_offset, 2, 2, true }, // D2
+ { "string", Lingo::b_string, 1, 1, true }, // D2
// Files
{ "closeDA", Lingo::b_closeDA, 0, 0, false }, // D2
{ "closeResFile", Lingo::b_closeResFile, 0, 1, false }, // D2
@@ -87,6 +88,7 @@ static struct BuiltinProto {
{ "ilk", Lingo::b_ilk, 1, 2, true }, // D4
// put // D2
// set // D2
+ { "objectp", Lingo::b_objectp, 1, 1, true },
{ "showGlobals", Lingo::b_showGlobals, 0, 0, false }, // D2
{ "showLocals", Lingo::b_showLocals, 0, 0, false }, // D2
// Score
@@ -103,6 +105,7 @@ static struct BuiltinProto {
{ "puppetSprite", Lingo::b_puppetSprite, -1,0, false }, // D2
{ "puppetTempo", Lingo::b_puppetTempo, 1, 1, false }, // D2
{ "puppetTransition",Lingo::b_puppetTransition,-1,0, false },// D2
+ { "rollOver", Lingo::b_rollOver, 1, 1, true }, // D2
{ "spriteBox", Lingo::b_spriteBox, -1,0, false }, // D2
{ "updateStage", Lingo::b_updateStage, 0, 0, false }, // D2
{ "zoomBox", Lingo::b_zoomBox, -1,0, false }, // D2
@@ -353,6 +356,18 @@ void Lingo::b_numToChar(int nargs) {
g_lingo->push(Datum((char)d.u.i));
}
+void Lingo::b_offset(int nargs) {
+ Datum target = g_lingo->pop();
+ Datum source = g_lingo->pop();
+
+ target.toString();
+ source.toString();
+
+ warning("STUB: b_offset()");
+
+ g_lingo->push(Datum(0));
+}
+
void Lingo::b_string(int nargs) {
Datum d = g_lingo->pop();
d.toString();
@@ -522,6 +537,14 @@ void Lingo::b_cursor(int nargs) {
warning("STUB: b_cursor(%d)", d.u.i);
}
+void Lingo::b_objectp(int nargs) {
+ Datum d = g_lingo->pop();
+ int res = (d.type == OBJECT) ? 1 : 0;
+ d.toInt();
+ d.u.i = res;
+ g_lingo->push(d);
+}
+
void Lingo::b_showGlobals(int nargs) {
warning("STUB: b_showGlobals");
}
@@ -622,6 +645,13 @@ void Lingo::b_puppetTransition(int nargs) {
g_lingo->dropStack(nargs);
}
+void Lingo::b_rollOver(int nargs) {
+ Datum d = g_lingo->pop();
+ warning("STUB: b_puppetTempo(%d)", d.u.i);
+
+ g_lingo->push(Datum(0));
+}
+
void Lingo::b_spriteBox(int nargs) {
g_lingo->printStubWithArglist("b_spriteBox", nargs);
diff --git a/engines/director/lingo/lingo-the.cpp b/engines/director/lingo/lingo-the.cpp
index e6dbb9c..20bccf3 100644
--- a/engines/director/lingo/lingo-the.cpp
+++ b/engines/director/lingo/lingo-the.cpp
@@ -63,11 +63,14 @@ TheEntity entities[] = {
{ kTheMultiSound, "multiSound", false },
{ kTheOptionDown, "optionDown", false },
{ kThePathName, "pathname", false },
+ { kThePauseState, "pauseState", false },
{ kThePerFrameHook, "perframehook", false },
{ kThePreloadEventAbort,"preloadEventAbort",false },
+ { kTheResult, "result", false },
{ kTheRightMouseDown, "rightMouseDown", false },
{ kTheRightMouseUp, "rightMouseUp", false },
{ kTheRomanLingo, "romanLingo", false },
+ { kTheSelection, "selection", false },
{ kTheShiftDown, "shiftDown", false },
{ kTheSprite, "sprite", true },
{ kTheStage, "stage", false },
diff --git a/engines/director/lingo/lingo-the.h b/engines/director/lingo/lingo-the.h
index 17ccb2f..0649ebe 100644
--- a/engines/director/lingo/lingo-the.h
+++ b/engines/director/lingo/lingo-the.h
@@ -60,6 +60,7 @@ enum TheEntityType {
kTheMemorySize,
kTheMouseDown,
kTheMouseUp,
+ kThePauseState,
kTheRightMouseUp,
kTheRightMouseDown,
kTheStillDown,
@@ -67,6 +68,8 @@ enum TheEntityType {
kTheKeyCode,
kTheControlDown,
kTheCommandDown,
+ kTheResult,
+ kTheSelection,
kTheShiftDown,
kTheOptionDown,
diff --git a/engines/director/lingo/lingo.h b/engines/director/lingo/lingo.h
index 53722d7..105719e 100644
--- a/engines/director/lingo/lingo.h
+++ b/engines/director/lingo/lingo.h
@@ -315,11 +315,13 @@ public:
static void b_charToNum(int nargs);
static void b_length(int nargs);
static void b_numToChar(int nargs);
+ static void b_offset(int nargs);
static void b_string(int nargs);
static void b_ilk(int nargs);
static void b_alert(int nargs);
static void b_cursor(int nargs);
+ static void b_objectp(int nargs);
static void b_printFrom(int nargs);
static void b_showGlobals(int nargs);
static void b_showLocals(int nargs);
@@ -336,6 +338,7 @@ public:
static void b_puppetSprite(int nargs);
static void b_puppetTempo(int nargs);
static void b_puppetTransition(int nargs);
+ static void b_rollOver(int nargs);
static void b_spriteBox(int nargs);
static void b_updateStage(int nargs);
static void b_zoomBox(int nargs);
Commit: 9c0d9106509900c7faa42f2952474095a4bbbf11
https://github.com/scummvm/scummvm/commit/9c0d9106509900c7faa42f2952474095a4bbbf11
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-08-16T23:58:30+02:00
Commit Message:
DIRECTOR: Lingo: Implement D2 version of 'the sqrt'
Changed paths:
engines/director/lingo/lingo-lex.cpp
engines/director/lingo/lingo-lex.l
engines/director/lingo/lingo-the.cpp
engines/director/lingo/lingo-the.h
engines/director/lingo/tests/math.lingo
diff --git a/engines/director/lingo/lingo-lex.cpp b/engines/director/lingo/lingo-lex.cpp
index 5fbd8d8..6953c2b 100644
--- a/engines/director/lingo/lingo-lex.cpp
+++ b/engines/director/lingo/lingo-lex.cpp
@@ -364,8 +364,8 @@ static void yy_fatal_error (yyconst char msg[] );
*yy_cp = '\0'; \
(yy_c_buf_p) = yy_cp;
-#define YY_NUM_RULES 56
-#define YY_END_OF_BUFFER 57
+#define YY_NUM_RULES 57
+#define YY_END_OF_BUFFER 58
/* This struct is not used in this scanner,
but its presence is necessary. */
struct yy_trans_info
@@ -373,28 +373,30 @@ struct yy_trans_info
flex_int32_t yy_verify;
flex_int32_t yy_nxt;
};
-static yyconst flex_int16_t yy_accept[191] =
+static yyconst flex_int16_t yy_accept[199] =
{ 0,
- 0, 0, 57, 55, 3, 53, 53, 55, 55, 52,
- 52, 52, 51, 52, 52, 49, 49, 49, 49, 49,
- 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
- 49, 49, 2, 2, 3, 53, 0, 0, 0, 0,
- 0, 54, 48, 1, 50, 51, 47, 45, 46, 49,
- 49, 49, 49, 49, 49, 49, 49, 49, 49, 18,
- 8, 49, 49, 49, 49, 49, 49, 49, 27, 49,
- 29, 49, 49, 49, 49, 49, 49, 49, 49, 39,
- 49, 49, 2, 2, 0, 1, 50, 4, 49, 49,
- 49, 49, 12, 49, 49, 49, 49, 0, 49, 49,
-
- 49, 49, 49, 49, 26, 49, 49, 49, 32, 49,
- 34, 49, 49, 49, 49, 49, 49, 0, 49, 6,
- 7, 11, 14, 49, 49, 49, 0, 49, 20, 21,
- 49, 49, 49, 25, 28, 30, 49, 49, 49, 49,
- 0, 38, 43, 49, 41, 10, 49, 49, 15, 49,
- 17, 49, 22, 49, 24, 49, 49, 49, 49, 37,
- 44, 49, 0, 49, 49, 16, 49, 23, 49, 33,
- 40, 35, 0, 42, 0, 49, 13, 49, 49, 0,
- 9, 5, 49, 31, 0, 49, 0, 19, 36, 0
+ 0, 0, 58, 56, 3, 54, 54, 56, 56, 53,
+ 53, 53, 52, 53, 53, 50, 50, 50, 50, 50,
+ 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
+ 50, 50, 2, 2, 3, 54, 0, 0, 0, 0,
+ 0, 55, 49, 1, 51, 52, 48, 46, 47, 50,
+ 50, 50, 50, 50, 50, 50, 50, 50, 50, 18,
+ 8, 50, 50, 50, 50, 50, 50, 50, 27, 50,
+ 29, 50, 50, 50, 50, 50, 50, 50, 50, 40,
+ 50, 50, 2, 2, 0, 1, 51, 4, 50, 50,
+ 50, 50, 12, 50, 50, 50, 50, 0, 50, 50,
+
+ 50, 50, 50, 50, 26, 50, 50, 50, 32, 50,
+ 34, 50, 50, 50, 50, 50, 50, 0, 50, 6,
+ 7, 11, 14, 50, 50, 50, 0, 50, 20, 21,
+ 50, 50, 50, 25, 28, 30, 50, 50, 50, 50,
+ 0, 39, 44, 50, 42, 10, 50, 50, 15, 50,
+ 17, 50, 22, 50, 24, 50, 50, 50, 50, 38,
+ 38, 45, 50, 0, 50, 50, 16, 50, 23, 50,
+ 33, 41, 35, 0, 38, 43, 0, 50, 13, 50,
+ 50, 0, 38, 9, 5, 50, 31, 0, 38, 50,
+ 0, 0, 19, 37, 0, 0, 36, 0
+
} ;
static yyconst flex_int32_t yy_ec[256] =
@@ -407,12 +409,12 @@ static yyconst flex_int32_t yy_ec[256] =
11, 11, 11, 11, 11, 11, 11, 7, 1, 12,
13, 14, 1, 1, 15, 16, 17, 18, 19, 20,
21, 22, 23, 24, 24, 25, 26, 27, 28, 29,
- 24, 30, 31, 32, 33, 34, 35, 36, 37, 24,
- 1, 1, 1, 7, 38, 1, 39, 40, 41, 42,
+ 30, 31, 32, 33, 34, 35, 36, 37, 38, 24,
+ 1, 1, 1, 7, 39, 1, 40, 41, 42, 43,
- 43, 44, 45, 46, 47, 24, 24, 48, 49, 50,
- 51, 52, 24, 53, 54, 55, 56, 57, 58, 59,
- 60, 24, 1, 1, 1, 1, 1, 1, 1, 1,
+ 44, 45, 46, 47, 48, 24, 24, 49, 50, 51,
+ 52, 53, 54, 55, 56, 57, 58, 59, 60, 61,
+ 62, 24, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
@@ -429,130 +431,139 @@ static yyconst flex_int32_t yy_ec[256] =
1, 1, 1, 1, 1
} ;
-static yyconst flex_int32_t yy_meta[61] =
+static yyconst flex_int32_t yy_meta[63] =
{ 0,
1, 2, 3, 3, 2, 1, 1, 1, 1, 1,
4, 1, 1, 1, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
- 5, 5, 5, 5, 5, 5, 5, 4, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 4, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
- 5, 5, 5, 5, 5, 5, 5, 5, 5, 5
+ 5, 5
} ;
-static yyconst flex_int16_t yy_base[196] =
+static yyconst flex_int16_t yy_base[204] =
{ 0,
- 0, 59, 203, 452, 63, 67, 71, 75, 167, 452,
- 157, 154, 52, 68, 143, 56, 0, 56, 57, 67,
- 72, 68, 68, 69, 85, 102, 102, 104, 80, 119,
- 113, 120, 173, 177, 181, 452, 185, 189, 193, 102,
- 99, 452, 452, 0, 80, 129, 452, 452, 452, 0,
- 91, 120, 165, 118, 126, 146, 184, 187, 171, 96,
- 0, 172, 177, 189, 178, 177, 178, 184, 0, 188,
- 0, 202, 199, 188, 192, 192, 199, 220, 219, 0,
- 226, 208, 251, 262, 217, 0, 78, 0, 219, 227,
- 230, 239, 0, 228, 229, 242, 256, 273, 257, 250,
-
- 251, 255, 263, 256, 0, 262, 253, 258, 0, 274,
- 0, 271, 267, 304, 271, 274, 273, 284, 299, 0,
- 0, 0, 0, 279, 297, 308, 297, 296, 0, 0,
- 301, 304, 314, 0, 0, 0, 311, 320, 305, 307,
- 156, 0, 0, 322, 319, 341, 321, 320, 0, 326,
- 452, 322, 0, 327, 0, 328, 329, 344, 336, 370,
- 0, 343, 375, 344, 341, 0, 345, 0, 348, 0,
- 0, 0, 380, 0, 363, 355, 0, 372, 360, 372,
- 452, 0, 363, 0, 394, 366, 398, 0, 400, 452,
- 431, 433, 438, 442, 446
-
+ 0, 61, 156, 509, 65, 69, 73, 77, 148, 509,
+ 104, 99, 54, 70, 91, 58, 0, 58, 59, 69,
+ 74, 70, 70, 71, 88, 105, 105, 110, 82, 118,
+ 117, 130, 177, 181, 185, 509, 189, 193, 197, 106,
+ 94, 509, 509, 0, 82, 132, 509, 509, 509, 0,
+ 84, 119, 169, 116, 120, 174, 186, 191, 180, 171,
+ 0, 176, 182, 194, 181, 180, 181, 186, 0, 202,
+ 0, 208, 205, 193, 198, 197, 204, 225, 225, 0,
+ 233, 214, 258, 270, 223, 0, 80, 0, 225, 226,
+ 237, 234, 0, 233, 234, 242, 260, 278, 265, 257,
+
+ 258, 265, 271, 263, 0, 270, 260, 264, 0, 281,
+ 0, 279, 273, 303, 280, 289, 293, 297, 303, 0,
+ 0, 0, 0, 296, 307, 317, 301, 303, 0, 0,
+ 308, 309, 320, 0, 0, 0, 319, 329, 313, 314,
+ 347, 0, 0, 331, 332, 202, 333, 328, 0, 337,
+ 509, 331, 0, 347, 0, 340, 339, 347, 341, 301,
+ 372, 0, 349, 383, 357, 351, 0, 363, 0, 359,
+ 0, 0, 0, 393, 399, 0, 374, 367, 0, 392,
+ 373, 390, 409, 509, 0, 379, 0, 413, 420, 384,
+ 422, 436, 0, 441, 408, 442, 446, 509, 488, 490,
+
+ 495, 499, 503
} ;
-static yyconst flex_int16_t yy_def[196] =
+static yyconst flex_int16_t yy_def[204] =
{ 0,
- 190, 1, 190, 190, 190, 190, 190, 190, 191, 190,
- 190, 190, 190, 190, 190, 192, 192, 192, 192, 192,
- 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
- 192, 192, 190, 190, 190, 190, 190, 190, 190, 190,
- 191, 190, 190, 193, 190, 190, 190, 190, 190, 192,
- 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
- 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
- 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
- 192, 192, 190, 190, 190, 193, 190, 192, 192, 192,
- 192, 192, 192, 192, 192, 192, 192, 190, 192, 192,
-
- 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
- 192, 192, 192, 192, 192, 192, 192, 190, 192, 192,
- 192, 192, 192, 192, 192, 192, 190, 192, 192, 192,
- 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
- 194, 192, 192, 192, 192, 190, 192, 192, 192, 192,
- 190, 192, 192, 192, 192, 192, 192, 192, 192, 194,
- 192, 192, 190, 192, 192, 192, 192, 192, 192, 192,
- 192, 192, 190, 192, 190, 192, 192, 192, 192, 190,
- 190, 192, 192, 192, 190, 192, 195, 192, 195, 0,
- 190, 190, 190, 190, 190
-
+ 198, 1, 198, 198, 198, 198, 198, 198, 199, 198,
+ 198, 198, 198, 198, 198, 200, 200, 200, 200, 200,
+ 200, 200, 200, 200, 200, 200, 200, 200, 200, 200,
+ 200, 200, 198, 198, 198, 198, 198, 198, 198, 198,
+ 199, 198, 198, 201, 198, 198, 198, 198, 198, 200,
+ 200, 200, 200, 200, 200, 200, 200, 200, 200, 200,
+ 200, 200, 200, 200, 200, 200, 200, 200, 200, 200,
+ 200, 200, 200, 200, 200, 200, 200, 200, 200, 200,
+ 200, 200, 198, 198, 198, 201, 198, 200, 200, 200,
+ 200, 200, 200, 200, 200, 200, 200, 198, 200, 200,
+
+ 200, 200, 200, 200, 200, 200, 200, 200, 200, 200,
+ 200, 200, 200, 200, 200, 200, 200, 198, 200, 200,
+ 200, 200, 200, 200, 200, 200, 198, 200, 200, 200,
+ 200, 200, 200, 200, 200, 200, 200, 200, 200, 200,
+ 202, 200, 200, 200, 200, 198, 200, 200, 200, 200,
+ 198, 200, 200, 200, 200, 200, 200, 200, 200, 202,
+ 202, 200, 200, 198, 200, 200, 200, 200, 200, 200,
+ 200, 200, 200, 198, 202, 200, 198, 200, 200, 200,
+ 200, 198, 202, 198, 200, 200, 200, 198, 202, 200,
+ 203, 198, 200, 203, 198, 198, 203, 0, 198, 198,
+
+ 198, 198, 198
} ;
-static yyconst flex_int16_t yy_nxt[513] =
+static yyconst flex_int16_t yy_nxt[572] =
{ 0,
4, 5, 6, 7, 8, 9, 10, 11, 12, 4,
13, 14, 10, 15, 16, 17, 18, 19, 20, 21,
- 22, 17, 23, 17, 24, 25, 26, 27, 28, 29,
- 30, 31, 17, 17, 32, 17, 17, 17, 16, 17,
- 18, 19, 20, 21, 22, 17, 23, 24, 25, 26,
- 27, 28, 29, 30, 31, 17, 17, 32, 17, 17,
- 33, 45, 46, 34, 35, 36, 36, 37, 38, 39,
- 39, 38, 38, 39, 39, 38, 37, 36, 36, 37,
- 47, 48, 51, 52, 53, 40, 57, 61, 87, 40,
- 87, 54, 59, 55, 62, 60, 63, 98, 75, 64,
-
- 98, 58, 56, 65, 42, 51, 52, 53, 88, 40,
- 57, 61, 66, 40, 54, 59, 55, 62, 60, 63,
- 67, 69, 75, 64, 58, 56, 85, 65, 72, 68,
- 70, 71, 88, 73, 79, 66, 74, 76, 45, 46,
- 80, 81, 82, 93, 67, 69, 89, 77, 92, 85,
- 78, 72, 68, 70, 71, 49, 73, 141, 79, 74,
- 141, 76, 44, 80, 43, 81, 82, 93, 94, 89,
- 77, 92, 42, 78, 83, 36, 36, 84, 84, 36,
- 36, 84, 35, 36, 36, 37, 37, 36, 36, 37,
- 38, 90, 94, 38, 38, 39, 39, 38, 97, 91,
-
- 95, 96, 190, 99, 100, 101, 106, 40, 190, 102,
- 103, 40, 190, 104, 90, 105, 107, 108, 190, 109,
- 110, 97, 91, 111, 95, 96, 99, 100, 112, 101,
- 106, 40, 102, 103, 113, 40, 104, 114, 105, 117,
- 107, 108, 109, 110, 115, 120, 111, 118, 116, 190,
- 119, 112, 83, 36, 36, 84, 121, 122, 113, 123,
- 124, 114, 117, 84, 36, 36, 84, 125, 115, 120,
- 118, 126, 116, 119, 98, 128, 132, 98, 130, 121,
- 131, 122, 123, 124, 129, 133, 190, 134, 135, 136,
- 125, 137, 138, 139, 145, 126, 140, 143, 144, 128,
-
- 132, 130, 146, 131, 127, 141, 148, 129, 141, 133,
- 134, 135, 136, 147, 137, 149, 138, 139, 145, 140,
- 143, 144, 150, 190, 151, 152, 146, 127, 153, 148,
- 142, 154, 155, 156, 157, 190, 158, 147, 159, 149,
- 161, 162, 163, 164, 168, 163, 150, 151, 152, 165,
- 166, 153, 167, 142, 154, 169, 155, 156, 157, 158,
- 170, 159, 171, 178, 161, 162, 172, 164, 168, 174,
- 176, 173, 165, 166, 173, 167, 163, 177, 169, 163,
- 179, 173, 181, 170, 173, 182, 171, 178, 183, 172,
- 184, 185, 174, 176, 186, 187, 188, 175, 187, 187,
-
- 177, 190, 187, 179, 190, 190, 181, 180, 182, 190,
- 190, 190, 183, 184, 190, 185, 190, 186, 190, 188,
- 190, 175, 190, 190, 190, 190, 190, 190, 190, 190,
- 180, 41, 41, 190, 41, 41, 50, 50, 86, 86,
- 190, 86, 86, 160, 190, 190, 160, 189, 190, 190,
- 189, 3, 190, 190, 190, 190, 190, 190, 190, 190,
- 190, 190, 190, 190, 190, 190, 190, 190, 190, 190,
- 190, 190, 190, 190, 190, 190, 190, 190, 190, 190,
- 190, 190, 190, 190, 190, 190, 190, 190, 190, 190,
- 190, 190, 190, 190, 190, 190, 190, 190, 190, 190,
-
- 190, 190, 190, 190, 190, 190, 190, 190, 190, 190,
- 190, 190
+ 22, 17, 23, 17, 24, 25, 26, 27, 28, 17,
+ 29, 30, 31, 17, 17, 32, 17, 17, 17, 16,
+ 17, 18, 19, 20, 21, 22, 17, 23, 24, 25,
+ 26, 27, 28, 17, 29, 30, 31, 17, 17, 32,
+ 17, 17, 33, 45, 46, 34, 35, 36, 36, 37,
+ 38, 39, 39, 38, 38, 39, 39, 38, 37, 36,
+ 36, 37, 47, 48, 51, 52, 53, 40, 57, 61,
+ 87, 40, 87, 54, 59, 55, 62, 60, 63, 42,
+
+ 75, 88, 64, 49, 58, 56, 65, 44, 51, 52,
+ 53, 43, 40, 57, 61, 66, 40, 54, 59, 55,
+ 62, 60, 63, 67, 69, 75, 88, 64, 58, 56,
+ 85, 65, 68, 70, 72, 71, 76, 93, 79, 66,
+ 73, 45, 46, 74, 80, 89, 77, 92, 67, 69,
+ 78, 81, 82, 42, 85, 198, 68, 70, 72, 71,
+ 198, 76, 93, 79, 73, 198, 198, 74, 80, 89,
+ 77, 92, 98, 198, 78, 98, 81, 82, 83, 36,
+ 36, 84, 84, 36, 36, 84, 35, 36, 36, 37,
+ 37, 36, 36, 37, 38, 90, 94, 38, 38, 39,
+
+ 39, 38, 95, 164, 91, 96, 164, 97, 99, 100,
+ 101, 40, 198, 102, 103, 40, 198, 104, 105, 90,
+ 106, 94, 107, 108, 198, 109, 110, 95, 91, 111,
+ 96, 97, 99, 100, 112, 101, 40, 102, 103, 113,
+ 40, 104, 105, 114, 120, 106, 117, 107, 108, 109,
+ 110, 115, 122, 111, 118, 116, 198, 119, 112, 83,
+ 36, 36, 84, 121, 113, 123, 124, 125, 114, 120,
+ 117, 84, 36, 36, 84, 126, 115, 122, 118, 98,
+ 116, 119, 98, 128, 198, 130, 132, 121, 131, 123,
+ 124, 125, 129, 133, 198, 134, 135, 136, 137, 138,
+
+ 126, 139, 174, 140, 141, 174, 143, 141, 128, 130,
+ 127, 132, 131, 144, 145, 146, 129, 147, 133, 134,
+ 135, 136, 137, 148, 138, 149, 139, 140, 151, 142,
+ 143, 150, 198, 152, 127, 153, 154, 144, 155, 145,
+ 146, 156, 147, 157, 198, 158, 159, 148, 141, 162,
+ 149, 141, 151, 142, 163, 165, 150, 152, 166, 153,
+ 154, 167, 168, 155, 169, 172, 156, 170, 157, 158,
+ 159, 171, 173, 174, 162, 176, 174, 198, 161, 163,
+ 165, 180, 166, 178, 164, 167, 168, 164, 179, 169,
+ 172, 170, 181, 184, 174, 171, 173, 174, 185, 176,
+
+ 174, 175, 161, 174, 187, 177, 180, 178, 186, 188,
+ 174, 190, 179, 174, 191, 193, 181, 191, 184, 198,
+ 182, 192, 185, 191, 192, 175, 191, 196, 187, 183,
+ 177, 198, 198, 186, 188, 190, 198, 192, 198, 193,
+ 192, 189, 198, 197, 182, 198, 197, 197, 198, 198,
+ 197, 198, 196, 183, 198, 198, 198, 198, 198, 198,
+ 198, 198, 198, 195, 198, 189, 198, 198, 198, 198,
+ 198, 198, 198, 198, 198, 198, 198, 198, 198, 198,
+ 198, 198, 198, 198, 198, 198, 198, 195, 41, 41,
+ 198, 41, 41, 50, 50, 86, 86, 198, 86, 86,
+
+ 160, 198, 198, 160, 194, 198, 198, 194, 3, 198,
+ 198, 198, 198, 198, 198, 198, 198, 198, 198, 198,
+ 198, 198, 198, 198, 198, 198, 198, 198, 198, 198,
+ 198, 198, 198, 198, 198, 198, 198, 198, 198, 198,
+ 198, 198, 198, 198, 198, 198, 198, 198, 198, 198,
+ 198, 198, 198, 198, 198, 198, 198, 198, 198, 198,
+ 198, 198, 198, 198, 198, 198, 198, 198, 198, 198,
+ 198
} ;
-static yyconst flex_int16_t yy_chk[513] =
+static yyconst flex_int16_t yy_chk[572] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
@@ -560,57 +571,63 @@ static yyconst flex_int16_t yy_chk[513] =
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 2, 13, 13, 2, 5, 5, 5, 5, 6, 6,
- 6, 6, 7, 7, 7, 7, 8, 8, 8, 8,
- 14, 14, 16, 18, 19, 6, 21, 23, 87, 7,
- 45, 20, 22, 20, 23, 22, 24, 60, 29, 25,
-
- 60, 21, 20, 25, 41, 16, 18, 19, 51, 6,
- 21, 23, 25, 7, 20, 22, 20, 23, 22, 24,
- 26, 27, 29, 25, 21, 20, 40, 25, 28, 26,
- 27, 27, 51, 28, 31, 25, 28, 30, 46, 46,
- 31, 32, 32, 55, 26, 27, 52, 30, 54, 40,
- 30, 28, 26, 27, 27, 15, 28, 141, 31, 28,
- 141, 30, 12, 31, 11, 32, 32, 55, 56, 52,
- 30, 54, 9, 30, 33, 33, 33, 33, 34, 34,
- 34, 34, 35, 35, 35, 35, 37, 37, 37, 37,
- 38, 53, 56, 38, 39, 39, 39, 39, 59, 53,
-
- 57, 58, 3, 62, 63, 64, 70, 38, 0, 65,
- 66, 39, 0, 67, 53, 68, 72, 73, 0, 74,
- 75, 59, 53, 76, 57, 58, 62, 63, 77, 64,
- 70, 38, 65, 66, 78, 39, 67, 79, 68, 82,
- 72, 73, 74, 75, 81, 90, 76, 85, 81, 0,
- 89, 77, 83, 83, 83, 83, 91, 92, 78, 94,
- 95, 79, 82, 84, 84, 84, 84, 96, 81, 90,
- 85, 97, 81, 89, 98, 99, 102, 98, 100, 91,
- 101, 92, 94, 95, 99, 103, 0, 104, 106, 107,
- 96, 108, 110, 112, 117, 97, 113, 115, 116, 99,
-
- 102, 100, 118, 101, 98, 114, 124, 99, 114, 103,
- 104, 106, 107, 119, 108, 125, 110, 112, 117, 113,
- 115, 116, 126, 0, 127, 128, 118, 98, 131, 124,
- 114, 132, 133, 137, 138, 0, 139, 119, 140, 125,
- 144, 145, 146, 147, 154, 146, 126, 127, 128, 148,
- 150, 131, 152, 114, 132, 156, 133, 137, 138, 139,
- 157, 140, 158, 167, 144, 145, 159, 147, 154, 162,
- 164, 160, 148, 150, 160, 152, 163, 165, 156, 163,
- 169, 173, 175, 157, 173, 176, 158, 167, 178, 159,
- 179, 180, 162, 164, 183, 185, 186, 163, 185, 187,
-
- 165, 189, 187, 169, 189, 0, 175, 173, 176, 0,
- 0, 0, 178, 179, 0, 180, 0, 183, 0, 186,
- 0, 163, 0, 0, 0, 0, 0, 0, 0, 0,
- 173, 191, 191, 0, 191, 191, 192, 192, 193, 193,
- 0, 193, 193, 194, 0, 0, 194, 195, 0, 0,
- 195, 190, 190, 190, 190, 190, 190, 190, 190, 190,
- 190, 190, 190, 190, 190, 190, 190, 190, 190, 190,
- 190, 190, 190, 190, 190, 190, 190, 190, 190, 190,
- 190, 190, 190, 190, 190, 190, 190, 190, 190, 190,
- 190, 190, 190, 190, 190, 190, 190, 190, 190, 190,
-
- 190, 190, 190, 190, 190, 190, 190, 190, 190, 190,
- 190, 190
+ 1, 1, 2, 13, 13, 2, 5, 5, 5, 5,
+ 6, 6, 6, 6, 7, 7, 7, 7, 8, 8,
+ 8, 8, 14, 14, 16, 18, 19, 6, 21, 23,
+ 87, 7, 45, 20, 22, 20, 23, 22, 24, 41,
+
+ 29, 51, 25, 15, 21, 20, 25, 12, 16, 18,
+ 19, 11, 6, 21, 23, 25, 7, 20, 22, 20,
+ 23, 22, 24, 26, 27, 29, 51, 25, 21, 20,
+ 40, 25, 26, 27, 28, 27, 30, 55, 31, 25,
+ 28, 46, 46, 28, 31, 52, 30, 54, 26, 27,
+ 30, 32, 32, 9, 40, 3, 26, 27, 28, 27,
+ 0, 30, 55, 31, 28, 0, 0, 28, 31, 52,
+ 30, 54, 60, 0, 30, 60, 32, 32, 33, 33,
+ 33, 33, 34, 34, 34, 34, 35, 35, 35, 35,
+ 37, 37, 37, 37, 38, 53, 56, 38, 39, 39,
+
+ 39, 39, 57, 146, 53, 58, 146, 59, 62, 63,
+ 64, 38, 0, 65, 66, 39, 0, 67, 68, 53,
+ 70, 56, 72, 73, 0, 74, 75, 57, 53, 76,
+ 58, 59, 62, 63, 77, 64, 38, 65, 66, 78,
+ 39, 67, 68, 79, 90, 70, 82, 72, 73, 74,
+ 75, 81, 92, 76, 85, 81, 0, 89, 77, 83,
+ 83, 83, 83, 91, 78, 94, 95, 96, 79, 90,
+ 82, 84, 84, 84, 84, 97, 81, 92, 85, 98,
+ 81, 89, 98, 99, 0, 100, 102, 91, 101, 94,
+ 95, 96, 99, 103, 0, 104, 106, 107, 108, 110,
+
+ 97, 112, 160, 113, 114, 160, 115, 114, 99, 100,
+ 98, 102, 101, 116, 117, 118, 99, 119, 103, 104,
+ 106, 107, 108, 124, 110, 125, 112, 113, 127, 114,
+ 115, 126, 0, 128, 98, 131, 132, 116, 133, 117,
+ 118, 137, 119, 138, 0, 139, 140, 124, 141, 144,
+ 125, 141, 127, 114, 145, 147, 126, 128, 148, 131,
+ 132, 150, 152, 133, 154, 158, 137, 156, 138, 139,
+ 140, 157, 159, 161, 144, 163, 161, 0, 141, 145,
+ 147, 168, 148, 165, 164, 150, 152, 164, 166, 154,
+ 158, 156, 170, 177, 174, 157, 159, 174, 178, 163,
+
+ 175, 161, 141, 175, 181, 164, 168, 165, 180, 182,
+ 183, 186, 166, 183, 188, 190, 170, 188, 177, 0,
+ 174, 189, 178, 191, 189, 161, 191, 195, 181, 175,
+ 164, 0, 0, 180, 182, 186, 0, 192, 0, 190,
+ 192, 183, 194, 196, 174, 194, 196, 197, 0, 0,
+ 197, 0, 195, 175, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 192, 0, 183, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 192, 199, 199,
+ 0, 199, 199, 200, 200, 201, 201, 0, 201, 201,
+
+ 202, 0, 0, 202, 203, 0, 0, 203, 198, 198,
+ 198, 198, 198, 198, 198, 198, 198, 198, 198, 198,
+ 198, 198, 198, 198, 198, 198, 198, 198, 198, 198,
+ 198, 198, 198, 198, 198, 198, 198, 198, 198, 198,
+ 198, 198, 198, 198, 198, 198, 198, 198, 198, 198,
+ 198, 198, 198, 198, 198, 198, 198, 198, 198, 198,
+ 198, 198, 198, 198, 198, 198, 198, 198, 198, 198,
+ 198
} ;
static yy_state_type yy_last_accepting_state;
@@ -684,7 +701,7 @@ static void countnl() {
g_lingo->_colnumber = strlen(p);
}
-#line 688 "engines/director/lingo/lingo-lex.cpp"
+#line 705 "engines/director/lingo/lingo-lex.cpp"
#define INITIAL 0
@@ -872,7 +889,7 @@ YY_DECL
#line 69 "engines/director/lingo/lingo-lex.l"
-#line 876 "engines/director/lingo/lingo-lex.cpp"
+#line 893 "engines/director/lingo/lingo-lex.cpp"
if ( !(yy_init) )
{
@@ -926,13 +943,13 @@ yy_match:
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
- if ( yy_current_state >= 191 )
+ if ( yy_current_state >= 199 )
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
++yy_cp;
}
- while ( yy_base[yy_current_state] != 452 );
+ while ( yy_base[yy_current_state] != 509 );
yy_find_action:
yy_act = yy_accept[yy_current_state];
@@ -1139,6 +1156,18 @@ YY_RULE_SETUP
{
count();
+ yylval.e[0] = g_lingo->_theEntities["sqrt"]->entity;
+ yylval.e[1] = 0; // No field
+
+ return THEENTITYWITHID;
+ }
+ YY_BREAK
+case 37:
+YY_RULE_SETUP
+#line 115 "engines/director/lingo/lingo-lex.l"
+{
+ count();
+
const char *ptr = &yytext[4]; // Skip 'the '
while (*ptr == ' ' || *ptr == '\t')
ptr++;
@@ -1177,9 +1206,9 @@ YY_RULE_SETUP
warning("Unhandled the entity %s", ptr);
}
YY_BREAK
-case 37:
+case 38:
YY_RULE_SETUP
-#line 147 "engines/director/lingo/lingo-lex.l"
+#line 155 "engines/director/lingo/lingo-lex.l"
{
count();
@@ -1200,64 +1229,64 @@ YY_RULE_SETUP
warning("Unhandled the entity %s", ptr);
}
YY_BREAK
-case 38:
+case 39:
YY_RULE_SETUP
-#line 166 "engines/director/lingo/lingo-lex.l"
+#line 174 "engines/director/lingo/lingo-lex.l"
{ count(); return tTHEN; }
YY_BREAK
-case 39:
+case 40:
YY_RULE_SETUP
-#line 167 "engines/director/lingo/lingo-lex.l"
+#line 175 "engines/director/lingo/lingo-lex.l"
{ count(); return tTO; }
YY_BREAK
-case 40:
+case 41:
YY_RULE_SETUP
-#line 168 "engines/director/lingo/lingo-lex.l"
+#line 176 "engines/director/lingo/lingo-lex.l"
{ count(); return tSPRITE; }
YY_BREAK
-case 41:
+case 42:
YY_RULE_SETUP
-#line 169 "engines/director/lingo/lingo-lex.l"
+#line 177 "engines/director/lingo/lingo-lex.l"
{ count(); return tWITH; }
YY_BREAK
-case 42:
+case 43:
YY_RULE_SETUP
-#line 170 "engines/director/lingo/lingo-lex.l"
+#line 178 "engines/director/lingo/lingo-lex.l"
{ count(); return tWITHIN; }
YY_BREAK
-case 43:
+case 44:
YY_RULE_SETUP
-#line 171 "engines/director/lingo/lingo-lex.l"
+#line 179 "engines/director/lingo/lingo-lex.l"
{ count(); return tWHEN; }
YY_BREAK
-case 44:
+case 45:
YY_RULE_SETUP
-#line 172 "engines/director/lingo/lingo-lex.l"
+#line 180 "engines/director/lingo/lingo-lex.l"
{ count(); return tWHILE; }
YY_BREAK
-case 45:
+case 46:
YY_RULE_SETUP
-#line 174 "engines/director/lingo/lingo-lex.l"
+#line 182 "engines/director/lingo/lingo-lex.l"
{ count(); return tNEQ; }
YY_BREAK
-case 46:
+case 47:
YY_RULE_SETUP
-#line 175 "engines/director/lingo/lingo-lex.l"
+#line 183 "engines/director/lingo/lingo-lex.l"
{ count(); return tGE; }
YY_BREAK
-case 47:
+case 48:
YY_RULE_SETUP
-#line 176 "engines/director/lingo/lingo-lex.l"
+#line 184 "engines/director/lingo/lingo-lex.l"
{ count(); return tLE; }
YY_BREAK
-case 48:
+case 49:
YY_RULE_SETUP
-#line 177 "engines/director/lingo/lingo-lex.l"
+#line 185 "engines/director/lingo/lingo-lex.l"
{ count(); return tCONCAT; }
YY_BREAK
-case 49:
+case 50:
YY_RULE_SETUP
-#line 179 "engines/director/lingo/lingo-lex.l"
+#line 187 "engines/director/lingo/lingo-lex.l"
{
count();
yylval.s = new Common::String(yytext);
@@ -1285,43 +1314,43 @@ YY_RULE_SETUP
return ID;
}
YY_BREAK
-case 50:
+case 51:
YY_RULE_SETUP
-#line 205 "engines/director/lingo/lingo-lex.l"
+#line 213 "engines/director/lingo/lingo-lex.l"
{ count(); yylval.f = atof(yytext); return FLOAT; }
YY_BREAK
-case 51:
+case 52:
YY_RULE_SETUP
-#line 206 "engines/director/lingo/lingo-lex.l"
+#line 214 "engines/director/lingo/lingo-lex.l"
{ count(); yylval.i = strtol(yytext, NULL, 10); return INT; }
YY_BREAK
-case 52:
+case 53:
YY_RULE_SETUP
-#line 207 "engines/director/lingo/lingo-lex.l"
+#line 215 "engines/director/lingo/lingo-lex.l"
{ count(); return *yytext; }
YY_BREAK
-case 53:
-/* rule 53 can match eol */
+case 54:
+/* rule 54 can match eol */
YY_RULE_SETUP
-#line 208 "engines/director/lingo/lingo-lex.l"
+#line 216 "engines/director/lingo/lingo-lex.l"
{ return '\n'; }
YY_BREAK
-case 54:
+case 55:
YY_RULE_SETUP
-#line 209 "engines/director/lingo/lingo-lex.l"
+#line 217 "engines/director/lingo/lingo-lex.l"
{ count(); yylval.s = new Common::String(&yytext[1]); yylval.s->deleteLastChar(); return STRING; }
YY_BREAK
-case 55:
+case 56:
YY_RULE_SETUP
-#line 210 "engines/director/lingo/lingo-lex.l"
+#line 218 "engines/director/lingo/lingo-lex.l"
YY_BREAK
-case 56:
+case 57:
YY_RULE_SETUP
-#line 212 "engines/director/lingo/lingo-lex.l"
+#line 220 "engines/director/lingo/lingo-lex.l"
ECHO;
YY_BREAK
-#line 1325 "engines/director/lingo/lingo-lex.cpp"
+#line 1354 "engines/director/lingo/lingo-lex.cpp"
case YY_STATE_EOF(INITIAL):
yyterminate();
@@ -1614,7 +1643,7 @@ static int yy_get_next_buffer (void)
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
- if ( yy_current_state >= 191 )
+ if ( yy_current_state >= 199 )
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
@@ -1642,11 +1671,11 @@ static int yy_get_next_buffer (void)
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
- if ( yy_current_state >= 191 )
+ if ( yy_current_state >= 199 )
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
- yy_is_jam = (yy_current_state == 190);
+ yy_is_jam = (yy_current_state == 198);
return yy_is_jam ? 0 : yy_current_state;
}
@@ -2321,7 +2350,7 @@ void yyfree (void * ptr )
#define YYTABLES_NAME "yytables"
-#line 212 "engines/director/lingo/lingo-lex.l"
+#line 220 "engines/director/lingo/lingo-lex.l"
diff --git a/engines/director/lingo/lingo-lex.l b/engines/director/lingo/lingo-lex.l
index 8c89a99..3fca137 100644
--- a/engines/director/lingo/lingo-lex.l
+++ b/engines/director/lingo/lingo-lex.l
@@ -104,6 +104,14 @@ whitespace [\t ]
(?i:repeat) { count(); return tREPEAT; }
(?i:set) { count(); return tSET; }
(?i:starts) { count(); return tSTARTS; }
+(?i:the[ \t]+sqrt[\t ]+of[\t ]+) {
+ count();
+
+ yylval.e[0] = g_lingo->_theEntities["sqrt"]->entity;
+ yylval.e[1] = 0; // No field
+
+ return THEENTITYWITHID;
+ }
(?i:the[ \t]+[[:alpha:]]+[\t ]+of[\t ]+[[:alpha:]]+) {
count();
diff --git a/engines/director/lingo/lingo-the.cpp b/engines/director/lingo/lingo-the.cpp
index 20bccf3..6579de2 100644
--- a/engines/director/lingo/lingo-the.cpp
+++ b/engines/director/lingo/lingo-the.cpp
@@ -73,6 +73,7 @@ TheEntity entities[] = {
{ kTheSelection, "selection", false },
{ kTheShiftDown, "shiftDown", false },
{ kTheSprite, "sprite", true },
+ { kTheSqrt, "sqrt", false },
{ kTheStage, "stage", false },
{ kTheStillDown, "stillDown", false },
{ kTheTicks, "ticks", false },
@@ -327,6 +328,11 @@ Datum Lingo::getTheEntity(int entity, Datum &id, int field) {
d.type = INT;
d.u.i = _floatPrecision;
break;
+ case kTheSqrt:
+ id.toFloat();
+ d.type = FLOAT;
+ d.u.f = sqrt(id.u.f);
+ break;
default:
warning("Unprocessed getting field %d of entity %d", field, entity);
d.type = VOID;
diff --git a/engines/director/lingo/lingo-the.h b/engines/director/lingo/lingo-the.h
index 0649ebe..9ce8e6f 100644
--- a/engines/director/lingo/lingo-the.h
+++ b/engines/director/lingo/lingo-the.h
@@ -71,6 +71,7 @@ enum TheEntityType {
kTheResult,
kTheSelection,
kTheShiftDown,
+ kTheSqrt,
kTheOptionDown,
kTheColorDepth,
diff --git a/engines/director/lingo/tests/math.lingo b/engines/director/lingo/tests/math.lingo
index 6f8ecc3..f38b061 100644
--- a/engines/director/lingo/tests/math.lingo
+++ b/engines/director/lingo/tests/math.lingo
@@ -20,3 +20,5 @@ updatestage
put (1024/4096)*100 -- 0
put (1024/4096)*100.0 -- 0.0
put ((1024*1.0)/4096)*100.0 -- 25.0
+
+put the sqrt of 9
Commit: 9117ca6ad312fa6f95a93be3e09183ba64a84249
https://github.com/scummvm/scummvm/commit/9117ca6ad312fa6f95a93be3e09183ba64a84249
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-08-17T00:14:50+02:00
Commit Message:
DIRECTOR: Lingo: Added stubs for rest of the D2 functions
Changed paths:
engines/director/lingo/lingo-builtins.cpp
engines/director/lingo/lingo-the.cpp
engines/director/lingo/lingo-the.h
engines/director/lingo/lingo.h
diff --git a/engines/director/lingo/lingo-builtins.cpp b/engines/director/lingo/lingo-builtins.cpp
index d8a8f2d..798ab08 100644
--- a/engines/director/lingo/lingo-builtins.cpp
+++ b/engines/director/lingo/lingo-builtins.cpp
@@ -53,6 +53,8 @@ static struct BuiltinProto {
{ "numToChar", Lingo::b_numToChar, 1, 1, true }, // D2
{ "offset", Lingo::b_offset, 2, 2, true }, // D2
{ "string", Lingo::b_string, 1, 1, true }, // D2
+ { "stringp", Lingo::b_stringp, 1, 1, true }, // D2
+ { "value", Lingo::b_value, 1, 1, true }, // D2
// Files
{ "closeDA", Lingo::b_closeDA, 0, 0, false }, // D2
{ "closeResFile", Lingo::b_closeResFile, 0, 1, false }, // D2
@@ -91,6 +93,7 @@ static struct BuiltinProto {
{ "objectp", Lingo::b_objectp, 1, 1, true },
{ "showGlobals", Lingo::b_showGlobals, 0, 0, false }, // D2
{ "showLocals", Lingo::b_showLocals, 0, 0, false }, // D2
+ { "symbolp", Lingo::b_symbolp, 1, 1, true }, // D2
// Score
{ "constrainH", Lingo::b_constrainH, 2, 2, true }, // D2
{ "constrainV", Lingo::b_constrainV, 2, 2, true }, // D2
@@ -374,6 +377,22 @@ void Lingo::b_string(int nargs) {
g_lingo->push(d);
}
+void Lingo::b_stringp(int nargs) {
+ Datum d = g_lingo->pop();
+ int res = (d.type == STRING) ? 1 : 0;
+ d.toInt();
+ d.u.i = res;
+ g_lingo->push(d);
+}
+
+void Lingo::b_value(int nargs) {
+ Datum d = g_lingo->pop();
+ d.toInt();
+ warning("STUB: b_value()");
+ g_lingo->push(d);
+}
+
+
///////////////////
// Files
///////////////////
@@ -553,6 +572,13 @@ void Lingo::b_showLocals(int nargs) {
warning("STUB: b_showLocals");
}
+void Lingo::b_symbolp(int nargs) {
+ Datum d = g_lingo->pop();
+ int res = (d.type == SYMBOL) ? 1 : 0;
+ d.toInt();
+ d.u.i = res;
+ g_lingo->push(d);
+}
///////////////////
diff --git a/engines/director/lingo/lingo-the.cpp b/engines/director/lingo/lingo-the.cpp
index 6579de2..ba25258 100644
--- a/engines/director/lingo/lingo-the.cpp
+++ b/engines/director/lingo/lingo-the.cpp
@@ -75,6 +75,10 @@ TheEntity entities[] = {
{ kTheSprite, "sprite", true },
{ kTheSqrt, "sqrt", false },
{ kTheStage, "stage", false },
+ { kTheStageBottom, "stageBottom", false },
+ { kTheStageLeft, "stageLeft", false },
+ { kTheStageRight, "stageRight", false },
+ { kTheStageTop, "stageTop", false },
{ kTheStillDown, "stillDown", false },
{ kTheTicks, "ticks", false },
{ kTheTimeoutLength, "timeoutlength", false },
diff --git a/engines/director/lingo/lingo-the.h b/engines/director/lingo/lingo-the.h
index 9ce8e6f..468be64 100644
--- a/engines/director/lingo/lingo-the.h
+++ b/engines/director/lingo/lingo-the.h
@@ -82,7 +82,11 @@ enum TheEntityType {
kTheMultiSound,
kThePreloadEventAbort,
kTheRomanLingo,
- kTheStage
+ kTheStage,
+ kTheStageBottom,
+ kTheStageLeft,
+ kTheStageRight,
+ kTheStageTop
};
enum TheFieldType {
diff --git a/engines/director/lingo/lingo.h b/engines/director/lingo/lingo.h
index 105719e..254030e 100644
--- a/engines/director/lingo/lingo.h
+++ b/engines/director/lingo/lingo.h
@@ -317,6 +317,7 @@ public:
static void b_numToChar(int nargs);
static void b_offset(int nargs);
static void b_string(int nargs);
+ static void b_stringp(int nargs);
static void b_ilk(int nargs);
static void b_alert(int nargs);
@@ -325,6 +326,8 @@ public:
static void b_printFrom(int nargs);
static void b_showGlobals(int nargs);
static void b_showLocals(int nargs);
+ static void b_symbolp(int nargs);
+ static void b_value(int nargs);
static void b_constrainH(int nargs);
static void b_constrainV(int nargs);
Commit: 80fd795b80d9e9f5f6ca444b844d867f2172d74e
https://github.com/scummvm/scummvm/commit/80fd795b80d9e9f5f6ca444b844d867f2172d74e
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-08-17T00:15:01+02:00
Commit Message:
DIRECTOR: Marked all D2 'the' functions
Changed paths:
engines/director/lingo/lingo-the.cpp
diff --git a/engines/director/lingo/lingo-the.cpp b/engines/director/lingo/lingo-the.cpp
index ba25258..eb0bfc5 100644
--- a/engines/director/lingo/lingo-the.cpp
+++ b/engines/director/lingo/lingo-the.cpp
@@ -28,59 +28,59 @@ class Sprite;
TheEntity entities[] = {
{ kTheCast, "cast", true },
- { kTheClickOn, "clickOn", false },
+ { kTheClickOn, "clickOn", false }, // D2 function
{ kTheColorDepth, "colorDepth", false },
- { kTheColorQD, "colorQD", false },
- { kTheCommandDown, "commandDown", false },
- { kTheControlDown, "controlDown", false },
- { kTheDoubleClick, "doubleClick", false },
+ { kTheColorQD, "colorQD", false }, // D2 f
+ { kTheCommandDown, "commandDown", false }, // D2 f
+ { kTheControlDown, "controlDown", false }, // D2 f
+ { kTheDoubleClick, "doubleClick", false }, // D2 f
{ kTheExitLock, "exitlock", false },
{ kTheFloatPrecision, "floatPrecision", false },
- { kTheFrame, "frame", false },
- { kTheFreeBlock, "freeBlock", false },
- { kTheFreeBytes, "freeBytes", false },
+ { kTheFrame, "frame", false }, // D2 f
+ { kTheFreeBlock, "freeBlock", false }, // D2 f
+ { kTheFreeBytes, "freeBytes", false }, // D2 f
{ kTheItemDelimiter, "itemDelimiter", false },
- { kTheKey, "key", false },
- { kTheKeyCode, "keyCode", false },
- { kTheLastClick, "lastClick", false },
- { kTheLastEvent, "lastEvent", false },
+ { kTheKey, "key", false }, // D2 f
+ { kTheKeyCode, "keyCode", false }, // D2 f
+ { kTheLastClick, "lastClick", false }, // D2 f
+ { kTheLastEvent, "lastEvent", false }, // D2 f
{ kTheLastFrame, "lastFrame", false },
- { kTheLastKey, "lastKey", false },
- { kTheLastRoll, "lastRoll", false },
- { kTheMachineType, "machineType", false },
- { kTheMemorySize, "memorySize", false },
+ { kTheLastKey, "lastKey", false }, // D2 f
+ { kTheLastRoll, "lastRoll", false }, // D2 f
+ { kTheMachineType, "machineType", false }, // D2 f
+ { kTheMemorySize, "memorySize", false }, // D2 f
{ kTheMenu, "menu", true },
{ kTheMenus, "menus", false },
{ kTheMenuItem, "menuitem", true },
{ kTheMenuItems, "menuitems", false },
- { kTheMouseDown, "mouseDown", false },
+ { kTheMouseDown, "mouseDown", false }, // D2 f
{ kTheMouseDownScript, "mouseDownScript", false },
- { kTheMouseH, "mouseh", false },
- { kTheMouseUp, "mouseUp", false },
+ { kTheMouseH, "mouseH", false }, // D2 f
+ { kTheMouseUp, "mouseUp", false }, // D2 f
{ kTheMouseUpScript, "mouseUpScript", false },
- { kTheMouseV, "mousev", false },
- { kTheMovie, "movie", false },
+ { kTheMouseV, "mouseV", false }, // D2 f
+ { kTheMovie, "movie", false }, // D2 f
{ kTheMultiSound, "multiSound", false },
- { kTheOptionDown, "optionDown", false },
- { kThePathName, "pathname", false },
- { kThePauseState, "pauseState", false },
+ { kTheOptionDown, "optionDown", false }, // D2 f
+ { kThePathName, "pathName", false }, // D2 f
+ { kThePauseState, "pauseState", false }, // D2 f
{ kThePerFrameHook, "perframehook", false },
{ kThePreloadEventAbort,"preloadEventAbort",false },
- { kTheResult, "result", false },
+ { kTheResult, "result", false }, // D2 f
{ kTheRightMouseDown, "rightMouseDown", false },
{ kTheRightMouseUp, "rightMouseUp", false },
{ kTheRomanLingo, "romanLingo", false },
- { kTheSelection, "selection", false },
- { kTheShiftDown, "shiftDown", false },
+ { kTheSelection, "selection", false }, // D2 f
+ { kTheShiftDown, "shiftDown", false }, // D2 f
{ kTheSprite, "sprite", true },
- { kTheSqrt, "sqrt", false },
+ { kTheSqrt, "sqrt", false }, // D2 f
{ kTheStage, "stage", false },
- { kTheStageBottom, "stageBottom", false },
- { kTheStageLeft, "stageLeft", false },
- { kTheStageRight, "stageRight", false },
- { kTheStageTop, "stageTop", false },
- { kTheStillDown, "stillDown", false },
- { kTheTicks, "ticks", false },
+ { kTheStageBottom, "stageBottom", false }, // D2 f
+ { kTheStageLeft, "stageLeft", false }, // D2 f
+ { kTheStageRight, "stageRight", false }, // D2 f
+ { kTheStageTop, "stageTop", false }, // D2 f
+ { kTheStillDown, "stillDown", false }, // D2 f
+ { kTheTicks, "ticks", false }, // D2 f
{ kTheTimeoutLength, "timeoutlength", false },
{ kTheTimer, "timer", false },
{ kTheWindow, "window", false },
More information about the Scummvm-git-logs
mailing list