DIRECTOR: LINGO: Add DatumType enum

This commit is contained in:
djsrv 2021-06-15 00:48:28 -04:00 committed by D.J. Servilla
parent 688ca6b299
commit 34d8aabc4b
10 changed files with 24 additions and 11 deletions

View File

@ -46,7 +46,6 @@
#include "director/lingo/lingo-builtins.h"
#include "director/lingo/lingo-code.h"
#include "director/lingo/lingo-object.h"
#include "director/lingo/lingo-gr.h"
namespace Director {
@ -339,7 +338,7 @@ void Lingo::printSTUBWithArglist(const char *funcname, int nargs, const char *pr
}
void Lingo::convertVOIDtoString(int arg, int nargs) {
if (_stack[_stack.size() - nargs + arg].type == VOIDSYM) {
if (_stack[_stack.size() - nargs + arg].type == VOID) {
if (_stack[_stack.size() - nargs + arg].u.s != NULL)
g_lingo->_stack[_stack.size() - nargs + arg].type = STRING;
else

View File

@ -35,7 +35,6 @@
#include "director/lingo/lingo-bytecode.h"
#include "director/lingo/lingo-object.h"
#include "director/lingo/lingo-the.h"
#include "director/lingo/lingo-gr.h"
namespace Director {

View File

@ -56,7 +56,6 @@
#include "director/lingo/lingo-code.h"
#include "director/lingo/lingo-object.h"
#include "director/lingo/lingo-the.h"
#include "director/lingo/lingo-gr.h"
namespace Director {

View File

@ -49,7 +49,6 @@
#include "director/lingo/lingo.h"
#include "director/lingo/lingo-code.h"
#include "director/lingo/lingo-object.h"
#include "director/lingo/lingo-gr.h"
namespace Director {

View File

@ -38,7 +38,6 @@
#include "director/util.h"
#include "director/lingo/lingo.h"
#include "director/lingo/lingo-gr.h"
namespace Director {

View File

@ -32,7 +32,6 @@
#include "director/lingo/lingo-code.h"
#include "director/lingo/lingo-object.h"
#include "director/lingo/lingo-the.h"
#include "director/lingo/lingo-gr.h"
#include "director/lingo/xlibs/fileio.h"
#include "director/lingo/xlibs/palxobj.h"
#include "director/lingo/xlibs/flushxobj.h"

View File

@ -23,9 +23,8 @@
#ifndef DIRECTOR_LINGO_OBJECT_H
#define DIRECTOR_LINGO_OBJECT_H
// FIXME: Basic Lingo types like Datum should probably be in a separate, smaller header
#include "director/director.h"
#include "director/lingo/lingo.h"
#include "director/lingo/lingo-gr.h"
namespace Director {

View File

@ -37,7 +37,6 @@
#include "director/lingo/lingo-code.h"
#include "director/lingo/lingo-object.h"
#include "director/lingo/lingo-the.h"
#include "director/lingo/lingo-gr.h"
namespace Director {
class Sprite;

View File

@ -25,6 +25,7 @@
#include "common/hash-ptr.h"
#include "common/hash-str.h"
#include "common/str-array.h"
#include "director/types.h"
@ -44,6 +45,7 @@ struct LingoArchive;
struct LingoV4Bytecode;
struct LingoV4TheEntity;
class AbstractObject;
class Cast;
class ScriptContext;
class DirectorEngine;
class Frame;
@ -109,7 +111,7 @@ struct Symbol { /* symbol table entry */
};
struct Datum { /* interpreter stack type */
int type;
DatumType type;
union {
int i; /* INT, ARGC, ARGCNORET */

View File

@ -332,6 +332,25 @@ enum FileVersion {
kFileVer1201 = 0x79F
};
enum DatumType {
ARRAY,
ARGC,
ARGCNORET,
CASTREF,
CHUNKREF,
FIELDREF,
FLOAT,
INT,
OBJECT,
PARRAY,
POINT,
STRING,
SYMBOL,
VAR,
VOID,
RECT
};
struct Datum;
struct PCell;
typedef Common::Array<Datum> DatumArray;