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);
76 void setBitFlag(
int bitnum,
bool value);
77 bool getBitFlag(
int bitnum);
89 EngineVersion _version;
102 uint16 _currentInstruction;
104 uint16 _savedCodeSize;
105 uint16 _savedInstruction;
108 byte _variables[0x400];
109 byte _savedVariables[0x180];
114 uint8 _savedStacktop;
118 uint8 _eventMouseClicked;
121 uint16 _inputLoopAddress;
122 uint8 _newCursorStyle;
123 uint16 _hotspotTopAction;
124 uint16 _hotspotTopCursor;
125 uint16 _hotspotBottomAction;
126 uint16 _hotspotBottomCursor;
127 uint16 _hotspotRightAction;
128 uint16 _hotspotLeftAction;
130 bool _fastForwarding;
131 void resetFastForward();
137 uint16 _videoSkipAddress;
142 uint16 _oldInstruction;
149 uint8 getCodeByte(uint16 address);
150 uint8 readScript8bits();
151 uint16 readScript16bits();
152 uint32 readScript32bits();
153 uint16 readScript8or16bits();
154 uint8 readScriptChar(
bool allow7C,
bool limitVal,
bool limitVar);
156 uint8 readScriptVar();
159 void executeInputAction(uint16 address);
160 bool hotspot(
Common::Rect rect, uint16 addr, uint8 cursor);
162 void loadgame(uint slot);
163 bool preview_loadgame(uint slot);
164 void savegame(uint slot,
const char name[27]);
165 bool playvideofromref(uint32 fileref,
bool loopUntilAudioDone =
false);
166 bool playBackgroundSound(uint32 fileref, uint32 loops);
170 typedef void (
Script::*OpcodeFunc)();
171 OpcodeFunc *_opcodes;
172 static OpcodeFunc _opcodesT7G[];
173 static OpcodeFunc _opcodesV2[];
189 void o_setbackgroundsong();
190 void o_videofromref();
192 void o_inputloopstart();
193 void o_keyboardaction();
194 void o_hotspot_rect();
195 void o_hotspot_left();
196 void o_hotspot_right();
197 void o_hotspot_center();
198 void o_hotspot_current();
199 void o_inputloopend();
206 void o_strcmpnejmp_var();
208 void o_strcmpnejmp();
209 void o_xor_obfuscate();
210 void o_vdxtransition();
214 void o_strcmpeqjmp();
217 void o_videofromstring1();
218 void o_videofromstring2();
221 void o_sethotspottop();
222 void o_sethotspotbottom();
225 void o_hotspotbottom_4();
228 void o_loadstringvar();
229 void o_chargreatjmp();
231 void o_charlessjmp();
232 void o_copyrecttobg();
233 void o_restorestkpnt();
234 void o_obscureswap();
235 void o_printstring();
236 void o_hotspot_slot();
237 void o_checkvalidsaves();
241 void o_setvideoorigin();
243 void o_returnscript();
244 void o_sethotspotright();
245 void o_sethotspotleft();
249 void o_hotspot_outrect();
251 void o_wipemaskfromstring58();
255 void o2_copybgtofg();
256 void o2_printstring();
258 void o2_midicontrol();
259 void o2_setbackgroundsong();
260 void o2_videofromref();
261 void o2_vdxtransition();
262 void o2_setvideoskip();
263 void o2_savescreen();
264 void o2_restorescreen();
266 void o2_copyfgtobg();
267 void o2_setscriptend();
269 void o2_check_sounds_overlays();
270 void o2_preview_loadgame();
272 #ifdef ENABLE_GROOVIE2 286 #endif // GROOVIE_SCRIPT_H
Definition: groovie.h:113
Definition: mousetrap.h:54
Definition: winerack.h:41
Definition: triangle.h:36
Definition: algorithm.h:29
Definition: formatinfo.h:28