22 #ifndef WAYNESWORLD_GAMELOGIC_H 23 #define WAYNESWORLD_GAMELOGIC_H 25 #include "common/serializer.h" 26 #include "waynesworld/waynesworld.h" 35 int handleVerbPickUp();
37 void handleVerbTalkTo();
41 int handleVerbClose();
42 void handleVerbExtremeCloseupOf();
44 void handleDialogReply(
int index,
int x,
int y);
45 bool handleDialogSelect(
int &replyTextX,
int &replyTextY,
int &replyTextIndex1,
int &replyTextIndex2,
int &replyTextIndex3);
46 void refreshRoomBackground(
int roomNum);
47 void updateRoomAnimations();
48 void handleRoomEvent(
int eventNum);
49 int getActorScaleFromY(
int actorY);
50 void setPizzathonStatus(
int flagNum);
52 void handlePizzathon();
53 void handleHypnosisCutscene();
58 int _r0_pizzathonChoiceCtr;
59 bool _r0_pizzathonChoicesUsed[15];
60 int _r0_pizzathonIdeasCtr;
63 bool _r1_tongueTrickActive;
64 int _r1_tongueTrickCtr;
66 byte _r2_backgroundValue1;
67 byte _r2_backgroundValue2;
76 int _r10_selectedItemToBuy;
79 int _r12_talkObjectNumber;
84 int _r19_garthSpriteX;
85 int _r19_wayneSpriteX;
87 int _r24_mazeHoleNumber;
88 int _r24_mazeRoomNumber;
93 bool _r31_askedQuestions[25];
94 int _r31_categoryIndex;
95 bool _r31_categorySelected;
96 int _r31_correctAnswerChoice;
97 int _r31_currentPlayer;
98 int _r31_questionIndex;
99 int _r31_questionsAsked;
106 int _r37_safeCombinationCurrentNumber;
107 int _r37_safeCombinationDirection;
108 int _r37_safeCombinationIndex;
109 int _r37_safeCombinationLockIndex;
112 bool _didScratchTicket =
false;
113 byte _pizzathonListFlags1;
114 byte _pizzathonListFlags2;
116 int _menuGameState = 0;
120 bool _menuQuitVisible =
false;
121 int _menuIsSaveLoad = 0;
127 void displayExtremeCloseupOfPizzathonList();
128 void displayExtremeCloseupOfSign15();
129 void displayExtremeCloseupOfObjectPictures22();
130 void displayExtremeCloseupOfMemo();
131 void displayExtremeCloseupOfSewerMap();
132 void displayExtremeCloseupOfBillboard1();
133 void displayExtremeCloseupOfBillboard2();
135 int r0_handleVerbPickUp();
136 int r0_handleVerbUse();
137 int r0_handleVerbOpen();
138 bool r0_handleDialogSelect(
int &replyTextX,
int &replyTextY,
int &replyTextIndex1,
int &replyTextIndex2,
int &replyTextIndex3);
139 void r0_refreshRoomBackground();
140 void r0_handleRoomEvent1();
141 void r0_handleRoomEvent2();
142 void r0_handleRoomEvent3();
143 void r0_updatePizzathonDialogChoices(
int selectedDialogChoice);
145 int r1_handleVerbPickUp();
146 int r1_handleVerbUse();
147 void r1_handleVerbTalkTo();
148 int r1_handleVerbPush();
149 int r1_handleVerbPull();
150 int r1_handleVerbOpen();
151 int r1_handleVerbClose();
152 bool r1_handleDialogSelect(
int &replyTextX,
int &replyTextY,
int &replyTextIndex1,
int &replyTextIndex2,
int &replyTextIndex3);
153 void r1_refreshRoomBackground();
154 void r1_handleRoomEvent(
bool startTongueTrick);
155 void r1_initRoomAnimations();
156 void r1_uninitRoomAnimations();
157 void r1_updateRoomAnimations();
158 void r1_useDayOldDonutWithMachine();
159 void r1_checkDrGadget();
160 void r1_pullScreen();
164 void r1_drGadgetLeaves();
166 int r2_handleVerbPickUp();
167 int r2_handleVerbUse();
168 void r2_handleVerbTalkTo();
169 int r2_handleVerbGive();
170 bool r2_handleDialogSelect(
int &replyTextX,
int &replyTextY,
int &replyTextIndex1,
int &replyTextIndex2,
int &replyTextIndex3);
171 void r2_refreshRoomBackground();
172 void r2_giveCandyBarToBikerGang();
173 void r2_handleDialogSelect369();
174 void r2_handleDialogSelect385();
176 int r3_handleVerbPickUp();
177 int r3_handleVerbUse();
178 void r3_handleVerbTalkTo();
179 bool r3_handleDialogSelect(
int &replyTextX,
int &replyTextY,
int &replyTextIndex1,
int &replyTextIndex2,
int &replyTextIndex3);
180 void r3_refreshRoomBackground();
182 int r4_handleVerbPickUp();
183 int r4_handleVerbUse();
184 void r4_handleVerbTalkTo();
185 int r4_handleVerbOpen();
186 bool r4_handleDialogSelect(
int &replyTextX,
int &replyTextY,
int &replyTextIndex1,
int &replyTextIndex2,
int &replyTextIndex3);
187 void r4_refreshRoomBackground();
188 void r4_handleRoomEvent();
189 void r4_initRoomAnimations();
190 void r4_uninitRoomAnimations();
191 void r4_updateRoomAnimations();
192 int r4_useCheesePizzaWithCastle();
193 int r4_useDrumstickWithCastleDoor();
194 void r4_useChainWithObject(
bool arg6,
bool arg8);
195 int r4_useTubeWithShade();
197 int r5_handleVerbPickUp();
198 int r5_handleVerbUse();
199 int r5_handleVerbPush();
200 int r5_handleVerbOpen();
201 bool r5_handleDialogSelect(
int &replyTextX,
int &replyTextY,
int &replyTextIndex1,
int &replyTextIndex2,
int &replyTextIndex3);
202 void r5_refreshRoomBackground();
203 void r5_handleCassandra(
const char *filename,
int startFrame,
int maxFrame,
int startX,
int startY,
int targetX,
int targetY,
int width,
int height,
int totalSpeed,
bool refreshBackground);
204 void r5_handleRoomEvent();
206 int r6_handleVerbPickUp();
207 int r6_handleVerbUse();
208 int r6_handleVerbPull();
209 int r6_handleVerbOpen();
210 int r6_handleVerbGive();
211 bool r6_handleDialogSelect(
int &replyTextX,
int &replyTextY,
int &replyTextIndex1,
int &replyTextIndex2,
int &replyTextIndex3);
212 void r6_refreshRoomBackground();
213 void r6_handleRoomEvent1();
214 void r6_handleRoomEvent2();
215 void r6_handleRoomEvent3();
216 void r6_handleRoomEvent4();
217 void r6_initRoomAnimations();
218 void r6_uninitRoomAnimations();
219 void r6_updateRoomAnimations();
220 void r6_useRopeWithBeam();
221 void r6_useHockeyStickWithRope();
224 void r6_giveLuckySausageToDog();
226 int r7_handleVerbPickUp();
227 int r7_handleVerbUse();
228 void r7_handleVerbTalkTo();
229 int r7_handleVerbPush();
230 int r7_handleVerbOpen();
231 void r7_refreshRoomBackground();
232 void r7_initRoomAnimations();
233 void r7_uninitRoomAnimations();
234 void r7_updateRoomAnimations();
235 void r7_openCloseFrontDoor(
bool isOpen);
237 int r8_handleVerbPickUp();
238 int r8_handleVerbUse();
239 int r8_handleVerbOpen();
240 int r8_handleVerbClose();
241 bool r8_handleDialogSelect(
int &replyTextX,
int &replyTextY,
int &replyTextIndex1,
int &replyTextIndex2,
int &replyTextIndex3);
242 void r8_refreshRoomBackground();
243 void r8_initRoomAnimations();
244 void r8_updateRoomAnimations();
245 void r8_handleRoomEvent1();
246 void r8_handleRoomEvent2();
247 void r8_handleRoomEvent3();
248 void r8_handleRoomEvent4();
249 void r8_openCloseDoor(
bool isOpen);
250 void r8_openCloseCabinetDoor1(
bool isOpen);
251 void r8_openCloseCabinetDoor2(
bool isOpen);
253 int r9_handleVerbPickUp();
254 int r9_handleVerbUse();
255 void r9_handleVerbTalkTo();
256 int r9_handleVerbPush();
257 int r9_handleVerbGive();
258 bool r9_handleDialogSelect(
int &replyTextX,
int &replyTextY,
int &replyTextIndex1,
int &replyTextIndex2,
int &replyTextIndex3);
259 void r9_refreshRoomBackground();
260 void r9_initRoomAnimations();
261 void r9_uninitRoomAnimations();
262 void r9_updateRoomAnimations();
263 void r9_giveCoatOrTopHatToMan();
265 int r10_handleVerbPickUp();
266 int r10_handleVerbUse();
267 void r10_handleVerbTalkTo();
268 int r10_handleVerbPush();
269 int r10_handleVerbOpen();
270 int r10_handleVerbGive();
271 bool r10_handleDialogSelect(
int &replyTextX,
int &replyTextY,
int &replyTextIndex1,
int &replyTextIndex2,
int &replyTextIndex3);
272 void r10_refreshRoomBackground();
273 void r10_handleVerbPickUpCandyBar();
274 void r10_handleVerbPickUpTicket();
275 void r10_handleVerbPickUpGum();
276 void r10_handleVerbGiveWinningTicketToSalesgirl();
278 void r10_handleVerbPickUpJawbreakers();
279 void r10_refreshObject(
int value);
281 int r11_handleVerbPickUp();
282 int r11_handleVerbUse();
283 int r11_handleVerbPush();
284 void r11_refreshRoomBackground();
285 void r11_initRoomAnimations();
286 void r11_uninitRoomAnimations();
287 void r11_updateRoomAnimations();
288 void r11_pickUpExtensionCord();
289 void r11_usePlungersWithLampPost();
290 void r11_useExtensionCordWithOutlet();
291 void r11_useSuckCutWithExtensionCord();
292 void r11_useSuckCutWithFountain();
296 int r12_handleVerbPickUp();
297 int r12_handleVerbUse();
298 void r12_handleVerbTalkTo();
299 int r12_handleVerbGive();
300 bool r12_handleDialogSelect(
int &replyTextX,
int &replyTextY,
int &replyTextIndex1,
int &replyTextIndex2,
int &replyTextIndex3);
301 void r12_refreshRoomBackground();
302 void r12_talkToLawyer();
303 void r12_givePotatoChipToCecil();
305 int r13_handleVerbPickUp();
306 int r13_handleVerbUse();
307 void r13_handleVerbTalkTo();
308 int r13_handleVerbGive();
309 bool r13_handleDialogSelect(
int &replyTextX,
int &replyTextY,
int &replyTextIndex1,
int &replyTextIndex2,
int &replyTextIndex3);
310 void r13_refreshRoomBackground();
311 void r13_giveTicketToRomeToPepe();
312 void r13_handleDialogSelect183();
313 void r13_handleRoomEvent();
315 int r14_handleVerbPickUp();
316 int r14_handleVerbUse();
317 void r14_refreshRoomBackground();
319 bool r15_handleDialogSelect(
int &replyTextX,
int &replyTextY,
int &replyTextIndex1,
int &replyTextIndex2,
int &replyTextIndex3);
321 void r16_refreshRoomBackground();
323 int r17_handleVerbUse();
324 void r17_handleVerbTalkTo();
325 bool r17_handleDialogSelect(
int &replyTextX,
int &replyTextY,
int &replyTextIndex1,
int &replyTextIndex2,
int &replyTextIndex3);
326 void r17_refreshRoomBackground();
327 void r17_handleRoomEvent1();
328 void r17_handleRoomEvent2();
329 void r17_handleRoomEvent3();
331 void r18_refreshRoomBackground();
332 void r18_initRoomAnimations();
333 void r18_uninitRoomAnimations();
334 void r18_updateRoomAnimations();
336 void r19_handleVerbTalkTo();
337 bool r19_handleDialogSelect(
int &replyTextX,
int &replyTextY,
int &replyTextIndex1,
int &replyTextIndex2,
int &replyTextIndex3);
338 void r19_refreshRoomBackground();
339 void r19_handleRoomEvent();
341 void r20_refreshRoomBackground();
342 void r20_handleRoomEvent();
344 void r22_refreshRoomBackground();
346 int r24_handleVerbUse();
347 void r24_refreshRoomBackground();
348 void r24_handleRoomEvent(
int wayneLadderX,
int wayneX,
int wayneLadderY,
int ladderBottomY,
int climbCtrMax,
int ceilingIndex);
349 void r24_climbLadder(
int wayneX,
int wayneLadderX,
int wayneLadderY,
int ladderTopY,
int ceilingIndex);
350 void r24_useMazeHole(
int holeIndex);
352 int r25_handleVerbUse();
353 void r25_refreshRoomBackground();
354 void r25_updateMazeRoomHole(
int mazeRoomNumber);
356 int r28_handleVerbUse();
357 bool r28_handleDialogSelect(
int &replyTextX,
int &replyTextY,
int &replyTextIndex1,
int &replyTextIndex2,
int &replyTextIndex3);
358 void r28_refreshRoomBackground();
359 void r28_handleRoomEvent1();
360 void r28_handleRoomEvent2();
362 int r29_handleVerbPickUp();
363 int r29_handleVerbUse();
364 void r29_refreshRoomBackground();
365 void r29_handleRoomEvent();
366 void r29_initRoomAnimations();
367 void r29_uninitRoomAnimations();
368 void r29_updateRoomAnimations();
370 int r30_handleVerbPickUp();
371 int r30_handleVerbUse();
372 bool r30_handleDialogSelect(
int &replyTextX,
int &replyTextY,
int &replyTextIndex1,
int &replyTextIndex2,
int &replyTextIndex3);
373 void r30_refreshRoomBackground();
374 void r30_handleRoomEvent1();
375 void r30_handleRoomEvent2();
376 void r30_runLudwigCutscene();
377 void r30_talkToCecil();
379 int r31_handleVerbUse();
380 bool r31_handleDialogSelect(
int &replyTextX,
int &replyTextY,
int &replyTextIndex1,
int &replyTextIndex2,
int &replyTextIndex3);
381 void r31_refreshRoomBackground();
382 void r31_handleRoomEvent1();
383 void r31_handleRoomEvent2();
384 void r31_handleRoomEvent3();
385 void r31_handleRoomEvent4();
386 void r31_handleRoomEvent5();
387 void r31_correctAnswerSelected();
388 void r31_wrongAnswerSelected();
389 void r31_useBuzzer();
390 void r31_playTalkAnim(
int index);
391 void r31_drawMBuzzer();
392 void r31_drawDBuzzer();
393 void r31_displayCategories();
394 void r31_runBabeoff();
395 void r31_drawCurrentPlayerScore();
396 void r31_buildQuestionDialogChoices(
int categoryIndex,
int questionIndex);
398 int r32_handleVerbPickUp();
399 int r32_handleVerbUse();
400 void r32_handleVerbTalkTo();
401 int r32_handleVerbOpen();
402 bool r32_handleDialogSelect(
int &replyTextX,
int &replyTextY,
int &replyTextIndex1,
int &replyTextIndex2,
int &replyTextIndex3);
403 void r32_refreshRoomBackground();
404 void r32_handleRoomEvent();
405 void r32_initRoomAnimations();
406 void r32_uninitRoomAnimations();
407 void r32_updateRoomAnimations();
408 void r32_pickUpMemo();
410 void r33_refreshRoomBackground();
412 int r34_handleVerbPickUp();
413 int r34_handleVerbUse();
414 void r34_handleVerbTalkTo();
415 int r34_handleVerbOpen();
416 int r34_handleVerbClose();
417 bool r34_handleDialogSelect(
int &replyTextX,
int &replyTextY,
int &replyTextIndex1,
int &replyTextIndex2,
int &replyTextIndex3);
418 void r34_refreshRoomBackground();
419 void r34_initRoomAnimations();
420 void r34_uninitRoomAnimations();
421 void r34_updateRoomAnimations();
423 int r35_handleVerbUse();
424 void r35_handleVerbTalkTo();
425 bool r35_handleDialogSelect(
int &replyTextX,
int &replyTextY,
int &replyTextIndex1,
int &replyTextIndex2,
int &replyTextIndex3);
426 void r35_refreshRoomBackground();
427 void r35_useSetOfKeysWithJailCells();
428 void r35_talkToCassandra();
430 int r36_handleVerbPickUp();
431 int r36_handleVerbUse();
432 void r36_refreshRoomBackground();
433 void r36_handleRoomEvent();
434 void r36_initRoomAnimations();
435 void r36_uninitRoomAnimations();
436 void r36_updateRoomAnimations();
438 int r37_handleVerbPickUp();
439 int r37_handleVerbUse();
440 int r37_handleVerbPush();
441 int r37_handleVerbPull();
442 void r37_refreshRoomBackground();
443 void r37_climbEnterLadderDown();
444 void r37_climbExitLadderUp();
445 void r37_climbLadderDown();
446 void r37_climbLadderUp();
447 void r37_pushPullSafeLock(
bool isPull);
448 void r37_pullHandle();
450 int r38_handleVerbUse();
451 int r38_handleVerbPull();
452 void r38_refreshRoomBackground();
453 void r38_initRoomAnimations();
454 void r38_uninitRoomAnimations();
455 void r38_updateRoomAnimations();
456 void r38_useCassandra();
459 int r39_handleVerbUse();
460 int r39_handleVerbOpen();
461 void r39_refreshRoomBackground();
462 void r39_useSquirtGunWithHinges();
463 void r39_useExit39();
466 void menuDrawSoundEnabled();
467 void menuDrawMusicEnabled();
468 void closeSaveLoadMenu();
469 void toggleSoundEnabled();
470 void toggleMusicEnabled();
471 void menuSaveLoadMenu(
bool isLoad);
474 bool loadSavegame(
int slot,
bool rstSave =
false);
475 void handleGameMenu();
478 void closeQuitMenu();
483 #endif // WAYNESWORLD_GAMELOGIC_H
Definition: graphics.h:30
Definition: gamelogic.h:30
Definition: detection.h:25
Definition: waynesworld.h:112
Definition: serializer.h:79