22 #ifndef ALG_GAME_MADDOG_H 23 #define ALG_GAME_MADDOG_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 MDScriptFunctionPoint getScriptFunctionZonePtrFb(
Common::String name);
67 MDScriptFunctionRect getScriptFunctionRectHit(
Common::String name);
68 MDScriptFunctionScene getScriptFunctionScene(SceneFuncType type,
Common::String name);
73 MDScriptFunctionPointMap _zonePtrFb;
74 MDScriptFunctionRectMap _rectHitFuncs;
75 MDScriptFunctionSceneMap _scenePreOps;
76 MDScriptFunctionSceneMap _sceneShowMsg;
77 MDScriptFunctionSceneMap _sceneInsOps;
78 MDScriptFunctionSceneMap _sceneWepDwn;
79 MDScriptFunctionSceneMap _sceneScnScr;
80 MDScriptFunctionSceneMap _sceneNxtFrm;
81 MDScriptFunctionSceneMap _sceneNxtScn;
106 const uint16 _fight[3] = {208, 228, 243};
107 const uint16 _ambush[3] = {192, 193, 192};
108 const uint16 _hotelScenes[10] = {77, 77, 87, 87, 89, 89, 97, 97, 105, 105};
109 const uint16 _bottleToss[14] = {171, 171, 174, 174, 175, 175, 178, 178, 179, 179, 182, 182, 183, 183};
111 const uint16 _diffPos[4][2] = {{0, 0}, {0x4D, 0x43}, {0x4E, 0x66}, {0x4F, 0x80}};
112 const uint16 _livePos[3][2] = {{0x03, 0x5E}, {0x03, 0x76}, {0x03, 0x8E}};
113 const uint16 _shotPos[12][2] = {{0x3, 0x5}, {0x0D, 0x5}, {0x17, 0x5}, {0x21, 0x5}, {0x3, 0x21}, {0x0D, 0x21}, {0x17, 0x21}, {0x21, 0x21}, {0x3, 0x3D}, {0x0D, 0x3D}, {0x17, 0x3D}, {0x21, 0x3D}};
116 uint8 _difficulty = 1;
117 uint8 _emptyCount = 0;
118 bool _holster =
false;
119 uint8 _oldDifficulty = 1;
120 uint8 _inHolster = 0;
124 int32 _oldScore = -1;
125 bool _shotFired =
false;
129 uint8 _oldWhichGun = 0xFF;
134 uint8 _badMenBits = 0;
135 bool _bartenderAlive =
false;
138 uint8 _bottlesMask = 0;
139 bool _gotClue =
false;
142 bool _hadSkull =
false;
143 bool _hadLantern =
false;
144 bool _hideOutFront =
false;
145 bool _inShootout =
false;
150 uint8 _maxMapPos = 0;
151 uint8 _peopleKilled = 0;
153 uint8 _sheriffCnt = 0;
154 uint8 _shootOutCnt = 0;
159 uint32 _thisGameTimer = 0;
166 void changeDifficulty(uint8 newDifficulty);
167 void showDifficulty(uint8 newDifficulty,
bool updateCursor);
168 void adjustDifficulty(uint8 newDifficulty, uint8 oldDifficulty);
181 uint8 pickRand(uint8 *bits, uint8 max);
182 uint8 pickBad(uint8 max);
190 void setupCursorTimer();
191 void removeCursorTimer();
198 void rectNewScene(
Rect *rect);
199 void rectShotMenu(
Rect *rect);
200 void rectContinue(
Rect *rect);
201 void rectSave(
Rect *rect);
202 void rectLoad(
Rect *rect);
203 void rectStart(
Rect *rect);
204 void rectStartBottles(
Rect *rect);
205 void rectEasy(
Rect *rect);
206 void rectAverage(
Rect *rect);
207 void rectHard(
Rect *rect);
208 void rectExit(
Rect *rect);
209 void rectHideFront(
Rect *rect);
210 void rectHideRear(
Rect *rect);
211 void rectMenuSelect(
Rect *rect);
212 void rectSkull(
Rect *rect);
213 void rectKillMan(
Rect *rect);
214 void rectKillWoman(
Rect *rect);
215 void rectProspSign(
Rect *rect);
216 void rectMineSign(
Rect *rect);
217 void rectMineItem1(
Rect *rect);
218 void rectMineItem2(
Rect *rect);
219 void rectMineItem3(
Rect *rect);
220 void rectMineLantern(
Rect *rect);
221 void rectShotHideout(
Rect *rect);
222 void rectShotRight(
Rect *rect);
223 void rectShotLeft(
Rect *rect);
226 void scenePsoShootout(
Scene *scene);
227 void scenePsoMDShootout(
Scene *scene);
230 void sceneIsoShootPast(
Scene *scene);
231 void sceneIsoShootPastPause(
Scene *scene);
232 void sceneIsoSkipSaloon(
Scene *scene);
233 void sceneIsoSkipSaloon2(
Scene *scene);
234 void sceneIsoCheckSaloon(
Scene *scene);
235 void sceneIsoIntoStable(
Scene *scene);
236 void sceneIsoIntoOffice(
Scene *scene);
237 void sceneIsoIntoBank(
Scene *scene);
238 void sceneIsoCheckBartender(
Scene *scene);
239 void sceneIsoDidHideout(
Scene *scene);
240 void sceneIsoDidSignPost(
Scene *scene);
241 void sceneIsoDoShootout(
Scene *scene);
242 void sceneIsoMDShootout(
Scene *scene);
243 void sceneIsoShotInto116(
Scene *scene);
246 void sceneDefaultNxtscn(
Scene *scene);
247 void sceneNxtscnPickBottle(
Scene *scene);
248 void sceneNxtscnDied(
Scene *scene);
249 void sceneNxtscnAutoSelect(
Scene *scene);
250 void sceneNxtscnFinishSaloon(
Scene *scene);
251 void sceneNxtscnFinishOffice(
Scene *scene);
252 void sceneNxtscnFinishStable(
Scene *scene);
253 void sceneNxtscnFinishBank(
Scene *scene);
254 void sceneNxtscnPicSaloon(
Scene *scene);
255 void sceneNxtscnKillMan(
Scene *scene);
256 void sceneNxtscnKillWoman(
Scene *scene);
257 void sceneNxtscnBank(
Scene *scene);
258 void sceneNxtscnStable(
Scene *scene);
259 void sceneNxtscnSavProsp(
Scene *scene);
260 void sceneNxtscnPickToss(
Scene *scene);
261 void sceneNxtscnHitToss(
Scene *scene);
262 void sceneNxtscnMissToss(
Scene *scene);
263 void sceneNxtscnPickSign(
Scene *scene);
264 void sceneNxtscnBRockMan(
Scene *scene);
265 void sceneNxtscnLRockMan(
Scene *scene);
266 void sceneNxtscnHotelMen(
Scene *scene);
269 void sceneDefaultWepdwn(
Scene *scene);
272 void sceneDefaultScore(
Scene *scene);
278 bool cmdWarpTo(
int argc,
const char **argv);
279 bool cmdDumpLib(
int argc,
const char **argv);
Definition: savefile.h:54
Definition: debugger.h:41
Definition: audiostream.h:212
Definition: game_maddog.h:42
Definition: game_maddog.h:275
Definition: detection.h:39