diff options
-rw-r--r-- | engines/director/lingo/lingo-code.cpp | 12 | ||||
-rw-r--r-- | engines/director/lingo/lingo-codegen.cpp | 4 | ||||
-rw-r--r-- | engines/director/lingo/lingo-gr.cpp | 22 | ||||
-rw-r--r-- | engines/director/lingo/lingo-gr.y | 22 | ||||
-rw-r--r-- | engines/director/lingo/lingo.h | 6 |
5 files changed, 33 insertions, 33 deletions
diff --git a/engines/director/lingo/lingo-code.cpp b/engines/director/lingo/lingo-code.cpp index d0d29dd04c..b2733f23b7 100644 --- a/engines/director/lingo/lingo-code.cpp +++ b/engines/director/lingo/lingo-code.cpp @@ -59,9 +59,9 @@ static struct FuncDescr { { Lingo::c_xpop, "c_xpop", "" }, { Lingo::c_arraypush, "c_arraypush", "i" }, { Lingo::c_printtop, "c_printtop", "" }, - { Lingo::c_constpush, "c_constpush", "i" }, + { Lingo::c_intpush, "c_intpush", "i" }, { Lingo::c_voidpush, "c_voidpush", "" }, - { Lingo::c_fconstpush, "c_fconstpush", "f" }, + { Lingo::c_floatpush, "c_floatpush", "f" }, { Lingo::c_stringpush, "c_stringpush", "s" }, { Lingo::c_symbolpush, "c_symbolpush", "s" }, // D3 { Lingo::c_varpush, "c_varpush", "s" }, @@ -196,8 +196,8 @@ void Lingo::c_printtop(void) { } } -void Lingo::c_constpush() { - Datum d; +void Lingo::c_intpush() { + Datum d; inst i = (*g_lingo->_currentScript)[g_lingo->_pc++]; d.u.i = READ_UINT32(&i); d.type = INT; @@ -211,7 +211,7 @@ void Lingo::c_voidpush() { g_lingo->push(d); } -void Lingo::c_fconstpush() { +void Lingo::c_floatpush() { Datum d; inst i = (*g_lingo->_currentScript)[g_lingo->_pc]; d.u.f = *(double *)(&i); @@ -243,7 +243,7 @@ void Lingo::c_arraypush() { Datum d; inst v = (*g_lingo->_currentScript)[g_lingo->_pc++]; int arraySize = READ_UINT32(&v); - +` warning("STUB: c_arraypush()"); for (int i = 0; i < arraySize; i++) diff --git a/engines/director/lingo/lingo-codegen.cpp b/engines/director/lingo/lingo-codegen.cpp index b16e6b6131..425962fafc 100644 --- a/engines/director/lingo/lingo-codegen.cpp +++ b/engines/director/lingo/lingo-codegen.cpp @@ -274,8 +274,8 @@ int Lingo::codeFloat(double f) { return _currentScript->size(); } -int Lingo::codeConst(int val) { - int res = g_lingo->code1(g_lingo->c_constpush); +int Lingo::codeInt(int val) { + int res = g_lingo->code1(g_lingo->c_intpush); inst i = 0; WRITE_UINT32(&i, val); g_lingo->code1(i); diff --git a/engines/director/lingo/lingo-gr.cpp b/engines/director/lingo/lingo-gr.cpp index 9f4fe49076..d375518c16 100644 --- a/engines/director/lingo/lingo-gr.cpp +++ b/engines/director/lingo/lingo-gr.cpp @@ -2197,7 +2197,7 @@ yyreduce: case 15: #line 152 "engines/director/lingo/lingo-gr.y" { - g_lingo->codeConst(0); // Put dummy id + g_lingo->codeInt(0); // Put dummy id g_lingo->code1(g_lingo->c_theentityassign); inst e = 0, f = 0; WRITE_UINT32(&e, (yyvsp[(2) - (4)].e)[0]); @@ -2231,7 +2231,7 @@ yyreduce: case 18: #line 174 "engines/director/lingo/lingo-gr.y" { - g_lingo->codeConst(0); // Put dummy id + g_lingo->codeInt(0); // Put dummy id g_lingo->code1(g_lingo->c_theentityassign); inst e = 0, f = 0; WRITE_UINT32(&e, (yyvsp[(2) - (4)].e)[0]); @@ -2532,13 +2532,13 @@ yyreduce: case 60: #line 417 "engines/director/lingo/lingo-gr.y" - { (yyval.code) = g_lingo->codeConst((yyvsp[(1) - (1)].i)); ;} + { (yyval.code) = g_lingo->codeInt((yyvsp[(1) - (1)].i)); ;} break; case 61: #line 418 "engines/director/lingo/lingo-gr.y" { - (yyval.code) = g_lingo->code1(g_lingo->c_fconstpush); + (yyval.code) = g_lingo->code1(g_lingo->c_floatpush); g_lingo->codeFloat((yyvsp[(1) - (1)].f)); ;} break; @@ -2598,7 +2598,7 @@ yyreduce: case 70: #line 442 "engines/director/lingo/lingo-gr.y" { - (yyval.code) = g_lingo->codeConst(0); // Put dummy id + (yyval.code) = g_lingo->codeInt(0); // Put dummy id g_lingo->code1(g_lingo->c_theentitypush); inst e = 0, f = 0; WRITE_UINT32(&e, (yyvsp[(1) - (1)].e)[0]); @@ -2905,21 +2905,21 @@ yyreduce: case 133: #line 547 "engines/director/lingo/lingo-gr.y" { - g_lingo->codeConst(1); + g_lingo->codeInt(1); g_lingo->code1(g_lingo->c_goto); ;} break; case 134: #line 550 "engines/director/lingo/lingo-gr.y" { - g_lingo->codeConst(3); + g_lingo->codeInt(3); g_lingo->code1(g_lingo->c_goto); ;} break; case 135: #line 553 "engines/director/lingo/lingo-gr.y" { - g_lingo->codeConst(2); + g_lingo->codeInt(2); g_lingo->code1(g_lingo->c_goto); ;} break; @@ -2931,21 +2931,21 @@ yyreduce: case 141: #line 567 "engines/director/lingo/lingo-gr.y" { - g_lingo->codeConst(1); + g_lingo->codeInt(1); g_lingo->code1(g_lingo->c_play); ;} break; case 142: #line 570 "engines/director/lingo/lingo-gr.y" { - g_lingo->codeConst(3); + g_lingo->codeInt(3); g_lingo->code1(g_lingo->c_play); ;} break; case 143: #line 573 "engines/director/lingo/lingo-gr.y" { - g_lingo->codeConst(2); + g_lingo->codeInt(2); g_lingo->code1(g_lingo->c_play); ;} break; diff --git a/engines/director/lingo/lingo-gr.y b/engines/director/lingo/lingo-gr.y index 974105573a..4348dcdee3 100644 --- a/engines/director/lingo/lingo-gr.y +++ b/engines/director/lingo/lingo-gr.y @@ -150,7 +150,7 @@ asgn: tPUT expr tINTO ID { $$ = $4; delete $2; } | tSET THEENTITY '=' expr { - g_lingo->codeConst(0); // Put dummy id + g_lingo->codeInt(0); // Put dummy id g_lingo->code1(g_lingo->c_theentityassign); inst e = 0, f = 0; WRITE_UINT32(&e, $2[0]); @@ -172,7 +172,7 @@ asgn: tPUT expr tINTO ID { $$ = $4; delete $2; } | tSET THEENTITY tTO expr { - g_lingo->codeConst(0); // Put dummy id + g_lingo->codeInt(0); // Put dummy id g_lingo->code1(g_lingo->c_theentityassign); inst e = 0, f = 0; WRITE_UINT32(&e, $2[0]); @@ -414,9 +414,9 @@ tell: tTELL { $$ = g_lingo->code1(g_lingo->c_tellcode); g_lingo->code1(STOP); } -expr: INT { $$ = g_lingo->codeConst($1); } +expr: INT { $$ = g_lingo->codeInt($1); } | FLOAT { - $$ = g_lingo->code1(g_lingo->c_fconstpush); + $$ = g_lingo->code1(g_lingo->c_floatpush); g_lingo->codeFloat($1); } | SYMBOL { // D3 $$ = g_lingo->code1(g_lingo->c_symbolpush); @@ -440,7 +440,7 @@ expr: INT { $$ = g_lingo->codeConst($1); } g_lingo->codeString($1->c_str()); delete $1; } | THEENTITY { - $$ = g_lingo->codeConst(0); // Put dummy id + $$ = g_lingo->codeInt(0); // Put dummy id g_lingo->code1(g_lingo->c_theentitypush); inst e = 0, f = 0; WRITE_UINT32(&e, $1[0]); @@ -545,13 +545,13 @@ gotofunc: tGO tLOOP { g_lingo->code1(g_lingo->c_gotoloop); } | tGO tNEXT { g_lingo->code1(g_lingo->c_gotonext); } | tGO tPREVIOUS { g_lingo->code1(g_lingo->c_gotoprevious); } | tGO gotoframe { - g_lingo->codeConst(1); + g_lingo->codeInt(1); g_lingo->code1(g_lingo->c_goto); } | tGO gotoframe gotomovie { - g_lingo->codeConst(3); + g_lingo->codeInt(3); g_lingo->code1(g_lingo->c_goto); } | tGO gotomovie { - g_lingo->codeConst(2); + g_lingo->codeInt(2); g_lingo->code1(g_lingo->c_goto); } ; @@ -565,13 +565,13 @@ gotomovie: tOF tMOVIE expr playfunc: tPLAY tDONE { g_lingo->code1(g_lingo->c_playdone); } | tPLAY gotoframe { - g_lingo->codeConst(1); + g_lingo->codeInt(1); g_lingo->code1(g_lingo->c_play); } | tPLAY gotoframe gotomovie { - g_lingo->codeConst(3); + g_lingo->codeInt(3); g_lingo->code1(g_lingo->c_play); } | tPLAY gotomovie { - g_lingo->codeConst(2); + g_lingo->codeInt(2); g_lingo->code1(g_lingo->c_play); } | tPLAYACCEL { g_lingo->codeSetImmediate(true); } arglist { g_lingo->codeSetImmediate(false); diff --git a/engines/director/lingo/lingo.h b/engines/director/lingo/lingo.h index 10ac868592..bc6a6a1af6 100644 --- a/engines/director/lingo/lingo.h +++ b/engines/director/lingo/lingo.h @@ -208,7 +208,7 @@ public: int code3(inst code_1, inst code_2, inst code_3) { int o = code1(code_1); code1(code_2); code1(code_3); return o; } int codeString(const char *s); void codeLabel(int label); - int codeConst(int val); + int codeInt(int val); int codeArray(int arraySize); int calcStringAlignment(const char *s) { @@ -261,9 +261,9 @@ public: static void c_wordOf(); static void c_wordToOf(); - static void c_constpush(); + static void c_intpush(); static void c_voidpush(); - static void c_fconstpush(); + static void c_floatpush(); static void c_stringpush(); static void c_symbolpush(); static void c_varpush(); |