22 #ifndef GROOVIE_SCRIPT_H 23 #define GROOVIE_SCRIPT_H 25 #include "groovie/groovie.h" 26 #ifdef ENABLE_GROOVIE2 27 #include "groovie/logic/beehive.h" 28 #include "groovie/logic/cake.h" 29 #include "groovie/logic/gallery.h" 30 #include "groovie/logic/mousetrap.h" 31 #include "groovie/logic/othello.h" 32 #include "groovie/logic/pente.h" 33 #include "groovie/logic/triangle.h" 34 #include "groovie/logic/winerack.h" 37 #include "common/random.h" 38 #include "common/rect.h" 41 class SeekableReadStream;
62 void setDebugger(
Debugger *debugger);
63 void setVariable(uint16 varnum, byte value);
68 void directGameLoad(
int slot);
70 bool canDirectSave()
const;
73 void setMouseClick(uint8 button);
74 void setKbdChar(uint8 c);
75 void setAction(uint8 a);
77 void setBitFlag(
int bitnum,
bool value);
78 bool getBitFlag(
int bitnum);
90 EngineVersion _version;
103 uint16 _currentInstruction;
105 uint16 _savedCodeSize;
106 uint16 _savedInstruction;
109 byte _variables[0x400];
110 byte _savedVariables[0x180];
115 uint8 _savedStacktop;
119 uint8 _eventMouseClicked;
123 uint16 _inputLoopAddress;
124 uint8 _newCursorStyle;
125 uint16 _hotspotTopAction;
126 uint16 _hotspotTopCursor;
127 uint16 _hotspotBottomAction;
128 uint16 _hotspotBottomCursor;
129 uint16 _hotspotRightAction;
130 uint16 _hotspotLeftAction;
132 bool _fastForwarding;
133 void resetFastForward();
139 uint16 _videoSkipAddress;
144 uint16 _oldInstruction;
151 uint8 getCodeByte(uint16 address);
152 uint8 readScript8bits();
153 uint16 readScript16bits();
154 uint32 readScript32bits();
155 uint16 readScript8or16bits();
156 uint8 readScriptChar(
bool allow7C,
bool limitVal,
bool limitVar);
158 uint8 readScriptVar();
161 void executeInputAction(uint16 address);
162 bool hotspot(
Common::Rect rect, uint16 addr, uint8 cursor);
164 void loadgame(uint slot);
165 bool preview_loadgame(uint slot);
167 bool playvideofromref(uint32 fileref,
bool loopUntilAudioDone =
false);
168 bool playBackgroundSound(uint32 fileref, uint32 loops);
172 typedef void (
Script::*OpcodeFunc)();
173 OpcodeFunc *_opcodes;
174 static OpcodeFunc _opcodesT7G[];
175 static OpcodeFunc _opcodesV2[];
191 void o_setbackgroundsong();
192 void o_videofromref();
194 void o_inputloopstart();
195 void o_keyboardaction();
196 void o_hotspot_rect();
197 void o_hotspot_left();
198 void o_hotspot_right();
199 void o_hotspot_center();
200 void o_hotspot_current();
201 void o_inputloopend();
208 void o_strcmpnejmp_var();
210 void o_strcmpnejmp();
211 void o_xor_obfuscate();
212 void o_vdxtransition();
216 void o_strcmpeqjmp();
219 void o_videofromstring1();
220 void o_videofromstring2();
223 void o_sethotspottop();
224 void o_sethotspotbottom();
227 void o_hotspotbottom_4();
230 void o_loadstringvar();
231 void o_chargreatjmp();
233 void o_charlessjmp();
234 void o_copyrecttobg();
235 void o_restorestkpnt();
236 void o_obscureswap();
237 void o_printstring();
238 void o_hotspot_slot();
239 void o_checkvalidsaves();
243 void o_setvideoorigin();
245 void o_returnscript();
246 void o_sethotspotright();
247 void o_sethotspotleft();
251 void o_hotspot_outrect();
253 void o_wipemaskfromstring58();
257 void o2_copybgtofg();
258 void o2_printstring();
260 void o2_midicontrol();
261 void o2_setbackgroundsong();
262 void o2_videofromref();
263 void o2_vdxtransition();
264 void o2_setvideoskip();
265 void o2_savescreen();
266 void o2_restorescreen();
268 void o2_copyfgtobg();
269 void o2_setscriptend();
271 void o2_check_sounds_overlays();
272 void o2_preview_loadgame();
274 #ifdef ENABLE_GROOVIE2 288 #endif // GROOVIE_SCRIPT_H
Definition: groovie.h:118
Definition: mousetrap.h:54
Definition: winerack.h:41
Definition: triangle.h:36
Definition: algorithm.h:29
Definition: formatinfo.h:28