diff options
-rw-r--r-- | engines/mortevielle/dialogs.cpp | 6 | ||||
-rw-r--r-- | engines/mortevielle/graphics.cpp | 2 | ||||
-rw-r--r-- | engines/mortevielle/mortevielle.h | 1 | ||||
-rw-r--r-- | engines/mortevielle/utils.cpp | 19 | ||||
-rw-r--r-- | engines/zvision/video/zork_avi_decoder.cpp | 11 |
5 files changed, 34 insertions, 5 deletions
diff --git a/engines/mortevielle/dialogs.cpp b/engines/mortevielle/dialogs.cpp index 89098fabe5..9df66846d2 100644 --- a/engines/mortevielle/dialogs.cpp +++ b/engines/mortevielle/dialogs.cpp @@ -66,12 +66,12 @@ int DialogManager::show(const Common::String &msg) { drawAlertBox(10, 5, colNumb); } else { drawAlertBox(8, 7, colNumb); - int i = 0; + int i = -1; _vm->_screenSurface->_textPos.y = 70; do { curPos.x = 320; Common::String displayStr = ""; - while ((alertStr[i + 1] != '\174') && (alertStr[i + 1] != '\135')) { + while ((alertStr[i + 1] != '|') && (alertStr[i + 1] != ']')) { ++i; displayStr += alertStr[i]; curPos.x -= 3; @@ -405,7 +405,7 @@ void DialogManager::drawF3F8() { int f8Width = _vm->_screenSurface->getStringWidth(f8); // Write out the bounding box - _vm->_screenSurface->drawBox(0, 42, MAX(f3Width, f8Width) + 6, 18, 7); + _vm->_screenSurface->drawBox(0, 42, MAX(f3Width, f8Width) + 4, 16, 7); } /** diff --git a/engines/mortevielle/graphics.cpp b/engines/mortevielle/graphics.cpp index 553c1a759e..aa479fdd44 100644 --- a/engines/mortevielle/graphics.cpp +++ b/engines/mortevielle/graphics.cpp @@ -1019,6 +1019,8 @@ void ScreenSurface::writeCharacter(const Common::Point &pt, unsigned char ch, in * simulate the original 640x400 surface, all Y values have to be doubled */ void ScreenSurface::drawBox(int x, int y, int dx, int dy, int col) { + dx++; dy++; // Original function draws 1px bigger + Graphics::Surface destSurface = lockArea(Common::Rect(x, y * 2, x + dx, (y + dy) * 2)); destSurface.hLine(0, 0, dx, col); diff --git a/engines/mortevielle/mortevielle.h b/engines/mortevielle/mortevielle.h index 5f7f175c26..b6fee3f19f 100644 --- a/engines/mortevielle/mortevielle.h +++ b/engines/mortevielle/mortevielle.h @@ -92,6 +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 const int kTime1 = 410; const int kTime2 = 250; diff --git a/engines/mortevielle/utils.cpp b/engines/mortevielle/utils.cpp index 40136ad78b..61f58c0972 100644 --- a/engines/mortevielle/utils.cpp +++ b/engines/mortevielle/utils.cpp @@ -234,6 +234,7 @@ void MortevielleEngine::setMousePos(const Common::Point &pt) { void MortevielleEngine::delay(int amount) { uint32 endTime = g_system->getMillis() + amount; + g_system->showMouse(false); while (g_system->getMillis() < endTime) { if (g_system->getMillis() > (_lastGameFrame + GAME_FRAME_DELAY)) { _lastGameFrame = g_system->getMillis(); @@ -244,6 +245,7 @@ void MortevielleEngine::delay(int amount) { g_system->delayMillis(10); } + g_system->showMouse(true); } /** @@ -1653,11 +1655,11 @@ void MortevielleEngine::clearDescriptionBar() { _mouse->hideMouse(); if (_largestClearScreen) { _screenSurface->fillRect(0, Common::Rect(1, 176, 633, 199)); - _screenSurface->drawBox(0, 176, 634, 23, 15); + _screenSurface->drawBox(0, 175, 634, 24, 15); _largestClearScreen = false; } else { _screenSurface->fillRect(0, Common::Rect(1, 176, 633, 190)); - _screenSurface->drawBox(0, 176, 634, 14, 15); + _screenSurface->drawBox(0, 175, 634, 15, 15); } _mouse->showMouse(); } @@ -2124,6 +2126,7 @@ void MortevielleEngine::showTitleScreen() { _caff = 51; _text->taffich(); testKeyboard(); + delay(DISK_ACCESS_DELAY); clearScreen(); draw(0, 0); @@ -2521,6 +2524,18 @@ void MortevielleEngine::handleDescriptionText(int f, int mesgId) { _coreVar._pctHintFound[10] = '*'; } break; + case 7: { + prepareScreenType3(); + Common::String tmpStr = getString(mesgId); + // CHECKME: original code seems to consider one extra character + // See text position in the 3rd intro screen + int size = tmpStr.size() + 1; + if (size < 40) + _text->displayStr(tmpStr, 252 - size * 3, 86, 50, 3, 5); + else + _text->displayStr(tmpStr, 144, 86, 50, 3, 5); + } + break; default: break; } diff --git a/engines/zvision/video/zork_avi_decoder.cpp b/engines/zvision/video/zork_avi_decoder.cpp index 5618250d79..cf8505ec82 100644 --- a/engines/zvision/video/zork_avi_decoder.cpp +++ b/engines/zvision/video/zork_avi_decoder.cpp @@ -39,6 +39,7 @@ Video::AVIDecoder::AVIAudioTrack *ZorkAVIDecoder::createAudioTrack(Video::AVIDec } void ZorkAVIDecoder::ZorkAVIAudioTrack::queueSound(Common::SeekableReadStream *stream) { + bool updateCurChunk = true; if (_audStream) { if (_wvInfo.tag == kWaveFormatZorkPCM) { assert(_wvInfo.size == 8); @@ -54,8 +55,18 @@ void ZorkAVIDecoder::ZorkAVIAudioTrack::queueSound(Common::SeekableReadStream *s _audStream->queueBuffer((byte *)chunk.data, chunk.size, DisposeAfterUse::YES, flags); } } else { + updateCurChunk = false; AVIAudioTrack::queueSound(stream); } + } else { + delete stream; + } + + // The superclass always updates _curChunk, whether or not audio has + // been queued, so we should do that too. Unless the superclass already + // has done it for us. + if (updateCurChunk) { + _curChunk++; } } |