diff options
-rw-r--r-- | saga/actor.cpp | 4 | ||||
-rw-r--r-- | saga/interface.cpp | 15 | ||||
-rw-r--r-- | saga/render.cpp | 2 | ||||
-rw-r--r-- | saga/render.h | 3 | ||||
-rw-r--r-- | saga/scene.cpp | 16 |
5 files changed, 29 insertions, 11 deletions
diff --git a/saga/actor.cpp b/saga/actor.cpp index 92c814ff03..6dc1d2c8fc 100644 --- a/saga/actor.cpp +++ b/saga/actor.cpp @@ -378,7 +378,9 @@ void Actor::takeExit(uint16 actorId, const HitZone *hitZone) { actor->lastZone = NULL; _vm->_scene->changeScene(hitZone->getSceneNumber(), hitZone->getActorsEntrance(), kTransitionNoFade); - _vm->_script->setNoPendingVerb(); + if (_vm->_interface->getMode() != kPanelSceneSubstitute) { + _vm->_script->setNoPendingVerb(); + } } void Actor::stepZoneAction(ActorData *actor, const HitZone *hitZone, bool exit, bool stopped) { diff --git a/saga/interface.cpp b/saga/interface.cpp index 8b4687d283..ba652f9f0a 100644 --- a/saga/interface.cpp +++ b/saga/interface.cpp @@ -298,7 +298,7 @@ void Interface::setMode(int mode) { mapPanelShow(); break; case kPanelSceneSubstitute: - _vm->_render->setFlag(RF_PLACARD); + _vm->_render->setFlag(RF_DEMO_SUBST); _vm->_gfx->getCurrentPal(_mapSavedPal); break; } @@ -447,9 +447,10 @@ bool Interface::processAscii(uint16 ascii, bool synthetic) { break; case kPanelSceneSubstitute: if (ascii == 13) { - _vm->_render->clearFlag(RF_PLACARD); + _vm->_render->clearFlag(RF_DEMO_SUBST); _vm->_gfx->setPalette(_mapSavedPal); setMode(kPanelMain); + _vm->_script->setNoPendingVerb(); } else if (ascii == 'q' || ascii == 'Q') { _vm->shutDown(); } @@ -554,6 +555,13 @@ void Interface::draw() { if (_vm->_scene->isInDemo() || _fadeMode == kFadeOut) return; + // Disable this for IHNM for now, since that game uses the full screen + // in some cases. + + if (_vm->getGameType() == GType_IHNM) { + return; + } + drawStatusBar(); if (_panelMode == kPanelMain) { @@ -1311,9 +1319,10 @@ void Interface::update(const Point& mousePoint, int updateFlag) { if (_panelMode == kPanelSceneSubstitute) { if (updateFlag & UPDATE_MOUSECLICK) { - _vm->_render->clearFlag(RF_PLACARD); + _vm->_render->clearFlag(RF_DEMO_SUBST); _vm->_gfx->setPalette(_mapSavedPal); setMode(kPanelMain); + _vm->_script->setNoPendingVerb(); } } diff --git a/saga/render.cpp b/saga/render.cpp index 5be861ee7e..45f364155a 100644 --- a/saga/render.cpp +++ b/saga/render.cpp @@ -82,7 +82,7 @@ void Render::drawScene() { // Get mouse coordinates mousePoint = _vm->mousePos(); - if (!(_flags & (RF_PLACARD | RF_MAP))) { + if (!(_flags & (RF_DEMO_SUBST | RF_PLACARD | RF_MAP))) { // Display scene background _vm->_scene->draw(); diff --git a/saga/render.h b/saga/render.h index 99d8d7b5a9..05ebf43c3c 100644 --- a/saga/render.h +++ b/saga/render.h @@ -40,7 +40,8 @@ enum RENDER_FLAGS { RF_PLACARD = (1 << 6), RF_ACTOR_PATH_TEST = (1 << 7), RF_MAP = (1 << 8), - RF_DISABLE_ACTORS = (1 << 9) + RF_DISABLE_ACTORS = (1 << 9), + RF_DEMO_SUBST = (1 << 10), }; class Render { diff --git a/saga/scene.cpp b/saga/scene.cpp index 02305e149c..2b1dec3b90 100644 --- a/saga/scene.cpp +++ b/saga/scene.cpp @@ -368,26 +368,32 @@ void Scene::changeScene(uint16 sceneNumber, int actorsEntrance, SceneTransitionT if (sceneSubstitutes[i].sceneId == sceneNumber) { Surface *backBuffer = _vm->_gfx->getBackBuffer(); + Surface bbmBuffer; byte *pal, *colors; Common::File file; + Rect rect; PalEntry cPal[PAL_ENTRIES]; if (file.open(sceneSubstitutes[i].image)) { - _vm->_interface->setStatusText("Click or Press Return to continue. Press Q to quit."); _vm->_interface->setMode(kPanelSceneSubstitute); - Graphics::decodeILBM(file, *backBuffer, colors); - pal = colors; + Graphics::decodeILBM(file, bbmBuffer, pal); + colors = pal; + rect.setWidth(bbmBuffer.w); + rect.setHeight(bbmBuffer.h); + backBuffer->blit(rect, (const byte*)bbmBuffer.pixels); for (int j = 0; j < PAL_ENTRIES; j++) { cPal[j].red = *pal++; cPal[j].green = *pal++; cPal[j].blue = *pal++; } - _vm->_gfx->setPalette(cPal); free(colors); + _vm->_gfx->setPalette(cPal); + + _vm->_interface->setStatusText("Click or Press Return to continue. Press Q to quit."); _vm->_font->textDrawRect(kMediumFont, backBuffer, sceneSubstitutes[i].title, Common::Rect(0, 7, _vm->getDisplayWidth(), 27), 1, 15, kFontOutline); _vm->_font->textDrawRect(kMediumFont, backBuffer, sceneSubstitutes[i].message, - Common::Rect(24, _vm->getSceneHeight() - 33, _vm->getDisplayWidth()-11, + Common::Rect(24, _vm->getSceneHeight() - 33, _vm->getDisplayWidth() - 11, _vm->getSceneHeight()), 1, 15, kFontOutline); } return; |