diff options
author | Eugene Sandulenko | 2016-08-04 14:50:08 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2016-08-04 14:50:08 +0200 |
commit | e7cc065c6ce646acb291d1d7784f20dffa3929d2 (patch) | |
tree | 55728c6e236ee7a54f24dfdd5065af6c8b638c45 /engines/director/lingo | |
parent | 4551a254d211669ad61a666f568a4f41640a9368 (diff) | |
download | scummvm-rg350-e7cc065c6ce646acb291d1d7784f20dffa3929d2.tar.gz scummvm-rg350-e7cc065c6ce646acb291d1d7784f20dffa3929d2.tar.bz2 scummvm-rg350-e7cc065c6ce646acb291d1d7784f20dffa3929d2.zip |
DIRECTOR: Lingo: Fix WinCE compilation.
The plafrom has VOID defined
Diffstat (limited to 'engines/director/lingo')
-rw-r--r-- | engines/director/lingo/lingo-code.cpp | 12 | ||||
-rw-r--r-- | engines/director/lingo/lingo-codegen.cpp | 2 | ||||
-rw-r--r-- | engines/director/lingo/lingo-gr.cpp | 6 | ||||
-rw-r--r-- | engines/director/lingo/lingo-gr.h | 4 | ||||
-rw-r--r-- | engines/director/lingo/lingo-gr.y | 2 | ||||
-rw-r--r-- | engines/director/lingo/lingo-the.cpp | 10 | ||||
-rw-r--r-- | engines/director/lingo/lingo.cpp | 6 | ||||
-rw-r--r-- | engines/director/lingo/lingo.h | 2 |
8 files changed, 22 insertions, 22 deletions
diff --git a/engines/director/lingo/lingo-code.cpp b/engines/director/lingo/lingo-code.cpp index 4c88e5d6e9..f48f29ad50 100644 --- a/engines/director/lingo/lingo-code.cpp +++ b/engines/director/lingo/lingo-code.cpp @@ -58,7 +58,7 @@ void Lingo::push(Datum d) { void Lingo::pushVoid() { Datum d; d.u.i = 0; - d.type = VOID; + d.type = VOIDVAL; push(d); } @@ -80,7 +80,7 @@ void Lingo::c_printtop(void) { Datum d = g_lingo->pop(); switch (d.type) { - case VOID: + case VOIDVAL: warning("Void"); break; case INT: @@ -173,7 +173,7 @@ void Lingo::c_assign() { return; } - if (d1.u.sym->type != INT && d1.u.sym->type != VOID && + if (d1.u.sym->type != INT && d1.u.sym->type != VOIDVAL && d1.u.sym->type != FLOAT && d1.u.sym->type != STRING) { warning("assignment to non-variable '%s'", d1.u.sym->name); return; @@ -207,13 +207,13 @@ void Lingo::c_assign() { } bool Lingo::verify(Symbol *s) { - if (s->type != INT && s->type != VOID && s->type != FLOAT && s->type != STRING && s->type != POINT) { + if (s->type != INT && s->type != VOIDVAL && s->type != FLOAT && s->type != STRING && s->type != POINT) { warning("attempt to evaluate non-variable '%s'", s->name); return false; } - if (s->type == VOID) + if (s->type == VOIDVAL) warning("Variable used before assigning a value '%s'", s->name); return true; @@ -733,7 +733,7 @@ void Lingo::c_call() { Datum d; d.u.i = 0; - d.type = VOID; + d.type = VOIDVAL; g_lingo->push(d); } diff --git a/engines/director/lingo/lingo-codegen.cpp b/engines/director/lingo/lingo-codegen.cpp index 07fb52290c..885b6a2a55 100644 --- a/engines/director/lingo/lingo-codegen.cpp +++ b/engines/director/lingo/lingo-codegen.cpp @@ -95,7 +95,7 @@ Symbol *Lingo::lookupVar(const char *name, bool create, bool putInGlobalList) { sym = new Symbol; sym->name = (char *)calloc(strlen(name) + 1, 1); Common::strlcpy(sym->name, name, strlen(name) + 1); - sym->type = VOID; + sym->type = VOIDVAL; sym->u.i = 0; (*_localvars)[name] = sym; diff --git a/engines/director/lingo/lingo-gr.cpp b/engines/director/lingo/lingo-gr.cpp index 3791239782..58789d2ae3 100644 --- a/engines/director/lingo/lingo-gr.cpp +++ b/engines/director/lingo/lingo-gr.cpp @@ -68,7 +68,7 @@ enum yytokentype { CASTREF = 258, UNARY = 259, - VOID = 260, + VOIDVAL = 260, VAR = 261, POINT = 262, RECT = 263, @@ -132,7 +132,7 @@ /* Tokens. */ #define CASTREF 258 #define UNARY 259 -#define VOID 260 +#define VOIDVAL 260 #define VAR 261 #define POINT 262 #define RECT 263 @@ -623,7 +623,7 @@ static const yytype_uint16 yyrline[] = First, the terminals, then, starting at YYNTOKENS, nonterminals. */ static const char *const yytname[] = { - "$end", "error", "$undefined", "CASTREF", "UNARY", "VOID", "VAR", + "$end", "error", "$undefined", "CASTREF", "UNARY", "VOIDVAL", "VAR", "POINT", "RECT", "ARRAY", "SYMBOL", "INT", "THEENTITY", "THEENTITYWITHID", "FLOAT", "BLTIN", "BLTINNOARGS", "ID", "STRING", "HANDLER", "tDOWN", "tELSE", "tNLELSIF", "tEND", "tEXIT", "tFRAME", diff --git a/engines/director/lingo/lingo-gr.h b/engines/director/lingo/lingo-gr.h index a806533d2f..241c4299b4 100644 --- a/engines/director/lingo/lingo-gr.h +++ b/engines/director/lingo/lingo-gr.h @@ -41,7 +41,7 @@ enum yytokentype { CASTREF = 258, UNARY = 259, - VOID = 260, + VOIDVAL = 260, VAR = 261, POINT = 262, RECT = 263, @@ -105,7 +105,7 @@ /* Tokens. */ #define CASTREF 258 #define UNARY 259 -#define VOID 260 +#define VOIDVAL 260 #define VAR 261 #define POINT 262 #define RECT 263 diff --git a/engines/director/lingo/lingo-gr.y b/engines/director/lingo/lingo-gr.y index 9a10916048..b70e318c07 100644 --- a/engines/director/lingo/lingo-gr.y +++ b/engines/director/lingo/lingo-gr.y @@ -76,7 +76,7 @@ void yyerror(char *s) { Common::Array<double> *arr; } -%token CASTREF UNARY VOID VAR POINT RECT ARRAY SYMBOL +%token CASTREF UNARY VOIDVAL VAR POINT RECT ARRAY SYMBOL %token<i> INT %token<e> THEENTITY THEENTITYWITHID %token<f> FLOAT diff --git a/engines/director/lingo/lingo-the.cpp b/engines/director/lingo/lingo-the.cpp index 2aedf32a54..cf303aa5ee 100644 --- a/engines/director/lingo/lingo-the.cpp +++ b/engines/director/lingo/lingo-the.cpp @@ -320,7 +320,7 @@ Datum Lingo::getTheEntity(int entity, Datum &id, int field) { break; default: warning("Unprocessed getting field %d of entity %d", field, entity); - d.type = VOID; + d.type = VOIDVAL; } return d; @@ -431,7 +431,7 @@ Datum Lingo::getTheSprite(Datum &id1, int field) { break; default: warning("Unprocessed getting field %d of sprite", field); - d.type = VOID; + d.type = VOIDVAL; } return d; @@ -497,7 +497,7 @@ Datum Lingo::getTheCast(Datum &id1, int field) { { if (cast->type != kCastShape) { warning("Field %d of cast %d not found", field, id); - d.type = VOID; + d.type = VOIDVAL; return d; } @@ -509,7 +509,7 @@ Datum Lingo::getTheCast(Datum &id1, int field) { { if (cast->type != kCastShape) { warning("Field %d of cast %d not found", field, id); - d.type = VOID; + d.type = VOIDVAL; return d; } @@ -522,7 +522,7 @@ Datum Lingo::getTheCast(Datum &id1, int field) { break; default: warning("Unprocessed getting field %d of cast %d", field, id); - d.type = VOID; + d.type = VOIDVAL; //TODO find out about String fields } diff --git a/engines/director/lingo/lingo.cpp b/engines/director/lingo/lingo.cpp index 0bb43092f3..d13de6a1dd 100644 --- a/engines/director/lingo/lingo.cpp +++ b/engines/director/lingo/lingo.cpp @@ -69,7 +69,7 @@ struct EventHandlerType { Symbol::Symbol() { name = NULL; - type = VOID; + type = VOIDVAL; u.s = NULL; nargs = 0; global = false; @@ -302,8 +302,8 @@ const char *Datum::type2str(bool isk) { return isk ? "#string" : "STRING"; case CASTREF: return "CASTREF"; - case VOID: - return isk ? "#void" : "VOID"; + case VOIDVAL: + return isk ? "#void" : "VOIDVAL"; case POINT: return isk ? "#point" : "POINT"; case SYMBOL: diff --git a/engines/director/lingo/lingo.h b/engines/director/lingo/lingo.h index 3bec29832e..51cc649670 100644 --- a/engines/director/lingo/lingo.h +++ b/engines/director/lingo/lingo.h @@ -106,7 +106,7 @@ struct Datum { /* interpreter stack type */ FloatArray *arr; /* ARRAY, POINT, RECT */ } u; - Datum() { u.sym = NULL; type = VOID; } + Datum() { u.sym = NULL; type = VOIDVAL; } double toFloat(); int toInt(); |