22 #ifndef ALG_GAME_BOUNTYHUNTER_H 23 #define ALG_GAME_BOUNTYHUNTER_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 BHScriptFunctionRect getScriptFunctionRectHit(
Common::String name);
65 BHScriptFunctionScene getScriptFunctionScene(SceneFuncType type,
Common::String name);
69 BHScriptFunctionRectMap _rectHitFuncs;
70 BHScriptFunctionSceneMap _scenePreOps;
71 BHScriptFunctionSceneMap _sceneShowMsg;
72 BHScriptFunctionSceneMap _sceneInsOps;
73 BHScriptFunctionSceneMap _sceneWepDwn;
74 BHScriptFunctionSceneMap _sceneScnScr;
75 BHScriptFunctionSceneMap _sceneNxtFrm;
76 BHScriptFunctionSceneMap _sceneNxtScn;
97 uint16 _randomHarry1[7] = {0x01B9, 0x01B7, 0x01B5, 0x01B3, 0x01AF, 0x01AD, 0};
98 uint16 _randomHarry2[6] = {0x0194, 0x0190, 0x018E, 0x018C, 0};
99 uint16 _randomDan1[5] = {0x0173, 0x0171, 0x016F, 0x016D, 0};
100 uint16 _randomDan1TwoPlayer[6] = {0x0173, 0x0171, 0x016F, 0x016D, 0x016B, 0};
101 uint16 _randomDan2[7] = {0x0165, 0x0163, 0x0161, 0x015F, 0x015D, 0x015B, 0};
102 uint16 _randomLoco1[4] = {0xF7, 0xF5, 0xF3, 0};
103 uint16 _randomLoco2[3] = {0xED, 0xEB, 0};
104 uint16 _randomKid1[4] = {0xBA, 0xB7, 0xB5, 0};
105 uint16 _randomKid2[4] = {0xB1, 0xAE, 0xAC, 0};
107 uint16 *_randomScenes[8] = {_randomHarry1, _randomHarry2, _randomDan1, _randomDan2, _randomLoco1, _randomLoco2, _randomKid1, _randomKid2};
108 const uint8 _randomScenesPicks[8] = {6, 6, 4, 7, 3, 2, 5, 5};
110 const uint8 _subLevelOrder[96] = {0, 1, 2, 4, 0, 0, 0, 1, 3, 4, 0, 0, 0, 2, 3, 4, 0, 0, 0, 1, 2, 3, 4, 0,
111 0, 1, 2, 4, 0, 0, 0, 1, 3, 4, 0, 0, 0, 2, 3, 4, 0, 0, 0, 1, 2, 3, 4, 0,
112 0, 1, 3, 4, 0, 0, 0, 2, 3, 4, 0, 0, 1, 2, 3, 4, 0, 0, 0, 1, 2, 3, 4, 0,
113 0, 1, 2, 3, 4, 0, 0, 1, 2, 3, 4, 0, 0, 1, 2, 3, 4, 0, 0, 1, 2, 3, 4, 0};
114 const uint16 _subLevelSceneIds[20] = {0x01BE, 0x017A, 0x01A2, 0x0198, 0x0183, 0x0178, 0x0167, 0x0159, 0x014B, 0x0147,
115 0xF1, 0xE1, 0xFF, 0xD8, 0xD0, 0x9B, 0xA8, 0x86, 0xBF, 0x74};
117 const uint16 _clueLevels[4] = {0x017A, 0x013B, 0xC2, 0x68};
118 const uint8 _mainLevelMasks[5] = {2, 4, 8, 0x10, 0x80};
119 const uint8 _gunfightCountDown[15] = {5, 4, 3, 3, 3, 4, 3, 3, 2, 1, 3, 2, 2, 2, 1};
122 const uint16 _moneyScenes[4] = {0x017D, 0x013C, 0xC3, 0x69};
123 const uint16 _gunfightScenarios[18] = {0x0116, 0x0118, 0x011B, 0x011D, 0x011F, 0x0121, 0x0123, 0x0125, 0x0127,
124 0x0129, 0x012B, 0x012D, 0x012F, 0x0131, 0x0133, 0x0135, 0x0137, 0x0139};
125 const uint16 _innocentScenarios[5] = {0x0110, 0x010F, 0x010C, 0x010B, 0};
126 const uint16 _deathScenarios[9] = {0x0100, 0x0101, 0x0102, 0x0103, 0x0104, 0x0105, 0x0106, 0x0107, 0};
127 const uint16 _onePlayerOfTwoDead[2] = {0x0109, 0x010A};
128 const uint16 _allPlayersDead = 0x108;
131 uint16 _restartScene = 0;
132 uint8 _numPlayers = 1;
134 uint8 _playerLives[2] = {0, 0};
135 uint8 _playerGun[2] = {1, 1};
136 uint8 _playerShots[2] = {0, 0};
137 uint32 _playerScore[2] = {0, 0};
139 uint8 _currentLevel = 0;
140 uint16 _currentSubLevelSceneId = 0;
141 uint8 _numLevelsDone = 0;
142 uint8 _levelDoneMask = 0;
143 uint8 _numSubLevelsDone = 0;
150 uint16 *_randomSceneList;
151 uint8 _randomMax = 0;
152 uint16 _randomMask = 0;
153 int16 _randomPicked = 0;
154 uint8 _randomSceneCount = 0;
155 bool _gunfightInitialized =
false;
156 uint16 _gunfightMask = 0;
157 int16 _gunfightPicked = 0;
158 uint8 _gunfightSceneCount = 0;
159 bool _innocentInitialized =
false;
160 uint16 _innocentMask = 0;
161 int16 _innocentPicked = 0;
162 uint8 _innocentSceneCount = 0;
163 bool _deathInitialized =
false;
164 uint16 _deathMask = 0;
165 int16 _deathPicked = 0;
166 uint8 _deathSceneCount = 0;
168 uint8 _continuesUsed = 0;
169 bool _wounded =
false;
170 uint16 _mainWounds = 0;
171 int8 _gunfightCount = 0;
173 uint32 _firstDrawFrame = 0;
176 uint8 _unk_2ADA6 = 0;
184 void displayLivesLeft(uint8 player);
185 void displayScores(uint8 player);
186 void displayShotsLeft(uint8 player);
192 void setNextScene(uint16 sceneId);
194 void enableVideoFadeIn();
197 uint16 beginLevel(uint8 levelNumber);
198 uint16 pickRandomScene(uint16 *sceneList, uint8 max);
199 uint16 pickGunfightScene();
200 uint16 pickInnocentScene();
201 uint16 pickDeathScene();
202 uint16 timeForGunfight();
203 void waitingForShootout(uint32 drawFrame);
204 void doShotgunSound();
207 void rectShotMenu(
Rect *rect);
208 void rectSave(
Rect *rect);
209 void rectLoad(
Rect *rect);
210 void rectContinue(
Rect *rect);
211 void rectStart(
Rect *rect);
212 void rectTogglePlayers(
Rect *rect);
213 void rectHitIconJug(
Rect *rect);
214 void rectHitIconLantern(
Rect *rect);
215 void rectHitIconSkull(
Rect *rect);
216 void rectHitIconWheel(
Rect *rect);
217 void rectHitSelectHarry(
Rect *rect);
218 void rectHitSelectDan(
Rect *rect);
219 void rectHitSelectLoco(
Rect *rect);
220 void rectHitSelectKid(
Rect *rect);
221 void rectHitKillMan(
Rect *rect);
222 void rectHitGiveShotgun(
Rect *rect);
223 void rectHitKill3(
Rect *rect);
224 void rectHitCheckShotgun(
Rect *rect);
225 void rectHitCheater(
Rect *rect);
228 void scenePsoShootout(
Scene *scene);
229 void scenePsoWoundedMain(
Scene *scene);
230 void scenePsoGunfightSetup(
Scene *scene);
231 void scenePsoLoseALife(
Scene *scene);
232 void scenePsoSetupNdRandom1(
Scene *scene);
233 void scenePsoSetCurrentScene(
Scene *scene);
236 void sceneIsoShootout(
Scene *scene);
237 void sceneIsoGivemoney(
Scene *scene);
240 void sceneNxtscnLoseALife(
Scene *scene);
241 void sceneNxtscnContinueGame(
Scene *scene);
242 void sceneNxtscnDidNotContinue(
Scene *scene);
243 void sceneNxtscnKillInnocentMan(
Scene *scene);
244 void sceneNxtscnKillInnocentWoman(
Scene *scene);
245 void sceneNxtscnAfterDie(
Scene *scene);
246 void sceneNxtscnGotoLevelSelect(
Scene *scene);
247 void sceneNxtscnContinueRandom(
Scene *scene);
248 void sceneNxtscnInitRandomHarry1(
Scene *scene);
249 void sceneNxtscnInitRandomHarry2(
Scene *scene);
250 void sceneNxtscnInitRandomDan1(
Scene *scene);
251 void sceneNxtscnInitRandomDan2(
Scene *scene);
252 void sceneNxtscnInitRandomLoco1(
Scene *scene);
253 void sceneNxtscnInitRandomLoco2(
Scene *scene);
254 void sceneNxtscnInitRandomKid1(
Scene *scene);
255 void sceneNxtscnInitRandomKid2(
Scene *scene);
256 void sceneNxtscnNextSubLevel(
Scene *scene);
257 void sceneNxtscnGotoBadGuy(
Scene *scene);
258 void sceneNxtscnAutoSelectLevel(
Scene *scene);
259 void sceneNxtscnSelectScenario(
Scene *scene);
260 void sceneNxtscnFinishScenario(
Scene *scene);
261 void sceneNxtscnGameWon(
Scene *scene);
262 void sceneNxtscnKilledMain(
Scene *scene);
263 void sceneNxtscnWoundedMain(
Scene *scene);
264 void sceneNxtscnEndLevel(
Scene *scene);
265 void sceneNxtscnEndGame(
Scene *scene);
266 void sceneNxtscnDoBreakoutMains(
Scene *scene);
267 void sceneNxtscnDiedRefed(
Scene *scene);
268 void sceneNxtscnGiveShotgun(
Scene *scene);
269 void sceneNxtscnCheck2Players(
Scene *scene);
272 void sceneDefaultWepdwn(
Scene *scene);
278 bool cmdWarpTo(
int argc,
const char **argv);
279 bool cmdDumpLib(
int argc,
const char **argv);
Definition: debugger.h:41
Definition: game_bountyhunter.h:275
Definition: audiostream.h:212
Definition: game_bountyhunter.h:42
Definition: detection.h:39