22 #ifndef ALG_GAME_JOHNNYROCK_H 23 #define ALG_GAME_JOHNNYROCK_H 25 #include "common/hashmap.h" 26 #include "common/rect.h" 28 #include "gui/debugger.h" 31 #include "alg/scene.h" 58 void debugWarpTo(
int val);
62 void registerScriptFunctions();
63 void verifyScriptFunctions();
64 JRScriptFunctionPoint getScriptFunctionZonePtrFb(
Common::String name);
65 JRScriptFunctionRect getScriptFunctionRectHit(
Common::String name);
66 JRScriptFunctionScene getScriptFunctionScene(SceneFuncType type,
Common::String name);
71 JRScriptFunctionPointMap _zonePtrFb;
72 JRScriptFunctionRectMap _rectHitFuncs;
73 JRScriptFunctionSceneMap _scenePreOps;
74 JRScriptFunctionSceneMap _sceneShowMsg;
75 JRScriptFunctionSceneMap _sceneInsOps;
76 JRScriptFunctionSceneMap _sceneWepDwn;
77 JRScriptFunctionSceneMap _sceneScnScr;
78 JRScriptFunctionSceneMap _sceneNxtFrm;
79 JRScriptFunctionSceneMap _sceneNxtScn;
87 const int16 _randomRooftop[6] = {2, -4, 0x104, 0x1E, 0x100, 0x102};
88 const int16 _randomTheater[9] = {5, -5, 0x111, 0x1E, 0x107, 0x109, 0x10B, 0x10D, 0x10F};
89 const int16 _randomAlley[10] = {6, -4, 0, 0x1E, 0x113, 0x115, 0x117, 0x119, 0x11B, 0x11D};
90 const int16 _randomFuneralMR[10] = {6, -5, 0x12B, 0x1E, 0x11F, 0x121, 0x123, 0x125, 0x127, 0x129};
91 const int16 _randomBookMR[8] = {4, 5, 0, 0x1E, 0x12E, 0x130, 0x132, 0x134};
92 const int16 _randomStairway[8] = {4, -3, 0, 0x1E, 0x139, 0x13B, 0x13D, 0x13F};
93 const int16 _randomHall[8] = {4, -5, 0, 0x1E, 0x141, 0x143, 0x145, 0x146};
94 const int16 _randomWindows[10] = {6, -3, 0, 0x1E, 0x154, 0x156, 0x158, 0x15A, 0x15C, 0x15E};
95 const int16 _randomCar[5] = {1, 1, 0, 0, 0x0FE};
96 const int16 _randomHall1[5] = {1, 1, 0, 0x1E, 0x148};
97 const int16 _randomElevator[5] = {1, 1, 0, 0, 0x14C};
98 const int16 _randomBaby[5] = {1, 1, 0, 0, 0x160};
99 const int16 *_randomPlaces[6] = {_randomWindows, _randomStairway, _randomCar, _randomHall1, _randomElevator, _randomBaby};
100 const int16 *_randomPlacesMR[8] = {_randomBookMR, _randomFuneralMR, _randomAlley, _randomTheater, _randomHall, _randomWindows, _randomHall1, _randomRooftop};
102 const int16 _officeTable[5] = {0xA7, 0x9F, 0x9E, 0x0A0, 0x0AD};
104 const uint16 _diffPos[4][2] = {{0, 0}, {0xCD, 0x35}, {0xD2, 0x53}, {0xD2, 0x6E}};
107 uint16 _totalDies = 0;
108 int16 _gameMoney = 0;
109 int16 _oldGameMoney = 0;
110 uint16 _ammoAgain = 0;
111 uint16 _mapTimeout = 0;
112 uint8 _luckyNumber = 0;
115 uint16 _placeBits = 0;
116 uint8 _randomCount = 0;
117 uint16 _doctorBits = 0;
118 uint16 _undertakerBits = 0;
119 uint16 _thisClue = 0;
120 uint8 _gotThisNumber = 0;
123 uint8 _warehouse = 0;
126 uint8 _casinoType = 0;
127 uint8 _poolHallType = 0;
128 uint8 _warehouseType = 0;
129 uint8 _garageType = 0;
131 uint8 _inWarehouse = 0;
135 uint8 _hadGoToMansion = 0;
136 uint16 _officeCount = 0;
137 uint16 _randomPlaceBits = 0;
138 uint8 _maxRandomCount = 0;
139 uint16 _gotoAfterRandom = 0;
140 uint16 _repeatRandomPlace = 0;
141 uint16 _maxRepeat = 0;
142 uint16 _gotThisClue = 0;
143 uint16 _didContinue = 0;
144 uint16 _thisGameTime = 0;
145 uint8 _thisDifficulty = 0;
147 uint8 _combinations[4];
148 uint16 _entranceIndex[20];
149 const int16 *_randomScenes =
nullptr;
150 uint8 _randomScenesSavestateIndex = 0;
151 uint16 _randomScenesIndex[10];
154 uint32 _machGunTimer = 0;
164 void showDifficulty(uint8 newDifficulty,
bool updateCursor);
165 void changeDifficulty(uint8 newDifficulty);
178 uint16 pickBits(uint16 *bits, uint8 max);
179 uint16 pickRandomPlace(uint8 place);
180 void showCombination();
181 void shotClue(uint8 clue);
182 void shotCombination(uint8 combination,
bool combinationB);
183 void shotLuckyNumber(uint8 number);
189 void rectShotMenu(
Rect *rect);
190 void rectSave(
Rect *rect);
191 void rectLoad(
Rect *rect);
192 void rectContinue(
Rect *rect);
193 void rectStart(
Rect *rect);
194 void rectKillInnocent(
Rect *rect);
195 void rectSelectCasino(
Rect *rect);
196 void rectSelectPoolhall(
Rect *rect);
197 void rectSelectWarehouse(
Rect *rect);
198 void rectSelectGarage(
Rect *rect);
199 void rectSelectMansion(
Rect *rect);
200 void rectSelectAmmo(
Rect *rect);
201 void rectSelectOffice(
Rect *rect);
202 void rectShotManBust(
Rect *rect);
203 void rectShotWomanBust(
Rect *rect);
204 void rectShotBlueVase(
Rect *rect);
205 void rectShotCat(
Rect *rect);
206 void rectShotIndian(
Rect *rect);
207 void rectShotPlate(
Rect *rect);
208 void rectShotBlueDressPic(
Rect *rect);
209 void rectShotModernPic(
Rect *rect);
210 void rectShotMonaLisa(
Rect *rect);
211 void rectShotGWashington(
Rect *rect);
212 void rectShotBoyInRedPic(
Rect *rect);
213 void rectShotCoatOfArms(
Rect *rect);
214 void rectShotCombinationA0(
Rect *rect);
215 void rectShotCombinationA1(
Rect *rect);
216 void rectShotCombinationA2(
Rect *rect);
217 void rectShotCombinationA3(
Rect *rect);
218 void rectShotCombinationA4(
Rect *rect);
219 void rectShotCombinationA5(
Rect *rect);
220 void rectShotCombinationB0(
Rect *rect);
221 void rectShotCombinationB1(
Rect *rect);
222 void rectShotCombinationB2(
Rect *rect);
223 void rectShotCombinationB3(
Rect *rect);
224 void rectShotCombinationB4(
Rect *rect);
225 void rectShotCombinationB5(
Rect *rect);
226 void rectShotLuckyNumber0(
Rect *rect);
227 void rectShotLuckyNumber1(
Rect *rect);
228 void rectShotLuckyNumber2(
Rect *rect);
229 void rectShotLuckyNumber3(
Rect *rect);
230 void rectShotLuckyNumber4(
Rect *rect);
231 void rectShotLuckyNumber5(
Rect *rect);
234 void sceneIsoShootpast(
Scene *scene);
235 void sceneIsoShootpastPause(
Scene *scene);
236 void sceneIsoGotoCasino(
Scene *scene);
237 void sceneIsoGotoPoolhall(
Scene *scene);
238 void sceneIsoGotoWarehouse(
Scene *scene);
239 void sceneIsoInWarehouse2(
Scene *scene);
240 void sceneIsoInwarehouse3(
Scene *scene);
241 void sceneIsoGotoGarage(
Scene *scene);
242 void sceneIsoGotoMansion(
Scene *scene);
243 void sceneIsoInMansion1(
Scene *scene);
246 void sceneNxtscnDied(
Scene *scene);
247 void sceneNxtscnBombDead(
Scene *scene);
248 void sceneNxtscnPickUndertaker(
Scene *scene);
249 void sceneNxtscnCallAttract(
Scene *scene);
250 void sceneNxtscnPickLuckyNumber(
Scene *scene);
251 void sceneNxtscnPickMap(
Scene *scene);
252 void sceneNxtscnPickClue(
Scene *scene);
253 void sceneNxtscnMapTimeout(
Scene *scene);
254 void sceneNxtscnEnterCasino(
Scene *scene);
255 void sceneNxtscnCasinoWhat(
Scene *scene);
256 void sceneNxtscnEnterPoolhall(
Scene *scene);
257 void sceneNxtscnPoolhallClue(
Scene *scene);
258 void sceneNxtscnEnterWarehouse(
Scene *scene);
259 void sceneNxtscnWarehouseClue(
Scene *scene);
260 void sceneNxtscnEnterGarage(
Scene *scene);
261 void sceneNxtscnGarageClue(
Scene *scene);
262 void sceneNxtscnEnterMansion(
Scene *scene);
263 void sceneNxtscnGiveClue(
Scene *scene);
264 void sceneNxtscnPickFlowerMan(
Scene *scene);
265 void sceneNxtscnRandomScene(
Scene *scene);
266 void sceneNxtscnEndRandScene(
Scene *scene);
267 void sceneNxtscnKillInnocent(
Scene *scene);
270 void sceneDefaultWepdwn(
Scene *scene);
276 bool cmdWarpTo(
int argc,
const char **argv);
277 bool cmdDumpLib(
int argc,
const char **argv);
Definition: debugger.h:41
Definition: game_johnnyrock.h:273
Definition: game_johnnyrock.h:42
Definition: detection.h:39