Skip to content

Commit

Permalink
DIRECTOR: Lingo: Beginning of the stack definition
Browse files Browse the repository at this point in the history
  • Loading branch information
sev- committed Aug 3, 2016
1 parent 6d2a7aa commit 7760ea8
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions engines/director/lingo/lingo.h
Expand Up @@ -73,8 +73,25 @@ enum LEvent {
typedef void (*inst)(void);
#define STOP (inst)0

typedef struct Symbol { /* symbol table entry */
char *name;
long type;
union {
int val; /* VAR */
float fval; /* FLOAT */
inst *defn; /* FUNCTION, PROCEDURE */
char *str; /* STRING */
} u;
} Symbol;

typedef union Datum { /* interpreter stack type */
double val;
Symbol *sym;
} Datum;

typedef Common::Array<inst> ScriptData;
typedef Common::HashMap<int32, ScriptData *> ScriptHash;
typedef Common::Array<Datum> StackData;

class Lingo {
public:
Expand Down Expand Up @@ -115,6 +132,8 @@ class Lingo {
ScriptHash _scripts[kMaxScriptType + 1];
ScriptData *_currentScript;

StackData _stack;

DirectorEngine *_vm;
};

Expand Down

0 comments on commit 7760ea8

Please sign in to comment.