diff options
Diffstat (limited to 'engines/mortevielle')
-rw-r--r-- | engines/mortevielle/actions.cpp | 6 | ||||
-rw-r--r-- | engines/mortevielle/mortevielle.h | 5 | ||||
-rw-r--r-- | engines/mortevielle/outtext.cpp | 24 | ||||
-rw-r--r-- | engines/mortevielle/utils.cpp | 61 |
4 files changed, 83 insertions, 13 deletions
diff --git a/engines/mortevielle/actions.cpp b/engines/mortevielle/actions.cpp index 556475d515..b7b9c1e000 100644 --- a/engines/mortevielle/actions.cpp +++ b/engines/mortevielle/actions.cpp @@ -571,6 +571,7 @@ void MortevielleEngine::fctSearch() { _curSearchObjId = getFirstObject(); if (_curSearchObjId != 0) { _searchCount = 0; + _is = 0; _heroSearching = true; _menu->setSearchMenu(); prepareNextObject(); @@ -1678,9 +1679,8 @@ void MortevielleEngine::endGame() { handleDescriptionText(2, 35); startMusicOrSpeech(0); testKey(false); - // A wait message was displayed. - // testKey (aka tkey1) was called before and after. - // This double call is useless, thus removed + displayInterScreenMessage(2036); + testKey(false); resetVariables(); } diff --git a/engines/mortevielle/mortevielle.h b/engines/mortevielle/mortevielle.h index b6fee3f19f..42d70fcb37 100644 --- a/engines/mortevielle/mortevielle.h +++ b/engines/mortevielle/mortevielle.h @@ -92,7 +92,7 @@ enum DataType { #define MORT_DAT_REQUIRED_VERSION 1 #define MORT_DAT "mort.dat" #define GAME_FRAME_DELAY (1000 / 50) -#define DISK_ACCESS_DELAY 3000 +#define DISK_ACCESS_DELAY 1000 const int kTime1 = 410; const int kTime2 = 250; @@ -116,6 +116,7 @@ const int kInventoryStringIndex = 186; const int kQuestionStringIndex = 247; const int kDialogStringIndex = 292; const int kMenuPlaceStringIndex = 435; +const int kStartingScreenStringIndex = 456; const int kMenuActionStringIndex = 476; const int kMenuSelfStringIndex = 497; const int kMenuSayStringIndex = 502; @@ -416,6 +417,7 @@ public: int _maff; int _caff; int _crep; + int _is; // ??? byte _destinationArray[7][25]; @@ -466,6 +468,7 @@ public: void gameLoaded(); void initGame(); void displayAloneText(); + void displayInterScreenMessage(int mesgId); void draw(int x, int y); void charToHour(); void hourToChar(); diff --git a/engines/mortevielle/outtext.cpp b/engines/mortevielle/outtext.cpp index 6a479c0859..5cbe4deab3 100644 --- a/engines/mortevielle/outtext.cpp +++ b/engines/mortevielle/outtext.cpp @@ -227,7 +227,31 @@ void TextHandler::taffich() { Common::String filename, altFilename; if ((a != 50) && (a != 51)) { + int m = a + 2000; + + if ((m > 2001) && (m < 2010)) + m = 2001; + else if (m == 2011) + m = 2010; + if (a == 32) + m = 2034; + else if ((a == 17) && (_vm->_maff == 14)) + m = 2018; + else if (a > 99) { + if ((_vm->_is == 1) || (_vm->_is == 0)) + m = 2031; + else + m = 2032; + } + + if ( ((a > 69) && (a < 80)) || (a == 30) || (a == 31) || (a == 144) || (a == 147) || (a == 149) ) + m = 2030; + else if ( ((a < 27) && ( ((_vm->_maff > 69) && (!_vm->_coreVar._alreadyEnteredManor)) || (_vm->_maff > 99) )) || ((_vm->_maff > 29) && (_vm->_maff < 33)) ) + m = 2033; + + _vm->displayInterScreenMessage(m); _vm->_maff = a; + if (a == 159) a = 86; else if (a > 140) diff --git a/engines/mortevielle/utils.cpp b/engines/mortevielle/utils.cpp index 61f58c0972..5137e1892b 100644 --- a/engines/mortevielle/utils.cpp +++ b/engines/mortevielle/utils.cpp @@ -391,7 +391,7 @@ void MortevielleEngine::setTextColor(int col) { */ void MortevielleEngine::prepareScreenType1() { // Large drawing - _screenSurface->drawBox(0, 11, 512, 164, 15); + _screenSurface->drawBox(0, 11, 512, 163, 15); } /** @@ -707,11 +707,11 @@ void MortevielleEngine::displayAloneText() { Common::String sAlone = getEngineString(S_ALONE); clearUpperRightPart(); - _screenSurface->putxy(580 - (_screenSurface->getStringWidth(sYou) / 2), 30); + _screenSurface->putxy(560, 30); _screenSurface->drawString(sYou, 4); - _screenSurface->putxy(580 - (_screenSurface->getStringWidth(sAre) / 2), 50); + _screenSurface->putxy(560, 50); _screenSurface->drawString(sAre, 4); - _screenSurface->putxy(580 - (_screenSurface->getStringWidth(sAlone) / 2), 70); + _screenSurface->putxy(560, 70); _screenSurface->drawString(sAlone, 4); _currBitIndex = 0; @@ -1359,6 +1359,7 @@ void MortevielleEngine::endSearch() { _heroSearching = false; _obpart = false; _searchCount = 0; + _is = 0; _menu->unsetSearchMenu(); } @@ -1381,7 +1382,7 @@ void MortevielleEngine::gotoDiningRoom() { showPeoplePresent(_currBitIndex); _caff = 77; drawPictureWithText(); - _screenSurface->drawBox(223, 47, 155, 92, 15); + _screenSurface->drawBox(223, 47, 155, 91, 15); handleDescriptionText(2, 33); testKey(false); menuUp(); @@ -1469,6 +1470,7 @@ void MortevielleEngine::gameLoaded() { _num = 0; _startTime = 0; _endTime = 0; + _is = 0; _searchCount = 0; _roomDoorId = OWN_ROOM; _syn = true; @@ -1693,7 +1695,7 @@ void MortevielleEngine::clearUpperRightPart() { else if (_coreVar._faithScore > 65) st = getEngineString(S_MALSAINE); - int x1 = 580 - (_screenSurface->getStringWidth(st) / 2); + int x1 = 574 - (_screenSurface->getStringWidth(st) / 2); _screenSurface->putxy(x1, 92); _screenSurface->drawString(st, 4); @@ -1724,6 +1726,22 @@ void MortevielleEngine::showMoveMenuAlert() { * @remarks Originally called 'dialpre' */ void MortevielleEngine::showConfigScreen() { + // FIXME: need a DOS palette, index 9 (light blue). Also we should show DOS font here + Common::String tmpStr; + int width, cy = 0; + clearScreen(); + do { + ++cy; + tmpStr = getString(cy + kStartingScreenStringIndex); + width = _screenSurface->getStringWidth(tmpStr); + _text->displayStr(tmpStr, 320 - width / 2, cy * 8, 80, 1, 2); + } while (cy != 20); + + int ix = 0; + do { + ++ix; + } while (!(keyPressed() || ix == 0x5e5)); + _crep = 998; } @@ -2130,6 +2148,7 @@ void MortevielleEngine::showTitleScreen() { clearScreen(); draw(0, 0); + // FIXME: should be a DOS font here Common::String cpr = "COPYRIGHT 1989 : LANKHOR"; _screenSurface->putxy(104 + 72 * kResolutionScaler, 185); _screenSurface->drawString(cpr, 0); @@ -2885,10 +2904,10 @@ void MortevielleEngine::drawPicture() { clearUpperLeftPart(); if (_caff > 99) { draw(60, 33); - _screenSurface->drawBox(118, 32, 291, 122, 15); // Medium box + _screenSurface->drawBox(118, 32, 291, 121, 15); // Medium box } else if (_caff > 69) { draw(112, 48); // Heads - _screenSurface->drawBox(222, 47, 155, 92, 15); + _screenSurface->drawBox(222, 47, 155, 91, 15); } else { draw(0, 12); prepareScreenType1(); @@ -2926,6 +2945,9 @@ void MortevielleEngine::drawPicture() { } } +/** + * @remarks Originally called 'afdes' + */ void MortevielleEngine::drawPictureWithText() { _text->taffich(); drawPicture(); @@ -2986,6 +3008,26 @@ void MortevielleEngine::displayNarrativePicture(int af, int ob) { } /** + * Display a message switching from a screen to another. + * @remarks Originally called 'messint' + */ +void MortevielleEngine::displayInterScreenMessage(int mesgId) { + clearUpperLeftPart(); + clearDescriptionBar(); + clearVerbBar(); + + GfxSurface surface; + surface.decode(_rightFramePict + 1008); + surface._offset.x = 80; + surface._offset.y = 40; + setPal(90); + _screenSurface->drawPicture(surface, 0, 0); + _screenSurface->drawPicture(surface, 0, 70); + handleDescriptionText(7, mesgId); + delay(DISK_ACCESS_DELAY); +} + +/** * Prepare Display Text * @remarks Originally called 'affrep' */ @@ -3087,7 +3129,7 @@ void MortevielleEngine::menuUp() { */ void MortevielleEngine::drawDiscussionBox() { draw(10, 80); - _screenSurface->drawBox(18, 79, 155, 92, 15); + _screenSurface->drawBox(18, 79, 155, 91, 15); } /** @@ -3193,6 +3235,7 @@ void MortevielleEngine::prepareNextObject() { } while ((objId == 0) && (_searchCount <= 9)); if ((objId != 0) && (_searchCount < 11)) { + _is++; _caff = objId; _crep = _caff + 400; if (_currBitIndex != 0) |