22 #ifndef DRACI_SCRIPT_H 23 #define DRACI_SCRIPT_H 25 #include "common/array.h" 26 #include "common/stream.h" 45 typedef int (
Script::*GPLOperatorHandler)(int, int)
const;
46 typedef int (
Script::*GPLFunctionHandler)(int)
const;
70 GPLOperatorHandler _handler;
75 GPLFunctionHandler _handler;
96 Script(
DraciEngine *vm) : _vm(vm), _jump(0), _endProgram(
false) { setupCommandList(); }
98 void run(
const GPL2Program &program, uint16 offset);
99 void runWrapper(
const GPL2Program &program, uint16 offset,
bool disableCursor,
bool releaseAnims);
100 bool testExpression(
const GPL2Program &program, uint16 offset)
const;
101 void endCurrentProgram(
bool value) { _endProgram = value; }
102 bool shouldEndProgram()
const {
return _endProgram; }
158 int operAnd(
int op1,
int op2)
const;
159 int operOr(
int op1,
int op2)
const;
160 int operXor(
int op1,
int op2)
const;
161 int operSub(
int op1,
int op2)
const;
162 int operAdd(
int op1,
int op2)
const;
163 int operDiv(
int op1,
int op2)
const;
164 int operMul(
int op1,
int op2)
const;
165 int operEqual(
int op1,
int op2)
const;
166 int operNotEqual(
int op1,
int op2)
const;
167 int operGreater(
int op1,
int op2)
const;
168 int operLess(
int op1,
int op2)
const;
169 int operGreaterOrEqual(
int op1,
int op2)
const;
170 int operLessOrEqual(
int op1,
int op2)
const;
171 int operMod(
int op1,
int op2)
const;
173 int funcRandom(
int n)
const;
174 int funcNot(
int n)
const;
175 int funcIsIcoOn(
int iconID)
const;
176 int funcIcoStat(
int iconID)
const;
177 int funcActIco(
int iconID)
const;
178 int funcIsIcoAct(
int iconID)
const;
179 int funcIsObjOn(
int objID)
const;
180 int funcIsObjOff(
int objID)
const;
181 int funcIsObjAway(
int objID)
const;
182 int funcActPhase(
int objID)
const;
183 int funcObjStat(
int objID)
const;
184 int funcLastBlock(
int blockID)
const;
185 int funcAtBegin(
int yesno)
const;
186 int funcBlockVar(
int blockID)
const;
187 int funcHasBeen(
int blockID)
const;
188 int funcMaxLine(
int lines)
const;
190 void setupCommandList();
191 const GPL2Command *findCommand(byte num, byte subnum)
const;
199 #endif // DRACI_SCRIPT_H
Definition: animation.h:59
Definition: algorithm.h:29
Definition: animation.h:30
GPL2ParameterType
Definition: script.h:53