diff options
author | Eugene Sandulenko | 2016-06-20 22:33:41 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2016-08-03 23:40:36 +0200 |
commit | 6983f3f68b00481905b8a0a53cd367da153a9da9 (patch) | |
tree | 0af10af924a506762afb7ddadd059782c0c2d4c6 /engines | |
parent | 79a91588b82af804bd809141782474758b158f82 (diff) | |
download | scummvm-rg350-6983f3f68b00481905b8a0a53cd367da153a9da9.tar.gz scummvm-rg350-6983f3f68b00481905b8a0a53cd367da153a9da9.tar.bz2 scummvm-rg350-6983f3f68b00481905b8a0a53cd367da153a9da9.zip |
DIRECTOR: Lingo: Renamed func_->c_ and exec_->func_->
Diffstat (limited to 'engines')
-rw-r--r-- | engines/director/lingo/lingo-code.cpp | 60 | ||||
-rw-r--r-- | engines/director/lingo/lingo-funcs.cpp | 6 | ||||
-rw-r--r-- | engines/director/lingo/lingo-gr.cpp | 58 | ||||
-rw-r--r-- | engines/director/lingo/lingo-gr.y | 58 | ||||
-rw-r--r-- | engines/director/lingo/lingo.h | 58 |
5 files changed, 120 insertions, 120 deletions
diff --git a/engines/director/lingo/lingo-code.cpp b/engines/director/lingo/lingo-code.cpp index a77d6fc01e..7f51be57d4 100644 --- a/engines/director/lingo/lingo-code.cpp +++ b/engines/director/lingo/lingo-code.cpp @@ -72,24 +72,24 @@ Datum Lingo::pop(void) { return ret; } -void Lingo::func_xpop() { +void Lingo::c_xpop() { g_lingo->pop(); } -void Lingo::func_printtop(void) { +void Lingo::c_printtop(void) { Datum d = g_lingo->pop(); warning("%d", d.val); } -void Lingo::func_constpush() { +void Lingo::c_constpush() { Datum d; inst i = (*g_lingo->_currentScript)[g_lingo->_pc++]; d.val = READ_LE_UINT32(&i); g_lingo->push(d); } -void Lingo::func_varpush() { +void Lingo::c_varpush() { Datum d; Symbol *sym; char *name = (char *)&(*g_lingo->_currentScript)[g_lingo->_pc]; @@ -113,7 +113,7 @@ void Lingo::func_varpush() { g_lingo->push(d); } -void Lingo::func_assign() { +void Lingo::c_assign() { Datum d1, d2; d1 = g_lingo->pop(); d2 = g_lingo->pop(); @@ -144,7 +144,7 @@ bool Lingo::verify(Symbol *s) { return true; } -void Lingo::func_eval() { +void Lingo::c_eval() { Datum d; d = g_lingo->pop(); @@ -156,7 +156,7 @@ void Lingo::func_eval() { g_lingo->push(d); } -void Lingo::func_add() { +void Lingo::c_add() { Datum d2 = g_lingo->pop(); Datum d1 = g_lingo->pop(); @@ -164,7 +164,7 @@ void Lingo::func_add() { g_lingo->push(d1); } -void Lingo::func_sub() { +void Lingo::c_sub() { Datum d2 = g_lingo->pop(); Datum d1 = g_lingo->pop(); @@ -172,7 +172,7 @@ void Lingo::func_sub() { g_lingo->push(d1); } -void Lingo::func_mul() { +void Lingo::c_mul() { Datum d2 = g_lingo->pop(); Datum d1 = g_lingo->pop(); @@ -180,7 +180,7 @@ void Lingo::func_mul() { g_lingo->push(d1); } -void Lingo::func_div() { +void Lingo::c_div() { Datum d2 = g_lingo->pop(); if (d2.val == 0) @@ -192,14 +192,14 @@ void Lingo::func_div() { g_lingo->push(d1); } -void Lingo::func_negate() { +void Lingo::c_negate() { Datum d = g_lingo->pop(); d.val -= d.val; g_lingo->push(d); } -void Lingo::func_eq() { +void Lingo::c_eq() { Datum d2 = g_lingo->pop(); Datum d1 = g_lingo->pop(); @@ -207,7 +207,7 @@ void Lingo::func_eq() { g_lingo->push(d1); } -void Lingo::func_neq() { +void Lingo::c_neq() { Datum d2 = g_lingo->pop(); Datum d1 = g_lingo->pop(); @@ -215,7 +215,7 @@ void Lingo::func_neq() { g_lingo->push(d1); } -void Lingo::func_gt() { +void Lingo::c_gt() { Datum d2 = g_lingo->pop(); Datum d1 = g_lingo->pop(); @@ -223,7 +223,7 @@ void Lingo::func_gt() { g_lingo->push(d1); } -void Lingo::func_lt() { +void Lingo::c_lt() { Datum d2 = g_lingo->pop(); Datum d1 = g_lingo->pop(); @@ -231,7 +231,7 @@ void Lingo::func_lt() { g_lingo->push(d1); } -void Lingo::func_ge() { +void Lingo::c_ge() { Datum d2 = g_lingo->pop(); Datum d1 = g_lingo->pop(); @@ -239,7 +239,7 @@ void Lingo::func_ge() { g_lingo->push(d1); } -void Lingo::func_le() { +void Lingo::c_le() { Datum d2 = g_lingo->pop(); Datum d1 = g_lingo->pop(); @@ -248,7 +248,7 @@ void Lingo::func_le() { } -void Lingo::func_ifcode() { +void Lingo::c_ifcode() { Datum d; int savepc = g_lingo->_pc; /* then part */ @@ -276,42 +276,42 @@ void Lingo::func_ifcode() { //************************ // Built-in functions //************************ -void Lingo::func_mci() { +void Lingo::c_mci() { Common::String s((char *)&(*g_lingo->_currentScript)[g_lingo->_pc]); - g_lingo->exec_mci(s); + g_lingo->func_mci(s); g_lingo->_pc += g_lingo->calcStringAlignment(s.c_str()); } -void Lingo::func_mciwait() { +void Lingo::c_mciwait() { Common::String s((char *)&(*g_lingo->_currentScript)[g_lingo->_pc]); - g_lingo->exec_mciwait(s); + g_lingo->func_mciwait(s); g_lingo->_pc += g_lingo->calcStringAlignment(s.c_str()); } -void Lingo::func_goto() { +void Lingo::c_goto() { Common::String frame((char *)&(*g_lingo->_currentScript)[g_lingo->_pc]); g_lingo->_pc += g_lingo->calcStringAlignment(frame.c_str()); Common::String movie((char *)&(*g_lingo->_currentScript)[g_lingo->_pc]); g_lingo->_pc += g_lingo->calcStringAlignment(movie.c_str()); - g_lingo->exec_goto(frame, movie); + g_lingo->func_goto(frame, movie); } -void Lingo::func_gotoloop() { - warning("STUB: func_gotoloop()"); +void Lingo::c_gotoloop() { + warning("STUB: c_gotoloop()"); } -void Lingo::func_gotonext() { - warning("STUB: func_gotonext()"); +void Lingo::c_gotonext() { + warning("STUB: c_gotonext()"); } -void Lingo::func_gotoprevious() { - warning("STUB: func_gotoprevious()"); +void Lingo::c_gotoprevious() { + warning("STUB: c_gotoprevious()"); } } diff --git a/engines/director/lingo/lingo-funcs.cpp b/engines/director/lingo/lingo-funcs.cpp index 6fbd35c7cb..6975df6d4d 100644 --- a/engines/director/lingo/lingo-funcs.cpp +++ b/engines/director/lingo/lingo-funcs.cpp @@ -87,7 +87,7 @@ struct MCIToken { { kMCITokenNone, kMCITokenNone, 0, 0 } }; -void Lingo::exec_mci(Common::String &s) { +void Lingo::func_mci(Common::String &s) { Common::String params[5]; MCITokenType command = kMCITokenNone; @@ -185,11 +185,11 @@ void Lingo::exec_mci(Common::String &s) { } } -void Lingo::exec_mciwait(Common::String &s) { +void Lingo::func_mciwait(Common::String &s) { warning("STUB: MCI wait file: %s", s.c_str()); } -void Lingo::exec_goto(Common::String &frame, Common::String &movie) { +void Lingo::func_goto(Common::String &frame, Common::String &movie) { warning("STUB: go to %s movie %s", frame.c_str(), movie.c_str()); } diff --git a/engines/director/lingo/lingo-gr.cpp b/engines/director/lingo/lingo-gr.cpp index c182f3fe82..c8f1fabbee 100644 --- a/engines/director/lingo/lingo-gr.cpp +++ b/engines/director/lingo/lingo-gr.cpp @@ -1491,12 +1491,12 @@ yyreduce: { case 6: #line 96 "engines/director/lingo/lingo-gr.y" - { g_lingo->code1(g_lingo->func_xpop); ;} + { g_lingo->code1(g_lingo->c_xpop); ;} break; case 8: #line 98 "engines/director/lingo/lingo-gr.y" - { g_lingo->code1(g_lingo->func_printtop); ;} + { g_lingo->code1(g_lingo->c_printtop); ;} break; case 9: @@ -1506,22 +1506,22 @@ yyreduce: case 11: #line 103 "engines/director/lingo/lingo-gr.y" - { g_lingo->code1(g_lingo->func_varpush); g_lingo->codeString((yyvsp[(4) - (4)].s)->c_str()); g_lingo->code1(g_lingo->func_assign); (yyval.code) = (yyvsp[(2) - (4)].code); delete (yyvsp[(4) - (4)].s); ;} + { g_lingo->code1(g_lingo->c_varpush); g_lingo->codeString((yyvsp[(4) - (4)].s)->c_str()); g_lingo->code1(g_lingo->c_assign); (yyval.code) = (yyvsp[(2) - (4)].code); delete (yyvsp[(4) - (4)].s); ;} break; case 12: #line 104 "engines/director/lingo/lingo-gr.y" - { g_lingo->code1(g_lingo->func_varpush); g_lingo->codeString((yyvsp[(2) - (4)].s)->c_str()); g_lingo->code1(g_lingo->func_assign); (yyval.code) = (yyvsp[(4) - (4)].code); delete (yyvsp[(2) - (4)].s); ;} + { g_lingo->code1(g_lingo->c_varpush); g_lingo->codeString((yyvsp[(2) - (4)].s)->c_str()); g_lingo->code1(g_lingo->c_assign); (yyval.code) = (yyvsp[(4) - (4)].code); delete (yyvsp[(2) - (4)].s); ;} break; case 13: #line 105 "engines/director/lingo/lingo-gr.y" - { g_lingo->code1(g_lingo->func_varpush); g_lingo->codeString((yyvsp[(2) - (4)].s)->c_str()); g_lingo->code1(g_lingo->func_assign); (yyval.code) = (yyvsp[(4) - (4)].code); delete (yyvsp[(2) - (4)].s); ;} + { g_lingo->code1(g_lingo->c_varpush); g_lingo->codeString((yyvsp[(2) - (4)].s)->c_str()); g_lingo->code1(g_lingo->c_assign); (yyval.code) = (yyvsp[(4) - (4)].code); delete (yyvsp[(2) - (4)].s); ;} break; case 14: #line 108 "engines/director/lingo/lingo-gr.y" - { g_lingo->code1(g_lingo->func_xpop); ;} + { g_lingo->code1(g_lingo->c_xpop); ;} break; case 15: @@ -1548,57 +1548,57 @@ yyreduce: case 17: #line 125 "engines/director/lingo/lingo-gr.y" - { g_lingo->code1(g_lingo->func_constpush); inst i; WRITE_LE_UINT32(&i, (yyvsp[(1) - (1)].i)); (yyval.code) = g_lingo->code1(i); ;} + { g_lingo->code1(g_lingo->c_constpush); inst i; WRITE_LE_UINT32(&i, (yyvsp[(1) - (1)].i)); (yyval.code) = g_lingo->code1(i); ;} break; case 18: #line 126 "engines/director/lingo/lingo-gr.y" - { g_lingo->code1(g_lingo->func_varpush); g_lingo->codeString((yyvsp[(1) - (1)].s)->c_str()); (yyval.code) = g_lingo->code1(g_lingo->func_eval); delete (yyvsp[(1) - (1)].s); ;} + { g_lingo->code1(g_lingo->c_varpush); g_lingo->codeString((yyvsp[(1) - (1)].s)->c_str()); (yyval.code) = g_lingo->code1(g_lingo->c_eval); delete (yyvsp[(1) - (1)].s); ;} break; case 20: #line 128 "engines/director/lingo/lingo-gr.y" - { g_lingo->code1(g_lingo->func_add); ;} + { g_lingo->code1(g_lingo->c_add); ;} break; case 21: #line 129 "engines/director/lingo/lingo-gr.y" - { g_lingo->code1(g_lingo->func_sub); ;} + { g_lingo->code1(g_lingo->c_sub); ;} break; case 22: #line 130 "engines/director/lingo/lingo-gr.y" - { g_lingo->code1(g_lingo->func_mul); ;} + { g_lingo->code1(g_lingo->c_mul); ;} break; case 23: #line 131 "engines/director/lingo/lingo-gr.y" - { g_lingo->code1(g_lingo->func_div); ;} + { g_lingo->code1(g_lingo->c_div); ;} break; case 24: #line 132 "engines/director/lingo/lingo-gr.y" - { g_lingo->code1(g_lingo->func_gt); ;} + { g_lingo->code1(g_lingo->c_gt); ;} break; case 25: #line 133 "engines/director/lingo/lingo-gr.y" - { g_lingo->code1(g_lingo->func_lt); ;} + { g_lingo->code1(g_lingo->c_lt); ;} break; case 26: #line 134 "engines/director/lingo/lingo-gr.y" - { g_lingo->code1(g_lingo->func_neq); ;} + { g_lingo->code1(g_lingo->c_neq); ;} break; case 27: #line 135 "engines/director/lingo/lingo-gr.y" - { g_lingo->code1(g_lingo->func_ge); ;} + { g_lingo->code1(g_lingo->c_ge); ;} break; case 28: #line 136 "engines/director/lingo/lingo-gr.y" - { g_lingo->code1(g_lingo->func_le); ;} + { g_lingo->code1(g_lingo->c_le); ;} break; case 29: @@ -1608,7 +1608,7 @@ yyreduce: case 30: #line 138 "engines/director/lingo/lingo-gr.y" - { (yyval.code) = (yyvsp[(2) - (2)].code); g_lingo->code1(g_lingo->func_negate); ;} + { (yyval.code) = (yyvsp[(2) - (2)].code); g_lingo->code1(g_lingo->c_negate); ;} break; case 31: @@ -1623,12 +1623,12 @@ yyreduce: case 33: #line 143 "engines/director/lingo/lingo-gr.y" - { g_lingo->code2(g_lingo->func_eq, STOP); ;} + { g_lingo->code2(g_lingo->c_eq, STOP); ;} break; case 35: #line 146 "engines/director/lingo/lingo-gr.y" - { (yyval.code) = g_lingo->code1(g_lingo->func_ifcode); g_lingo->code3(STOP,STOP,STOP); ;} + { (yyval.code) = g_lingo->code1(g_lingo->c_ifcode); g_lingo->code3(STOP,STOP,STOP); ;} break; case 36: @@ -1643,47 +1643,47 @@ yyreduce: case 40: #line 155 "engines/director/lingo/lingo-gr.y" - { g_lingo->code1(g_lingo->func_mci); g_lingo->codeString((yyvsp[(2) - (2)].s)->c_str()); delete (yyvsp[(2) - (2)].s); ;} + { g_lingo->code1(g_lingo->c_mci); g_lingo->codeString((yyvsp[(2) - (2)].s)->c_str()); delete (yyvsp[(2) - (2)].s); ;} break; case 41: #line 156 "engines/director/lingo/lingo-gr.y" - { g_lingo->code1(g_lingo->func_mciwait); g_lingo->codeString((yyvsp[(2) - (2)].s)->c_str()); delete (yyvsp[(2) - (2)].s); ;} + { g_lingo->code1(g_lingo->c_mciwait); g_lingo->codeString((yyvsp[(2) - (2)].s)->c_str()); delete (yyvsp[(2) - (2)].s); ;} break; case 42: #line 157 "engines/director/lingo/lingo-gr.y" - { g_lingo->code1(g_lingo->func_printtop); ;} + { g_lingo->code1(g_lingo->c_printtop); ;} break; case 44: #line 169 "engines/director/lingo/lingo-gr.y" - { g_lingo->code1(g_lingo->func_gotoloop); ;} + { g_lingo->code1(g_lingo->c_gotoloop); ;} break; case 45: #line 170 "engines/director/lingo/lingo-gr.y" - { g_lingo->code1(g_lingo->func_gotonext); ;} + { g_lingo->code1(g_lingo->c_gotonext); ;} break; case 46: #line 171 "engines/director/lingo/lingo-gr.y" - { g_lingo->code1(g_lingo->func_gotoprevious); ;} + { g_lingo->code1(g_lingo->c_gotoprevious); ;} break; case 47: #line 172 "engines/director/lingo/lingo-gr.y" - { g_lingo->code1(g_lingo->func_goto); g_lingo->codeString((yyvsp[(2) - (2)].s)->c_str()); g_lingo->codeString(""); delete (yyvsp[(2) - (2)].s); ;} + { g_lingo->code1(g_lingo->c_goto); g_lingo->codeString((yyvsp[(2) - (2)].s)->c_str()); g_lingo->codeString(""); delete (yyvsp[(2) - (2)].s); ;} break; case 48: #line 173 "engines/director/lingo/lingo-gr.y" - { g_lingo->code1(g_lingo->func_goto); g_lingo->codeString((yyvsp[(2) - (3)].s)->c_str()); g_lingo->codeString((yyvsp[(3) - (3)].s)->c_str()); delete (yyvsp[(2) - (3)].s); delete (yyvsp[(3) - (3)].s); ;} + { g_lingo->code1(g_lingo->c_goto); g_lingo->codeString((yyvsp[(2) - (3)].s)->c_str()); g_lingo->codeString((yyvsp[(3) - (3)].s)->c_str()); delete (yyvsp[(2) - (3)].s); delete (yyvsp[(3) - (3)].s); ;} break; case 49: #line 174 "engines/director/lingo/lingo-gr.y" - { g_lingo->code1(g_lingo->func_goto); g_lingo->codeString(""); g_lingo->codeString((yyvsp[(2) - (2)].s)->c_str()); delete (yyvsp[(2) - (2)].s); ;} + { g_lingo->code1(g_lingo->c_goto); g_lingo->codeString(""); g_lingo->codeString((yyvsp[(2) - (2)].s)->c_str()); delete (yyvsp[(2) - (2)].s); ;} break; case 50: diff --git a/engines/director/lingo/lingo-gr.y b/engines/director/lingo/lingo-gr.y index 1ba4cc9bee..1ab88ee9ab 100644 --- a/engines/director/lingo/lingo-gr.y +++ b/engines/director/lingo/lingo-gr.y @@ -93,19 +93,19 @@ program: programline '\n' program programline: | func - | asgn { g_lingo->code1(g_lingo->func_xpop); } + | asgn { g_lingo->code1(g_lingo->c_xpop); } | stmt - | expr { g_lingo->code1(g_lingo->func_printtop); } + | expr { g_lingo->code1(g_lingo->c_printtop); } | error { yyerrok; } | /* empty */ ; -asgn: tPUT expr tINTO VAR { g_lingo->code1(g_lingo->func_varpush); g_lingo->codeString($4->c_str()); g_lingo->code1(g_lingo->func_assign); $$ = $2; delete $4; } - | tSET VAR '=' expr { g_lingo->code1(g_lingo->func_varpush); g_lingo->codeString($2->c_str()); g_lingo->code1(g_lingo->func_assign); $$ = $4; delete $2; } - | tSET VAR tTO expr { g_lingo->code1(g_lingo->func_varpush); g_lingo->codeString($2->c_str()); g_lingo->code1(g_lingo->func_assign); $$ = $4; delete $2; } +asgn: tPUT expr tINTO VAR { g_lingo->code1(g_lingo->c_varpush); g_lingo->codeString($4->c_str()); g_lingo->code1(g_lingo->c_assign); $$ = $2; delete $4; } + | tSET VAR '=' expr { g_lingo->code1(g_lingo->c_varpush); g_lingo->codeString($2->c_str()); g_lingo->code1(g_lingo->c_assign); $$ = $4; delete $2; } + | tSET VAR tTO expr { g_lingo->code1(g_lingo->c_varpush); g_lingo->codeString($2->c_str()); g_lingo->code1(g_lingo->c_assign); $$ = $4; delete $2; } ; -stmt: expr { g_lingo->code1(g_lingo->func_xpop); } +stmt: expr { g_lingo->code1(g_lingo->c_xpop); } | if cond tTHEN stmtlist end tEND tIF { inst then, end; WRITE_LE_UINT32(&then, $4); @@ -122,28 +122,28 @@ stmt: expr { g_lingo->code1(g_lingo->func_xpop); } (*g_lingo->_currentScript)[$1 + 3] = end; } /* end, if cond fails */ ; -expr: INT { g_lingo->code1(g_lingo->func_constpush); inst i; WRITE_LE_UINT32(&i, $1); $$ = g_lingo->code1(i); }; - | VAR { g_lingo->code1(g_lingo->func_varpush); g_lingo->codeString($1->c_str()); $$ = g_lingo->code1(g_lingo->func_eval); delete $1; } +expr: INT { g_lingo->code1(g_lingo->c_constpush); inst i; WRITE_LE_UINT32(&i, $1); $$ = g_lingo->code1(i); }; + | VAR { g_lingo->code1(g_lingo->c_varpush); g_lingo->codeString($1->c_str()); $$ = g_lingo->code1(g_lingo->c_eval); delete $1; } | asgn - | expr '+' expr { g_lingo->code1(g_lingo->func_add); } - | expr '-' expr { g_lingo->code1(g_lingo->func_sub); } - | expr '*' expr { g_lingo->code1(g_lingo->func_mul); } - | expr '/' expr { g_lingo->code1(g_lingo->func_div); } - | expr '>' expr { g_lingo->code1(g_lingo->func_gt); } - | expr '<' expr { g_lingo->code1(g_lingo->func_lt); } - | expr tNEQ expr { g_lingo->code1(g_lingo->func_neq); } - | expr tGE expr { g_lingo->code1(g_lingo->func_ge); } - | expr tLE expr { g_lingo->code1(g_lingo->func_le); } + | expr '+' expr { g_lingo->code1(g_lingo->c_add); } + | expr '-' expr { g_lingo->code1(g_lingo->c_sub); } + | expr '*' expr { g_lingo->code1(g_lingo->c_mul); } + | expr '/' expr { g_lingo->code1(g_lingo->c_div); } + | expr '>' expr { g_lingo->code1(g_lingo->c_gt); } + | expr '<' expr { g_lingo->code1(g_lingo->c_lt); } + | expr tNEQ expr { g_lingo->code1(g_lingo->c_neq); } + | expr tGE expr { g_lingo->code1(g_lingo->c_ge); } + | expr tLE expr { g_lingo->code1(g_lingo->c_le); } | '+' expr %prec UNARY { $$ = $2; } - | '-' expr %prec UNARY { $$ = $2; g_lingo->code1(g_lingo->func_negate); } + | '-' expr %prec UNARY { $$ = $2; g_lingo->code1(g_lingo->c_negate); } | '(' expr ')' { $$ = $2; } ; cond: expr { g_lingo->code1(STOP); } - | expr '=' expr { g_lingo->code2(g_lingo->func_eq, STOP); } + | expr '=' expr { g_lingo->code2(g_lingo->c_eq, STOP); } | '(' cond ')' ; -if: tIF { $$ = g_lingo->code1(g_lingo->func_ifcode); g_lingo->code3(STOP,STOP,STOP); } +if: tIF { $$ = g_lingo->code1(g_lingo->c_ifcode); g_lingo->code3(STOP,STOP,STOP); } ; end: /* nothing */ { g_lingo->code1(STOP); $$ = g_lingo->_currentScript->size(); } ; @@ -152,9 +152,9 @@ stmtlist: /* nothing */ { $$ = g_lingo->_currentScript->size(); } | stmtlist stmt ; -func: tMCI STRING { g_lingo->code1(g_lingo->func_mci); g_lingo->codeString($2->c_str()); delete $2; } - | tMCIWAIT VAR { g_lingo->code1(g_lingo->func_mciwait); g_lingo->codeString($2->c_str()); delete $2; } - | tPUT expr { g_lingo->code1(g_lingo->func_printtop); } +func: tMCI STRING { g_lingo->code1(g_lingo->c_mci); g_lingo->codeString($2->c_str()); delete $2; } + | tMCIWAIT VAR { g_lingo->code1(g_lingo->c_mciwait); g_lingo->codeString($2->c_str()); delete $2; } + | tPUT expr { g_lingo->code1(g_lingo->c_printtop); } | gotofunc ; @@ -166,12 +166,12 @@ func: tMCI STRING { g_lingo->code1(g_lingo->func_mci); g_lingo->codeString($2- // go to {frame} whichFrame {of movie whichMovie} // go to {frame whichFrame of} movie whichMovie -gotofunc: tGO tLOOP { g_lingo->code1(g_lingo->func_gotoloop); } - | tGO tNEXT { g_lingo->code1(g_lingo->func_gotonext); } - | tGO tPREVIOUS { g_lingo->code1(g_lingo->func_gotoprevious); } - | tGO gotoframe { g_lingo->code1(g_lingo->func_goto); g_lingo->codeString($2->c_str()); g_lingo->codeString(""); delete $2; } - | tGO gotoframe gotomovie { g_lingo->code1(g_lingo->func_goto); g_lingo->codeString($2->c_str()); g_lingo->codeString($3->c_str()); delete $2; delete $3; } - | tGO gotomovie { g_lingo->code1(g_lingo->func_goto); g_lingo->codeString(""); g_lingo->codeString($2->c_str()); delete $2; } +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->code1(g_lingo->c_goto); g_lingo->codeString($2->c_str()); g_lingo->codeString(""); delete $2; } + | tGO gotoframe gotomovie { g_lingo->code1(g_lingo->c_goto); g_lingo->codeString($2->c_str()); g_lingo->codeString($3->c_str()); delete $2; delete $3; } + | tGO gotomovie { g_lingo->code1(g_lingo->c_goto); g_lingo->codeString(""); g_lingo->codeString($2->c_str()); delete $2; } ; gotoframe: tTO tFRAME STRING { $$ = $3; } diff --git a/engines/director/lingo/lingo.h b/engines/director/lingo/lingo.h index aabf010576..35ac6ae15c 100644 --- a/engines/director/lingo/lingo.h +++ b/engines/director/lingo/lingo.h @@ -120,36 +120,36 @@ public: public: void execute(int pc); - static void func_xpop(); - static void func_printtop(); - static void func_add(); - static void func_sub(); - static void func_mul(); - static void func_div(); - static void func_negate(); - static void func_constpush(); - static void func_varpush(); - static void func_assign(); + static void c_xpop(); + static void c_printtop(); + static void c_add(); + static void c_sub(); + static void c_mul(); + static void c_div(); + static void c_negate(); + static void c_constpush(); + static void c_varpush(); + static void c_assign(); bool verify(Symbol *s); - static void func_eval(); - static void func_ifcode(); - static void func_eq(); - static void func_neq(); - static void func_gt(); - static void func_lt(); - static void func_ge(); - static void func_le(); - - static void func_mci(); - static void func_mciwait(); - static void func_goto(); - static void func_gotoloop(); - static void func_gotonext(); - static void func_gotoprevious(); - - void exec_mci(Common::String &s); - void exec_mciwait(Common::String &s); - void exec_goto(Common::String &frame, Common::String &movie); + static void c_eval(); + static void c_ifcode(); + static void c_eq(); + static void c_neq(); + static void c_gt(); + static void c_lt(); + static void c_ge(); + static void c_le(); + + static void c_mci(); + static void c_mciwait(); + static void c_goto(); + static void c_gotoloop(); + static void c_gotonext(); + static void c_gotoprevious(); + + void func_mci(Common::String &s); + void func_mciwait(Common::String &s); + void func_goto(Common::String &frame, Common::String &movie); public: ScriptData *_currentScript; |