27 #ifndef MORTEVIELLE_MORTEVIELLE_H 28 #define MORTEVIELLE_MORTEVIELLE_H 30 #include "common/events.h" 31 #include "common/file.h" 32 #include "common/random.h" 33 #include "common/rect.h" 34 #include "common/stack.h" 35 #include "engines/engine.h" 36 #include "common/error.h" 37 #include "graphics/surface.h" 38 #include "mortevielle/debugger.h" 39 #include "mortevielle/dialogs.h" 40 #include "mortevielle/graphics.h" 41 #include "mortevielle/menu.h" 42 #include "mortevielle/mouse.h" 43 #include "mortevielle/saveload.h" 44 #include "mortevielle/sound.h" 45 #include "mortevielle/outtext.h" 46 #include "mortevielle/detection.h" 52 kMortevielleCore = 1 << 0,
53 kMortevielleGraphics = 1 << 1,
54 kMortevielleSounds = 1 << 2
59 MORTDAT_LANG_FRENCH = 0,
60 MORTDAT_LANG_ENGLISH = 1,
61 MORTDAT_LANG_GERMAN = 2
66 S_YES_NO = 0, S_GO_TO = 1, S_SOMEONE_ENTERS = 2, S_COOL = 3, S_LOURDE = 4,
67 S_MALSAINE = 5, S_IDEM = 6, S_YOU = 7, S_ARE = 8, S_ALONE = 9,
68 S_HEAR_NOISE = 10, S_SHOULD_HAVE_NOTICED = 11, S_NUMBER_OF_HINTS = 12,
69 S_WANT_TO_WAKE_UP = 13, S_OKAY = 14, S_SAVE_LOAD = 15, S_RESTART = 18, S_F3 = 19,
70 S_F8 = 20, S_HIDE_SELF = 21, S_TAKE = 22, S_PROBE = 23, S_RAISE = 24, S_SUITE = 25,
71 S_STOP = 26, S_USE_DEP_MENU = 27, S_LIFT = 28, S_READ = 29,
72 S_LOOK = 30, S_SEARCH = 31, S_OPEN = 32, S_PUT = 33, S_TURN = 34, S_TIE = 35, S_CLOSE = 36,
73 S_HIT = 37, S_POSE = 38, S_SMASH = 39,
75 S_SMELL = 40, S_SCRATCH = 41, S_PROBE2 = 42, S_BEFORE_USE_DEP_MENU = 43, S_DAY = 44
83 #define SCREEN_WIDTH 640 84 #define SCREEN_HEIGHT 400 85 #define SCREEN_ORIG_HEIGHT 200 86 #define MORT_DAT_REQUIRED_VERSION 1 87 #define MORT_DAT "mort.dat" 88 #define GAME_FRAME_DELAY (1000 / 50) 89 #define DISK_ACCESS_DELAY 1000 91 const int kTime1 = 410;
92 const int kTime2 = 250;
94 const int kAcha = 492;
95 const int kFleche = 1758;
97 const int kAsoul = 154;
98 const int kAouvr = 282;
99 const int kAsearch = 387;
100 const int kArcf = 1272;
101 const int kArep = 1314;
102 const int kAmzon = 1650;
103 const int kArega = 0;
105 const int kMaxDialogIndex = 9000;
106 const int kMaxDialogHint = 600;
108 const int kDescriptionStringIndex = 0;
109 const int kInventoryStringIndex = 186;
110 const int kQuestionStringIndex = 247;
111 const int kDialogStringIndex = 292;
112 const int kMenuPlaceStringIndex = 435;
113 const int kStartingScreenStringIndex = 456;
114 const int kMenuActionStringIndex = 476;
115 const int kMenuSelfStringIndex = 497;
116 const int kMenuSayStringIndex = 502;
117 const int kMaxPatt = 20;
119 const int kResolutionScaler = 2;
125 OWN_ROOM = 0, GREEN_ROOM = 1, PURPLE_ROOM = 2, TOILETS = 3, DARKBLUE_ROOM = 4,
126 BLUE_ROOM = 5, RED_ROOM = 6, BATHROOM = 7, GREEN_ROOM2 = 8, JULIA_ROOM = 9,
127 DINING_ROOM = 10, BUREAU = 11, KITCHEN = 12, ATTIC = 13, CELLAR = 14,
128 LANDING = 15, CRYPT = 16, SECRET_PASSAGE = 17, ROOM18 = 18, MOUNTAIN = 19,
129 CHAPEL = 20, MANOR_FRONT = 21, MANOR_BACK = 22, INSIDE_WELL = 23, WELL = 24,
130 DOOR = 25, ROOM26 = 26, COAT_ARMS = 27
135 byte _pctHintFound[11];
136 byte _availableQuestion[43];
139 int _atticBallHoleObjectId;
140 int _atticRodHoleObjectId;
142 int _secretPassageObjectId;
144 int _selectedObjectId;
145 int _purpleRoomObjectId;
147 bool _alreadyEnteredManor;
160 uint32 _lastGameFrame;
167 bool _inMainGameLoop;
172 bool _roomPresenceLuc;
173 bool _roomPresenceIda;
174 bool _purpleRoomPresenceLeo;
175 bool _roomPresenceGuy;
176 bool _roomPresenceEva;
177 bool _roomPresenceMax;
178 bool _roomPresenceBob;
179 bool _roomPresencePat;
180 bool _toiletsPresenceBobMax;
181 bool _bathRoomPresenceBobMax;
182 bool _juliaRoomPresenceLeo;
191 bool _uptodatePresence;
215 bool _introSpeechPlayed;
216 int _inGameHourDuration;
219 int _currentHourCount;
225 int _cfiecBufferSize;
227 uint16 _dialogIndexArray[kMaxDialogIndex + 1];
228 Hint _dialogHintArray[kMaxDialogHint + 1];
232 void readStaticStrings(
Common::File &f,
int dataSize, DataType dataType);
237 void showIntroduction();
245 void showTitleScreen();
247 void palette(
int v1);
248 int checkLeoMaxRandomPresence();
250 void initCaveOrCellar();
251 void displayControlMenu();
252 void displayItemInHand(
int objId);
253 void resetRoomVariables(
int roomId);
254 int getPresenceStats(
int &rand,
int faithScore,
int roomId);
255 void setPresenceFlags(
int roomId);
256 void testKey(
bool d);
258 void getReadDescription(
int objId);
259 void getSearchDescription(
int objId);
260 int checkLeaveSecretPassage();
261 void startDialog(int16 rep);
263 int convertCharacterIndexToBitIndex(
int characterIndex);
264 int convertBitIndexToCharacterIndex(
int bitIndex);
265 void clearUpperLeftPart();
266 void clearDescriptionBar();
268 void clearUpperRightPart();
269 int getRandomNumber(
int minval,
int maxval);
270 void showMoveMenuAlert();
271 void showConfigScreen();
272 void decodeNumber(byte *pStart,
int count);
273 void resetVariables();
275 void drawRightFrame();
278 void checkManorDistance();
279 void gotoManorFront();
280 void gotoManorBack();
281 void gotoDiningRoom();
282 bool checkInventory(
int objectId);
284 void floodedInWell();
285 void displayDiningRoom();
286 void startMusicOrSpeech(
int so);
287 void setTextColor(
int col);
288 void prepareScreenType1();
289 void prepareScreenType2();
290 void prepareScreenType3();
291 void updateHour(
int &day,
int &hour,
int &minute);
292 void getKnockAnswer();
293 int getPresenceStatsGreenRoom();
294 int getPresenceStatsPurpleRoom();
295 int getPresenceStatsToilets();
296 int getPresenceStatsBlueRoom();
297 int getPresenceStatsRedRoom();
298 int getPresenceStatsDiningRoom(
int &hour);
299 int getPresenceStatsBureau(
int &hour);
300 int getPresenceStatsKitchen();
301 int getPresenceStatsAttic();
302 int getPresenceStatsLanding();
303 int getPresenceStatsChapel(
int &hour);
304 int getPresenceBitIndex(
int roomId);
305 void setPresenceGreenRoom(
int roomId);
306 void setPresencePurpleRoom();
307 void setPresenceBlueRoom();
308 void setPresenceRedRoom(
int roomId);
309 int setPresenceDiningRoom(
int hour);
310 int setPresenceBureau(
int hour);
311 int setPresenceKitchen();
312 int setPresenceLanding();
313 int setPresenceChapel(
int hour);
314 void setRandomPresenceGreenRoom(
int faithScore);
315 void setRandomPresencePurpleRoom(
int faithScore);
316 void setRandomPresenceBlueRoom(
int faithScore);
317 void setRandomPresenceRedRoom(
int faithScore);
318 void setRandomPresenceJuliaRoom(
int faithScore);
319 void setRandomPresenceDiningRoom(
int faithScore);
320 void setRandomPresenceBureau(
int faithScore);
321 void setRandomPresenceKitchen(
int faithScore);
322 void setRandomPresenceAttic(
int faithScore);
323 void setRandomPresenceLanding(
int faithScore);
324 void setRandomPresenceChapel(
int faithScore);
326 void resetPresenceInRooms(
int roomId);
327 void showPeoplePresent(
int bitIndex);
328 int selectCharacters(
int min,
int max);
331 void fctInventoryTake();
338 void fctSelfSearch();
361 void prepareDisplayText();
362 bool decryptNextChar(
char &c,
int &idx, byte &pt);
363 void displayStatusArrow();
364 void displayStatusInDescriptionBar(
char stat);
366 void displayTextInDescriptionBar(
int x,
int y,
int nb,
int mesgId);
369 void mapMessageId(
int &mesgId);
370 void resetOpenObjects();
371 void setCoordinates(
int sx);
373 void drawPictureWithText();
374 void addObjectToInventory(
int objectId);
375 void putInHand(
int &objId);
376 void initMaxAnswer();
377 void displayAnimFrame(
int frameNum,
int animId);
378 int getFirstObject();
379 void prepareNextObject();
381 void resetObjectPlace();
383 void drawDiscussionBox();
384 void displayNarrativePicture(
int af,
int ob);
386 void displayLookScreen(
int objId);
394 int _drawingSizeArr[108];
395 int _charAnswerCount[9];
396 int _charAnswerMax[9];
401 bool _largestClearScreen;
414 byte _destinationArray[7][25];
418 byte *_rightFramePict;
440 void pauseEngineIntern(
bool pause)
override;
441 uint32 getGameFlags()
const;
444 bool useOriginalData()
const;
447 return generateSaveFilename(_targetName, slot);
454 bool getMouseClick()
const {
return _mouseClick; }
455 void setMouseClick(
bool v) { _mouseClick = v; }
456 Common::String getEngineString(
int idx)
const {
return _engineStrings[idx]; }
457 Common::String getGameString(
int idx)
const {
return _gameStrings[idx]; }
459 void delay(
int amount);
462 void displayAloneText();
463 void displayInterScreenMessage(
int mesgId);
464 void draw(
int x,
int y);
471 int getPresence(
int roomId);
472 void displayEmptyHand();
473 void displayPicture(
const byte *pic,
int x,
int y);
475 int gettKeyPressed();
476 void handleDescriptionText(
int f,
int mesgId);
477 int getAnimOffset(
int frameNum,
int animNum);
Definition: detection.h:36
Definition: debugger.h:28
EngineFeature
Definition: engine.h:253
Definition: mortevielle.h:133
Definition: graphics.h:85
ErrorCode
Definition: error.h:47
Common::String getSaveStateName(int slot) const override
Definition: mortevielle.h:446
Out copy(In first, In last, Out dst)
Definition: algorithm.h:52
Definition: saveload.h:51
Definition: graphics.h:50
Definition: mortevielle.h:156
Definition: graphics.h:38
Definition: mortevielle.h:151
Language
Definition: language.h:45