ScummVM API documentation
token.h
1 /* ScummVM - Graphic Adventure Engine
2  *
3  * ScummVM is the legal property of its developers, whose names
4  * are too numerous to list here. Please refer to the COPYRIGHT
5  * file distributed with this source distribution.
6  *
7  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program. If not, see <http://www.gnu.org/licenses/>.
19  *
20  */
21 
22 // Based on Phantasma code by Thomas Harte (2013),
23 // available at https://github.com/TomHarte/Phantasma/ (MIT)
24 
25 #ifndef FREESCAPE_TOKEN_H
26 #define FREESCAPE_TOKEN_H
27 
28 namespace Freescape {
29 
30 struct Token {
31 public:
32  enum Type {
33  ADDVAR,
34  AGAIN,
35  AND,
36  ANDV,
37  CONDITIONAL,
38  DELAY,
39  DESTROY,
40  DESTROYEDQ,
41  ELSE,
42  END,
43  ENDGAME,
44  ENDIF,
45  EXECUTE,
46  GOTO,
47  IF,
48  INVIS,
49  INVISQ,
50  INCLUDE,
51  LOOP,
52  MODE,
53  MOVE,
54  MOVETO,
55  NOTV,
56  NOP,
57  OR,
58  ORV,
59  GETXPOS,
60  GETYPOS,
61  GETZPOS,
62  PRINT,
63  RESTART,
64  REDRAW,
65  REMOVE,
66  SCREEN,
67  SOUND,
68  SETVAR,
69  SETFLAGS,
70  START,
71  STARTANIM,
72  STOPANIM,
73  SPFX,
74  SUBVAR,
75  SYNCSND,
76  THEN,
77  TOGVIS,
78  TRIGANIM,
79  UPDATEI,
80  VAREQ,
81  IFGTEQ,
82  IFLTEQ,
83  VISQ,
84  VIS,
85  WAIT,
86  WAITTRIG,
87  COMMA,
88  OPENBRACKET,
89  CLOSEBRACKET,
90  CONSTANT,
91  VARIABLE,
92  STRINGLITERAL,
93  UNKNOWN,
94  ENDOFFILE,
95  SETBIT,
96  CLEARBIT,
97  TOGGLEBIT,
98  SWAPJET,
99  BITNOTEQ,
100  VARNOTEQ
101  };
102 
103  Type getType();
104 
105  Token() {
106  _type = UNKNOWN;
107  _value = 0;
108  }
109  Token(Type type_) {
110  _type = type_;
111  _value = 0;
112  }
113 
114 private:
115  Type _type;
116  int32 _value;
117 };
118 
119 } // End of namespace Freescape
120 
121 #endif // FREESCAPE_TOKEN_H
Definition: area.h:36
Definition: token.h:30