diff options
Diffstat (limited to 'engines/mortevielle/mortevielle.h')
-rw-r--r-- | engines/mortevielle/mortevielle.h | 76 |
1 files changed, 28 insertions, 48 deletions
diff --git a/engines/mortevielle/mortevielle.h b/engines/mortevielle/mortevielle.h index 4d07d3000f..27a3d5697a 100644 --- a/engines/mortevielle/mortevielle.h +++ b/engines/mortevielle/mortevielle.h @@ -44,38 +44,22 @@ #include "mortevielle/mouse.h" #include "mortevielle/saveload.h" #include "mortevielle/sound.h" -#include "mortevielle/speech.h" #include "mortevielle/outtext.h" namespace Mortevielle { -/*---------------------------------------------------------------------------*/ -/*------------------- MEMORY MAP ------------------------*/ -/*---------------------------------------------------------------------------*/ -/* The following is a list of physical addresses in memory currently used - * by the game. - * - * Address - * ------- - * 5000:0 - Music data - * 6000:0 - Decompressed current image - * 7000:0+ - Compressed images - * 7000:2 - 16 words representing palette map - * 7000:4138 - width, height, x/y offset of decoded image - */ -const int kAdrMusic = 0x5000; - // Debug channels enum { kMortevielleCore = 1 << 0, - kMortevielleGraphics = 1 << 1 + kMortevielleGraphics = 1 << 1, + kMortevielleSounds = 1 << 2 }; // Game languages enum { - LANG_FRENCH = 0, - LANG_ENGLISH = 1, - LANG_GERMAN = 2 + MORTDAT_LANG_FRENCH = 0, + MORTDAT_LANG_ENGLISH = 1, + MORTDAT_LANG_GERMAN = 2 }; // Static string list @@ -83,7 +67,7 @@ enum { S_YES_NO = 0, S_GO_TO = 1, S_SOMEONE_ENTERS = 2, S_COOL = 3, S_LOURDE = 4, S_MALSAINE = 5, S_IDEM = 6, S_YOU = 7, S_ARE = 8, S_ALONE = 9, S_HEAR_NOISE = 10, S_SHOULD_HAVE_NOTICED = 11, S_NUMBER_OF_HINTS = 12, - S_WANT_TO_WAKE_UP = 13, S_OK = 14, S_SAVE_LOAD = 15, S_RESTART = 18, S_F3 = 19, + S_WANT_TO_WAKE_UP = 13, S_OKAY = 14, S_SAVE_LOAD = 15, S_RESTART = 18, S_F3 = 19, S_F8 = 20, S_HIDE_SELF = 21, S_TAKE = 22, S_PROBE = 23, S_RAISE = 24, S_SUITE = 25, S_STOP = 26, S_USE_DEP_MENU = 27, S_LIFT = 28, S_READ = 29, S_LOOK = 30, S_SEARCH = 31, S_OPEN = 32, S_PUT = 33, S_TURN = 34, S_TIE = 35, S_CLOSE = 36, @@ -112,7 +96,7 @@ const int kFleche = 1758; const int kAsoul = 154; const int kAouvr = 282; -const int kAchai = 387; +const int kAsearch = 387; const int kArcf = 1272; const int kArep = 1314; const int kAmzon = 1650; @@ -138,7 +122,7 @@ const int kMaxPatt = 20; */ enum Places { OWN_ROOM = 0, GREEN_ROOM = 1, PURPLE_ROOM = 2, TOILETS = 3, DARKBLUE_ROOM = 4, - BLUE_ROOM = 5, RED_ROOM = 6, BATHROOM = 7, GREEN_ROOM2 = 8, ROOM9 = 9, + BLUE_ROOM = 5, RED_ROOM = 6, BATHROOM = 7, GREEN_ROOM2 = 8, JULIA_ROOM = 9, DINING_ROOM = 10, BUREAU = 11, KITCHEN = 12, ATTIC = 13, CELLAR = 14, LANDING = 15, CRYPT = 16, SECRET_PASSAGE = 17, ROOM18 = 18, MOUNTAIN = 19, CHAPEL = 20, MANOR_FRONT = 21, MANOR_BACK = 22, INSIDE_WELL = 23, WELL = 24, @@ -185,9 +169,11 @@ struct Hint { byte _point; }; +struct MortevielleGameDescription; + class MortevielleEngine : public Engine { private: - const ADGameDescription *_gameDescription; + const MortevielleGameDescription *_gameDescription; Common::Stack<int> _keypresses; uint32 _lastGameFrame; Common::Point _mousePos; @@ -197,7 +183,6 @@ private: Pattern _patternArr[15]; int _menuOpcode; - bool _mouseClick; bool _inMainGameLoop; // Flag when the main game loop is active bool _quitGame; // Quit game flag. Originally called 'arret' bool _endGame; // End game flag. Originally called 'solu' @@ -213,7 +198,7 @@ private: bool _roomPresencePat; bool _toiletsPresenceBobMax; bool _bathRoomPresenceBobMax; - bool _room9PresenceLeo; + bool _juliaRoomPresenceLeo; bool _hiddenHero; bool _heroSearching; bool _keyPressedEsc; @@ -234,7 +219,7 @@ private: int _day; int _hour; int _minute; - int _mchai; + int _curSearchObjId; int _controlMenu; int _startHour; int _endHour; @@ -257,7 +242,7 @@ private: Common::String _hintPctMessage; byte *_cfiecBuffer; int _cfiecBufferSize; - int _openObjects[8]; + int _openObjects[7]; uint16 _dialogIndexArray[kMaxDialogIndex + 1]; Hint _dialogHintArray[kMaxDialogHint + 1]; @@ -272,10 +257,9 @@ private: void mainGame(); void playGame(); void handleAction(); - void displayCGAPattern(int n, Pattern p, nhom *pal); + void displayCGAPattern(int n, Pattern *p, nhom *pal); void loadPalette(); void loadTexts(); - void loadBRUIT5(); void loadCFIEC(); void loadCFIPH(); void showTitleScreen(); @@ -352,7 +336,7 @@ private: void setRandomPresencePurpleRoom(int faithScore); void setRandomPresenceBlueRoom(int faithScore); void setRandomPresenceRedRoom(int faithScore); - void setRandomPresenceRoom9(int faithScore); + void setRandomPresenceJuliaRoom(int faithScore); void setRandomPresenceDiningRoom(int faithScore); void setRandomPresenceBureau(int faithScore); void setRandomPresenceKitchen(int faithScore); @@ -402,6 +386,7 @@ private: void displayQuestionText(Common::String s, int cmd); void displayTextInDescriptionBar(int x, int y, int nb, int mesgId); void displayTextInVerbBar(Common::String text); + void displayTextBlock(Common::String text); void mapMessageId(int &mesgId); void resetOpenObjects(); void setCoordinates(int sx); @@ -411,17 +396,16 @@ private: void putInHand(int &objId); void initMaxAnswer(); void displayAnimFrame(int frameNum, int animId); + int getFirstObject(); + void prepareNextObject(); + void putObject(); + void resetObjectPlace(); + void drawDiscussionBox(); + void displayNarrativePicture(int af, int ob); + void menuUp(); + void displayLookScreen(int objId); - void copcha(); void adzon(); - void premtet(); - void ajchai(); - void ecr2(Common::String text); - void tlu(int af, int ob); - void mennor(); - void tsuiv(); - void treg(int objId); - int rechai(); public: Common::Point _prevPos; @@ -441,6 +425,7 @@ public: int _savedBitIndex; int _numpal; int _key; + bool _mouseClick; SaveStruct _coreVar, _saveStruct; int _maff; @@ -450,13 +435,9 @@ public: int _resolutionScaler; byte _destinationArray[7][25]; - // TODO: Replace the following with proper implementations, or refactor out the code using them - byte _mem[65536 * 16]; byte *_curPict; byte *_curAnim; byte *_rightFramePict; - byte *_compMusicBuf1; - byte *_compMusicBuf2; Debugger _debugger; ScreenSurface _screenSurface; @@ -465,13 +446,12 @@ public: Common::RandomSource _randomSource; SoundManager _soundManager; SavegameManager _savegameManager; - SpeechManager _speechManager; Menu _menu; MouseHandler _mouse; TextHandler _text; DialogManager _dialogManager; - MortevielleEngine(OSystem *system, const ADGameDescription *gameDesc); + MortevielleEngine(OSystem *system, const MortevielleGameDescription *gameDesc); ~MortevielleEngine(); virtual bool hasFeature(EngineFeature f) const; virtual bool canLoadGameStateCurrently(); @@ -512,7 +492,7 @@ public: void handleDescriptionText(int f, int mesgId); int getAnimOffset(int frameNum, int animNum); - void hirs(); + void clearScreen(); }; extern MortevielleEngine *g_vm; |