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 runCursorTimer();
59 void debug_warpTo(
int val);
63 void registerScriptFunctions();
64 void verifyScriptFunctions();
65 void unregisterScriptFunctions();
66 JRScriptFunctionPoint getScriptFunctionZonePtrFb(
Common::String name);
67 JRScriptFunctionRect getScriptFunctionRectHit(
Common::String name);
68 JRScriptFunctionScene getScriptFunctionScene(SceneFuncType type,
Common::String name);
73 JRScriptFunctionPointMap _zonePtrFb;
74 JRScriptFunctionRectMap _rectHitFuncs;
75 JRScriptFunctionSceneMap _scenePreOps;
76 JRScriptFunctionSceneMap _sceneShowMsg;
77 JRScriptFunctionSceneMap _sceneInsOps;
78 JRScriptFunctionSceneMap _sceneWepDwn;
79 JRScriptFunctionSceneMap _sceneScnScr;
80 JRScriptFunctionSceneMap _sceneNxtFrm;
81 JRScriptFunctionSceneMap _sceneNxtScn;
98 const int16 _randomRooftop[6] = {2, -4, 0x104, 0x1E, 0x100, 0x102};
99 const int16 _randomTheater[9] = {5, -5, 0x111, 0x1E, 0x107, 0x109, 0x10B, 0x10D, 0x10F};
100 const int16 _randomAlley[10] = {6, -4, 0, 0x1E, 0x113, 0x115, 0x117, 0x119, 0x11B, 0x11D};
101 const int16 _randomFuneralMR[10] = {6, -5, 0x12B, 0x1E, 0x11F, 0x121, 0x123, 0x125, 0x127, 0x129};
102 const int16 _randomBookMR[8] = {4, 5, 0, 0x1E, 0x12E, 0x130, 0x132, 0x134};
103 const int16 _randomStairway[8] = {4, -3, 0, 0x1E, 0x139, 0x13B, 0x13D, 0x13F};
104 const int16 _randomHall[8] = {4, -5, 0, 0x1E, 0x141, 0x143, 0x145, 0x146};
105 const int16 _randomWindows[10] = {6, -3, 0, 0x1E, 0x154, 0x156, 0x158, 0x15A, 0x15C, 0x15E};
106 const int16 _randomCar[5] = {1, 1, 0, 0, 0x0FE};
107 const int16 _randomHall1[5] = {1, 1, 0, 0x1E, 0x148};
108 const int16 _randomElevator[5] = {1, 1, 0, 0, 0x14C};
109 const int16 _randomBaby[5] = {1, 1, 0, 0, 0x160};
110 const int16 *_randomPlaces[6] = {_randomWindows, _randomStairway, _randomCar, _randomHall1, _randomElevator, _randomBaby};
111 const int16 *_randomPlacesMR[8] = {_randomBookMR, _randomFuneralMR, _randomAlley, _randomTheater, _randomHall, _randomWindows, _randomHall1, _randomRooftop};
113 const int16 _officeTable[5] = {0xA7, 0x9F, 0x9E, 0x0A0, 0x0AD};
115 const uint16 _diffPos[4][2] = {{0, 0}, {0xCD, 0x35}, {0xD2, 0x53}, {0xD2, 0x6E}};
118 uint8 _difficulty = 1;
119 uint8 _emptyCount = 0;
120 bool _holster =
false;
121 uint8 _oldDifficulty = 1;
122 uint8 _inHolster = 0;
124 int32 _oldScore = -1;
125 bool _shotFired =
false;
129 uint8 _oldWhichGun = 0xFF;
131 uint16 _totalDies = 0;
132 int16 _gameMoney = 0;
133 int16 _oldGameMoney = 0;
134 uint16 _ammoAgain = 0;
135 uint16 _mapTimeout = 0;
136 uint8 _luckyNumber = 0;
139 uint16 _placeBits = 0;
140 uint8 _randomCount = 0;
141 uint16 _doctorBits = 0;
142 uint16 _undertakerBits = 0;
143 uint16 _thisClue = 0;
144 uint8 _gotThisNumber = 0;
147 uint8 _warehouse = 0;
150 uint8 _casinoType = 0;
151 uint8 _poolHallType = 0;
152 uint8 _warehouseType = 0;
153 uint8 _garageType = 0;
155 uint8 _inWarehouse = 0;
159 uint8 _hadGoToMansion = 0;
160 uint16 _officeCount = 0;
161 uint16 _randomPlaceBits = 0;
162 uint8 _maxRandomCount = 0;
163 uint16 _gotoAfterRandom = 0;
164 uint16 _repeatRandomPlace = 0;
165 uint16 _maxRepeat = 0;
166 uint16 _gotThisClue = 0;
167 uint16 _didContinue = 0;
168 uint16 _thisGameTime = 0;
169 uint8 _thisDifficulty = 0;
171 uint8 _combinations[4];
172 uint16 _entranceIndex[20];
173 const int16 *_randomScenes =
nullptr;
174 uint8 _randomScenesSavestateIndex = 0;
175 uint16 _randomScenesIndex[10];
178 uint32 _machGunTimer = 0;
183 uint32 _thisGameTimer = 0;
193 void showDifficulty(uint8 newDifficulty,
bool updateCursor);
194 void changeDifficulty(uint8 newDifficulty);
195 void adjustDifficulty(uint8 newDifficulty, uint8 oldDifficulty);
209 uint16 pickBits(uint16 *bits, uint8 max);
210 uint16 pickRandomPlace(uint8 place);
211 void showCombination();
212 void shotClue(uint8 clue);
213 void shotCombination(uint8 combination,
bool combinationB);
214 void shotLuckyNumber(uint8 number);
217 void setupCursorTimer();
218 void removeCursorTimer();
224 void rectNewScene(
Rect *rect);
225 void rectShotMenu(
Rect *rect);
226 void rectSave(
Rect *rect);
227 void rectLoad(
Rect *rect);
228 void rectContinue(
Rect *rect);
229 void rectStart(
Rect *rect);
230 void rectEasy(
Rect *rect);
231 void rectAverage(
Rect *rect);
232 void rectHard(
Rect *rect);
233 void rectExit(
Rect *rect);
234 void rectKillInnocent(
Rect *rect);
235 void rectSelectCasino(
Rect *rect);
236 void rectSelectPoolhall(
Rect *rect);
237 void rectSelectWarehouse(
Rect *rect);
238 void rectSelectGarage(
Rect *rect);
239 void rectSelectMansion(
Rect *rect);
240 void rectSelectAmmo(
Rect *rect);
241 void rectSelectOffice(
Rect *rect);
242 void rectShotManBust(
Rect *rect);
243 void rectShotWomanBust(
Rect *rect);
244 void rectShotBlueVase(
Rect *rect);
245 void rectShotCat(
Rect *rect);
246 void rectShotIndian(
Rect *rect);
247 void rectShotPlate(
Rect *rect);
248 void rectShotBlueDressPic(
Rect *rect);
249 void rectShotModernPic(
Rect *rect);
250 void rectShotMonaLisa(
Rect *rect);
251 void rectShotGWashington(
Rect *rect);
252 void rectShotBoyInRedPic(
Rect *rect);
253 void rectShotCoatOfArms(
Rect *rect);
254 void rectShotCombinationA0(
Rect *rect);
255 void rectShotCombinationA1(
Rect *rect);
256 void rectShotCombinationA2(
Rect *rect);
257 void rectShotCombinationA3(
Rect *rect);
258 void rectShotCombinationA4(
Rect *rect);
259 void rectShotCombinationA5(
Rect *rect);
260 void rectShotCombinationB0(
Rect *rect);
261 void rectShotCombinationB1(
Rect *rect);
262 void rectShotCombinationB2(
Rect *rect);
263 void rectShotCombinationB3(
Rect *rect);
264 void rectShotCombinationB4(
Rect *rect);
265 void rectShotCombinationB5(
Rect *rect);
266 void rectShotLuckyNumber0(
Rect *rect);
267 void rectShotLuckyNumber1(
Rect *rect);
268 void rectShotLuckyNumber2(
Rect *rect);
269 void rectShotLuckyNumber3(
Rect *rect);
270 void rectShotLuckyNumber4(
Rect *rect);
271 void rectShotLuckyNumber5(
Rect *rect);
274 void sceneIsoShootpast(
Scene *scene);
275 void sceneIsoShootpastPause(
Scene *scene);
276 void sceneIsoGotoCasino(
Scene *scene);
277 void sceneIsoGotoPoolhall(
Scene *scene);
278 void sceneIsoGotoWarehouse(
Scene *scene);
279 void sceneIsoInWarehouse2(
Scene *scene);
280 void sceneIsoInwarehouse3(
Scene *scene);
281 void sceneIsoGotoGarage(
Scene *scene);
282 void sceneIsoGotoMansion(
Scene *scene);
283 void sceneIsoInMansion1(
Scene *scene);
286 void sceneNxtscnDied(
Scene *scene);
287 void sceneNxtscnBombDead(
Scene *scene);
288 void sceneNxtscnPickUndertaker(
Scene *scene);
289 void sceneNxtscnCallAttract(
Scene *scene);
290 void sceneNxtscnPickLuckyNumber(
Scene *scene);
291 void sceneNxtscnPickMap(
Scene *scene);
292 void sceneNxtscnPickClue(
Scene *scene);
293 void sceneNxtscnMapTimeout(
Scene *scene);
294 void sceneNxtscnEnterCasino(
Scene *scene);
295 void sceneNxtscnCasinoWhat(
Scene *scene);
296 void sceneNxtscnEnterPoolhall(
Scene *scene);
297 void sceneNxtscnPoolhallClue(
Scene *scene);
298 void sceneNxtscnEnterWarehouse(
Scene *scene);
299 void sceneNxtscnWarehouseClue(
Scene *scene);
300 void sceneNxtscnEnterGarage(
Scene *scene);
301 void sceneNxtscnGarageClue(
Scene *scene);
302 void sceneNxtscnEnterMansion(
Scene *scene);
303 void sceneNxtscnGiveClue(
Scene *scene);
304 void sceneNxtscnPickFlowerMan(
Scene *scene);
305 void sceneNxtscnRandomScene(
Scene *scene);
306 void sceneNxtscnEndRandScene(
Scene *scene);
307 void sceneNxtscnKillInnocent(
Scene *scene);
310 void sceneDefaultWepdwn(
Scene *scene);
313 void sceneDefaultScore(
Scene *scene);
319 bool cmdWarpTo(
int argc,
const char **argv);
320 bool cmdDumpLib(
int argc,
const char **argv);
Definition: savefile.h:54
Definition: debugger.h:41
Definition: audiostream.h:212
Definition: game_johnnyrock.h:316
Definition: game_johnnyrock.h:42
Definition: detection.h:39