25 #include "common/util.h" 26 #include "common/random.h" 32 enum scriptVariableOffsets {
76 REICH_DOOR_FLAG = 470,
92 DOOR_67_68_FLAG = 678,
94 DOOR_73_75_FLAG = 704,
95 SC76_CABINET1_FLAG = 709,
96 SC76_CABINET2_FLAG = 710,
97 SC76_CABINET3_FLAG = 711,
98 DOOR_77_78_FLAG = 719,
100 SC31_LIFT_FLAG = 793,
101 SC32_LIFT_FLAG = 797,
102 SC33_SHED_DOOR_FLAG = 798,
104 COLSTON_AT_TABLE = 805,
105 SC36_NEXT_DEALER = 806,
106 SC36_DOOR_FLAG = 807,
107 SC37_DOOR_FLAG = 808,
108 SC40_LOCKER_1_FLAG = 817,
109 SC40_LOCKER_2_FLAG = 818,
110 SC40_LOCKER_3_FLAG = 819,
111 SC40_LOCKER_4_FLAG = 820,
112 SC40_LOCKER_5_FLAG = 821
115 #define NUM_SKY_SCRIPTVARS 838 130 typedef void (Logic::*LogicTable) ();
131 typedef bool (Logic::*McodeTable) (uint32, uint32, uint32);
145 void useControlInstance(
Control *control) { _skyControl = control; }
147 uint16 mouseScript(uint32 scrNum,
Compact *scriptComp);
149 static uint32 _scriptVariables[NUM_SKY_SCRIPTVARS];
152 uint16 script(uint16 scriptNo, uint16 offset);
154 void parseSaveData(uint32 *data);
157 void setupLogicTable();
158 void setupMcodeTable();
159 const LogicTable *_logicTable;
160 const McodeTable *_mcodeTable;
165 void checkModuleLoaded(uint16 moduleNo);
166 bool isCollision(
Compact *cpt);
167 void initScriptVariables();
171 bool checkProtection();
191 bool fnCacheChip(uint32 a, uint32 b, uint32 c);
192 bool fnCacheFast(uint32 a, uint32 b, uint32 c);
193 bool fnDrawScreen(uint32 a, uint32 b, uint32 c);
194 bool fnAr(uint32 a, uint32 b, uint32 c);
195 bool fnArAnimate(uint32 a, uint32 b, uint32 c);
196 bool fnIdle(uint32 a, uint32 b, uint32 c);
197 bool fnInteract(uint32 a, uint32 b, uint32 c);
198 bool fnStartSub(uint32 a, uint32 b, uint32 c);
199 bool fnTheyStartSub(uint32 a, uint32 b, uint32 c);
200 bool fnAssignBase(uint32 a, uint32 b, uint32 c);
201 bool fnDiskMouse(uint32 a, uint32 b, uint32 c);
202 bool fnNormalMouse(uint32 a, uint32 b, uint32 c);
203 bool fnBlankMouse(uint32 a, uint32 b, uint32 c);
204 bool fnCrossMouse(uint32 a, uint32 b, uint32 c);
205 bool fnCursorRight(uint32 a, uint32 b, uint32 c);
206 bool fnCursorLeft(uint32 a, uint32 b, uint32 c);
207 bool fnCursorDown(uint32 a, uint32 b, uint32 c);
208 bool fnOpenHand(uint32 a, uint32 b, uint32 c);
209 bool fnCloseHand(uint32 a, uint32 b, uint32 c);
210 bool fnGetTo(uint32 a, uint32 b, uint32 c);
211 bool fnSetToStand(uint32 a, uint32 b, uint32 c);
212 bool fnTurnTo(uint32 a, uint32 b, uint32 c);
213 bool fnArrived(uint32 a, uint32 b, uint32 c);
214 bool fnLeaving(uint32 a, uint32 b, uint32 c);
215 bool fnSetAlternate(uint32 a, uint32 b, uint32 c);
216 bool fnAltSetAlternate(uint32 a, uint32 b, uint32 c);
217 bool fnKillId(uint32 a, uint32 b, uint32 c);
218 bool fnNoHuman(uint32 a, uint32 b, uint32 c);
219 bool fnAddHuman(uint32 a, uint32 b, uint32 c);
220 bool fnAddButtons(uint32 a, uint32 b, uint32 c);
221 bool fnNoButtons(uint32 a, uint32 b, uint32 c);
222 bool fnSetStop(uint32 a, uint32 b, uint32 c);
223 bool fnClearStop(uint32 a, uint32 b, uint32 c);
224 bool fnPointerText(uint32 a, uint32 b, uint32 c);
225 bool fnQuit(uint32 a, uint32 b, uint32 c);
226 bool fnSpeakMe(uint32 targetId, uint32 mesgNum, uint32 animNum);
227 bool fnSpeakMeDir(uint32 targetId, uint32 mesgNum, uint32 animNum);
228 bool fnSpeakWait(uint32 a, uint32 b, uint32 c);
229 bool fnSpeakWaitDir(uint32 a, uint32 b, uint32 c);
230 bool fnChooser(uint32 a, uint32 b, uint32 c);
231 bool fnHighlight(uint32 a, uint32 b, uint32 c);
232 bool fnTextKill(uint32 a, uint32 b, uint32 c);
233 bool fnStopMode(uint32 a, uint32 b, uint32 c);
234 bool fnWeWait(uint32 a, uint32 b, uint32 c);
235 bool fnSendSync(uint32 a, uint32 b, uint32 c);
236 bool fnSendFastSync(uint32 a, uint32 b, uint32 c);
237 bool fnSendRequest(uint32 a, uint32 b, uint32 c);
238 bool fnClearRequest(uint32 a, uint32 b, uint32 c);
239 bool fnCheckRequest(uint32 a, uint32 b, uint32 c);
240 bool fnStartMenu(uint32 a, uint32 b, uint32 c);
241 bool fnUnhighlight(uint32 a, uint32 b, uint32 c);
242 bool fnFaceId(uint32 a, uint32 b, uint32 c);
243 bool fnForeground(uint32 a, uint32 b, uint32 c);
244 bool fnBackground(uint32 a, uint32 b, uint32 c);
245 bool fnNewBackground(uint32 a, uint32 b, uint32 c);
246 bool fnSort(uint32 a, uint32 b, uint32 c);
247 bool fnNoSpriteEngine(uint32 a, uint32 b, uint32 c);
248 bool fnNoSpritesA6(uint32 a, uint32 b, uint32 c);
249 bool fnResetId(uint32 a, uint32 b, uint32 c);
250 bool fnToggleGrid(uint32 a, uint32 b, uint32 c);
251 bool fnPause(uint32 a, uint32 b, uint32 c);
252 bool fnRunAnimMod(uint32 a, uint32 b, uint32 c);
253 bool fnSimpleMod(uint32 a, uint32 b, uint32 c);
254 bool fnRunFrames(uint32 a, uint32 b, uint32 c);
255 bool fnAwaitSync(uint32 a, uint32 b, uint32 c);
256 bool fnIncMegaSet(uint32 a, uint32 b, uint32 c);
257 bool fnDecMegaSet(uint32 a, uint32 b, uint32 c);
258 bool fnSetMegaSet(uint32 a, uint32 b, uint32 c);
259 bool fnMoveItems(uint32 a, uint32 b, uint32 c);
260 bool fnNewList(uint32 a, uint32 b, uint32 c);
261 bool fnAskThis(uint32 a, uint32 b, uint32 c);
262 bool fnRandom(uint32 a, uint32 b, uint32 c);
263 bool fnPersonHere(uint32 a, uint32 b, uint32 c);
264 bool fnToggleMouse(uint32 a, uint32 b, uint32 c);
265 bool fnMouseOn(uint32 a, uint32 b, uint32 c);
266 bool fnMouseOff(uint32 a, uint32 b, uint32 c);
267 bool fnFetchX(uint32 a, uint32 b, uint32 c);
268 bool fnFetchY(uint32 a, uint32 b, uint32 c);
269 bool fnTestList(uint32 a, uint32 b, uint32 c);
270 bool fnFetchPlace(uint32 a, uint32 b, uint32 c);
271 bool fnCustomJoey(uint32 a, uint32 b, uint32 c);
272 bool fnSetPalette(uint32 a, uint32 b, uint32 c);
273 bool fnTextModule(uint32 a, uint32 b, uint32 c);
274 bool fnChangeName(uint32 a, uint32 b, uint32 c);
275 bool fnMiniLoad(uint32 a, uint32 b, uint32 c);
276 bool fnFlushBuffers(uint32 a, uint32 b, uint32 c);
277 bool fnFlushChip(uint32 a, uint32 b, uint32 c);
278 bool fnSaveCoods(uint32 a, uint32 b, uint32 c);
279 bool fnPlotGrid(uint32 a, uint32 b, uint32 c);
280 bool fnRemoveGrid(uint32 a, uint32 b, uint32 c);
281 bool fnEyeball(uint32 a, uint32 b, uint32 c);
282 bool fnCursorUp(uint32 a, uint32 b, uint32 c);
283 bool fnLeaveSection(uint32 a, uint32 b, uint32 c);
284 bool fnEnterSection(uint32 sectionNo, uint32 b, uint32 c);
285 bool fnRestoreGame(uint32 a, uint32 b, uint32 c);
286 bool fnRestartGame(uint32 a, uint32 b, uint32 c);
287 bool fnNewSwingSeq(uint32 a, uint32 b, uint32 c);
288 bool fnWaitSwingEnd(uint32 a, uint32 b, uint32 c);
289 bool fnSkipIntroCode(uint32 a, uint32 b, uint32 c);
290 bool fnBlankScreen(uint32 a, uint32 b, uint32 c);
291 bool fnPrintCredit(uint32 a, uint32 b, uint32 c);
292 bool fnLookAt(uint32 a, uint32 b, uint32 c);
293 bool fnLincTextModule(uint32 a, uint32 b, uint32 c);
294 bool fnTextKill2(uint32 a, uint32 b, uint32 c);
295 bool fnSetFont(uint32 a, uint32 b, uint32 c);
296 bool fnStartFx(uint32 a, uint32 b, uint32 c);
297 bool fnStopFx(uint32 a, uint32 b, uint32 c);
298 bool fnStartMusic(uint32 a, uint32 b, uint32 c);
299 bool fnStopMusic(uint32 a, uint32 b, uint32 c);
300 bool fnFadeDown(uint32 a, uint32 b, uint32 c);
301 bool fnFadeUp(uint32 a, uint32 b, uint32 c);
302 bool fnQuitToDos(uint32 a, uint32 b, uint32 c);
303 bool fnPauseFx(uint32 a, uint32 b, uint32 c);
304 bool fnUnPauseFx(uint32 a, uint32 b, uint32 c);
305 bool fnPrintf(uint32 a, uint32 b, uint32 c);
307 void stdSpeak(
Compact *target, uint32 textNum, uint32 animNum, uint32 base);
308 void fnExec(uint16 num, uint32 a, uint32 b, uint32 c);
310 uint16 *_moduleList[16];
316 uint32 _objectList[30];
318 uint32 _currentSection;
Definition: autoroute.h:34
Definition: musicbase.h:55
Definition: atari-screen.h:60
Definition: autoroute.h:28
Definition: control.h:181