22 #ifndef ALG_GAME_MADDOG2_H 23 #define ALG_GAME_MADDOG2_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 MD2ScriptFunctionPoint getScriptFunctionZonePtrFb(
Common::String name);
67 MD2ScriptFunctionRect getScriptFunctionRectHit(
Common::String name);
68 MD2ScriptFunctionScene getScriptFunctionScene(SceneFuncType type,
Common::String name);
73 MD2ScriptFunctionPointMap _zonePtrFb;
74 MD2ScriptFunctionRectMap _rectHitFuncs;
75 MD2ScriptFunctionSceneMap _scenePreOps;
76 MD2ScriptFunctionSceneMap _sceneShowMsg;
77 MD2ScriptFunctionSceneMap _sceneInsOps;
78 MD2ScriptFunctionSceneMap _sceneWepDwn;
79 MD2ScriptFunctionSceneMap _sceneScnScr;
80 MD2ScriptFunctionSceneMap _sceneNxtFrm;
81 MD2ScriptFunctionSceneMap _sceneNxtScn;
103 const int16 _sbClue[3] = {0x67, 0x68, 0x69};
104 const int16 _bbClue[3] = {0x47, 0x49, 0x48};
105 const int16 _tpClue[3] = {0x84, 0x85, 0x86};
106 const int16 _sbScenes[14] = {0x4A, 0x50, 0xB8, 0x55, 0x57, 0x66, 0xBE, 0x94, 0x87, 0x93, 0xCD, 0x95, 0xE3, -1};
107 const int16 _bbScenes[14] = {0x33, 0x39, 0xB4, 0x41, 0x43, 0x46, 0xA2, 0x8D, 0x87, 0x8F, 0xCD, 0x8E, 0xE3, -1};
108 const int16 _tpScenes[14] = {0x6A, 0xC3, 0x76, 0x81, 0xAD, 0x83, 0xDC, 0x92, 0x87, 0x90, 0xCD, 0x91, 0xE3, -1};
109 const int16 _villageScenes[6] = {0x58, 0x5A, 0x5C, 0x5E, 0x60, 0x62};
110 const int16 _cowboyScenes[7] = {0xCD, 0xCF, 0xD2, 0xD4, 0xD6, 0xD8, 0xDA};
111 const int16 _farmyardScenes[4] = {0xDC, 0xDE, 0x129, 0xE1};
112 const int16 _caveScenes[5] = {0xE4, 0xE6, 0xE8, 0xEA, 0xEC};
113 const int16 _ezShootOuts[5] = {0xAB, 0xBC, 0xC5, 0xC7, 0xCB};
114 const int16 _shootOuts[6] = {0xAB, 0xBC, 0xC5, 0xC7, 0xC9, 0xCB};
115 const int16 _ggScenes[3] = {0x87, 0x88, 0x89};
116 const int16 _dieScenes[6] = {0x96, 0x97, 0x98, 0x9B, 0x9F, 0xA1};
118 const uint16 _diffPos[3][2] = {{0x0FA, 0x6E}, {0xFA, 0x8E}, {0xFA, 0xAF}};
119 const uint16 _livePos[3][2] = {{0x81, 0xBE}, {0x70, 0xBE}, {0x5F, 0xBE}};
120 const uint16 _shotPos[12][2] = {{0x96, 0xBD}, {0x9A, 0xBD}, {0x9E, 0xBD}, {0x0A2, 0xBD}, {0x0A6, 0xBD}, {0x0AA, 0xBD}, {0x0AE, 0xBD}, {0x0B2, 0xBD}, {0x0B6, 0xBD}, {0x0BA, 0xBD}, {0x0BE, 0xBD}, {0x0C2, 0xBD}};
123 uint8 _difficulty = 1;
124 uint8 _emptyCount = 0;
125 bool _holster =
false;
126 uint8 _oldDifficulty = 1;
127 uint8 _inHolster = 0;
131 int32 _oldScore = -1;
132 bool _shotFired =
false;
136 uint8 _oldWhichGun = 0xFF;
145 bool _hadSkull =
false;
146 int16 _thisGuide = 0;
147 uint16 _doneGuide = 0;
148 uint16 _shootOutBits = 0;
149 int16 _lastShootOut = 0;
150 uint16 _startLives = 3;
151 bool _wasAShootout =
false;
152 bool _shootoutFromDie =
false;
153 uint16 _whichPadre = 0;
154 uint16 _whichGatlingGun = 0;
155 bool _inShootout =
false;
156 uint16 _pickMask = 0;
157 uint16 _lastPick = 0;
158 uint16 _placeBits = 0;
159 uint16 _randomCount = 0;
160 uint16 _shootOutCnt = 0;
161 uint16 _totalDies = 0;
167 uint32 _thisGameTimer = 0;
174 void changeDifficulty(uint8 newDifficulty);
175 void showDifficulty(uint8 newDifficulty,
bool updateCursor);
176 void adjustDifficulty(uint8 newDifficulty, uint8 oldDifficulty);
191 uint16 pickBits(uint16 *bits, uint8 max);
192 uint16 pickShootout();
201 void setupCursorTimer();
202 void removeCursorTimer();
209 void rectNewScene(
Rect *rect);
210 void rectShotmenu(
Rect *rect);
211 void rectSave(
Rect *rect);
212 void rectLoad(
Rect *rect);
213 void rectContinue(
Rect *rect);
214 void rectStart(
Rect *rect);
215 void rectEasy(
Rect *rect);
216 void rectAverage(
Rect *rect);
217 void rectHard(
Rect *rect);
218 void rectExit(
Rect *rect);
219 void rectSkull(
Rect *rect);
220 void rectKillInnocentMan(
Rect *rect);
221 void rectKillInnocentWoman(
Rect *rect);
222 void rectSelectBeaver(
Rect *rect);
223 void rectSelectBonnie(
Rect *rect);
224 void rectSelectProfessor(
Rect *rect);
225 void rectShotAmmo(
Rect *rect);
226 void rectShotGin(
Rect *rect);
227 void rectShotLantern(
Rect *rect);
228 void rectShootSkull(
Rect *rect);
231 void scenePsoShootout(
Scene *scene);
232 void scenePsoMDShootout(
Scene *scene);
235 void sceneIsoShootpast(
Scene *scene);
236 void sceneIsoShootpastPause(
Scene *scene);
237 void sceneIsoStagecoach(
Scene *scene);
238 void sceneIsoDifferentPadres(
Scene *scene);
239 void sceneIsoDifferentPadresPause(
Scene *scene);
240 void sceneIsoDontPopNext(
Scene *scene);
241 void sceneIsoGetIntoRock(
Scene *scene);
242 void sceneIsoBenAtCave(
Scene *scene);
243 void sceneIsoSkullAtCave(
Scene *scene);
244 void sceneIsoStartOfTrain(
Scene *scene);
245 void sceneIsoMission(
Scene *scene);
246 void sceneIsoMDShootout(
Scene *scene);
247 void sceneIsoStartOfBoardinghouse(
Scene *scene);
248 void sceneIsoDontContinue(
Scene *scene);
249 void sceneIsoDoShootout(
Scene *scene);
252 void sceneDefaultNxtscn(
Scene *scene);
253 void sceneNxtscnDied(
Scene *scene);
254 void sceneNxtscnKillInnocentMan(
Scene *scene);
255 void sceneNxtscnKillInnocentWoman(
Scene *scene);
256 void sceneNxtscnKillGuide(
Scene *scene);
257 void sceneNxtscnShootSkull(
Scene *scene);
258 void sceneNxtscnCallAttract(
Scene *scene);
259 void sceneNxtscnPickUndertaker(
Scene *scene);
260 void sceneNxtscnChoosePadre(
Scene *scene);
261 void sceneNxtscnSelectGuide(
Scene *scene);
262 void sceneNxtscnSaveBonnie(
Scene *scene);
263 void sceneNxtscnFinishBonnie(
Scene *scene);
264 void sceneNxtscnShowGGClue(
Scene *scene);
265 void sceneNxtscnBBAfterClue(
Scene *scene);
266 void sceneNxtscnAsFarSheGoes(
Scene *scene);
267 void sceneNxtscnSaveBeaver(
Scene *scene);
268 void sceneNxtscnFinishBeaver(
Scene *scene);
269 void sceneNxtscnToGatlingGunSBClue(
Scene *scene);
270 void sceneNxtscnToGuideafterClue(
Scene *scene);
271 void sceneNxtscnToGuideCave(
Scene *scene);
272 void sceneNxtscnInitRandomVillage(
Scene *scene);
273 void sceneNxtscnPickVillageScenes(
Scene *scene);
274 void sceneNxtscnSaveProfessor(
Scene *scene);
275 void sceneNxtscnFinishProfessor(
Scene *scene);
276 void sceneNxtscnToGatlingGunTPClue(
Scene *scene);
277 void sceneNxtscnTPAfterClue(
Scene *scene);
278 void sceneNxtscnFinishGatlingGun1(
Scene *scene);
279 void sceneNxtscnFinishGuyAtGG(
Scene *scene);
280 void sceneNxtscnFinishGatlingGun2(
Scene *scene);
281 void sceneNxtscnHowWeDid(
Scene *scene);
282 void sceneNxtscnPlayerWon(
Scene *scene);
283 void sceneNxtscnBackToNextGuide(
Scene *scene);
284 void sceneNxtscnFinishGenericScene(
Scene *scene);
285 void sceneNxtscnInitRandomCowboys(
Scene *scene);
286 void sceneNxtscnToCowboyScenes(
Scene *scene);
287 void sceneNxtscnInitRandomFarmyard(
Scene *scene);
288 void sceneNxtscnToFarmyardScenes(
Scene *scene);
289 void sceneNxtscnInitRandomCave(
Scene *scene);
290 void sceneNxtscnToCaveScenes(
Scene *scene);
291 void sceneNxtscnPickSkullAtCave(
Scene *scene);
292 void sceneNxtscnDrawGun(
Scene *scene);
295 void sceneDefaultWepdwn(
Scene *scene);
298 void sceneDefaultScore(
Scene *scene);
304 bool cmdWarpTo(
int argc,
const char **argv);
305 bool cmdDumpLib(
int argc,
const char **argv);
Definition: game_maddog2.h:42
Definition: savefile.h:54
Definition: debugger.h:41
Definition: game_maddog2.h:301
Definition: audiostream.h:212
Definition: detection.h:39