diff --git a/engines/twine/holomap.cpp b/engines/twine/holomap.cpp index e9f3307b21e..a86cb96bc43 100644 --- a/engines/twine/holomap.cpp +++ b/engines/twine/holomap.cpp @@ -288,6 +288,7 @@ Holomap::TrajectoryData Holomap::loadTrajectoryData(int32 trajectoryIdx) { void Holomap::drawHolomapTrajectory(int32 trajectoryIndex) { debug("Draw trajectory index %i", trajectoryIndex); + _engine->exitSceneryView(); _engine->_interface->resetClip(); _engine->_screens->clearScreen(); _engine->setPalette(_engine->_screens->paletteRGBA); @@ -480,6 +481,8 @@ void Holomap::processHolomap() { const int32 alphaLightTmp = _engine->_scene->alphaLight; const int32 betaLightTmp = _engine->_scene->betaLight; + _engine->exitSceneryView(); + _engine->_screens->fadeToBlack(_engine->_screens->paletteRGBA); _engine->_sound->stopSamples(); _engine->_interface->saveClip(); diff --git a/engines/twine/menu/menu.cpp b/engines/twine/menu/menu.cpp index f9fe538ceb0..64cf77e1cfb 100644 --- a/engines/twine/menu/menu.cpp +++ b/engines/twine/menu/menu.cpp @@ -977,6 +977,7 @@ void Menu::drawBehaviourMenu(int32 angle) { } void Menu::processBehaviourMenu() { + _engine->exitSceneryView(); if (_engine->_actor->heroBehaviour == HeroBehaviourType::kProtoPack) { _engine->_sound->stopSamples(); _engine->_actor->setBehaviour(HeroBehaviourType::kNormal); diff --git a/engines/twine/renderer/redraw.h b/engines/twine/renderer/redraw.h index 5daf7e830b5..135828c16cd 100644 --- a/engines/twine/renderer/redraw.h +++ b/engines/twine/renderer/redraw.h @@ -162,6 +162,9 @@ public: int _sceneryViewX = 0; int _sceneryViewY = 0; + /** + * Zooms the area around the scenery view focus positions + */ void zoomScreenScale(); /** Draw list array to grab the necessary */ diff --git a/engines/twine/scene/gamestate.cpp b/engines/twine/scene/gamestate.cpp index 7fbcd151bf7..ab2c18ed739 100644 --- a/engines/twine/scene/gamestate.cpp +++ b/engines/twine/scene/gamestate.cpp @@ -281,6 +281,7 @@ void GameState::processFoundItem(int32 item) { _engine->_grid->newCameraY = (_engine->_scene->sceneHero->y + BRICK_HEIGHT) / BRICK_HEIGHT; _engine->_grid->newCameraZ = (_engine->_scene->sceneHero->z + BRICK_HEIGHT) / BRICK_SIZE; + _engine->exitSceneryView(); // Hide hero in scene _engine->_scene->sceneHero->staticFlags.bIsHidden = 1; _engine->_redraw->redrawEngineActions(true); @@ -452,6 +453,7 @@ void GameState::processGameChoices(int32 choiceIdx) { void GameState::processGameoverAnimation() { const int32 tmpLbaTime = _engine->lbaTime; + _engine->exitSceneryView(); // workaround to fix hero redraw after drowning _engine->_scene->sceneHero->staticFlags.bIsHidden = 1; _engine->_redraw->redrawEngineActions(true); diff --git a/engines/twine/text.cpp b/engines/twine/text.cpp index a582209bb11..e1621aedd3f 100644 --- a/engines/twine/text.cpp +++ b/engines/twine/text.cpp @@ -661,6 +661,7 @@ bool Text::displayText(int32 index, bool showText, bool playVox, bool loop) { } bool Text::drawTextProgressive(int32 index, bool playVox, bool loop) { + _engine->exitSceneryView(); _engine->_interface->saveClip(); _engine->_interface->resetClip(); _engine->_screens->copyScreen(_engine->frontVideoBuffer, _engine->workVideoBuffer); diff --git a/engines/twine/twine.cpp b/engines/twine/twine.cpp index 623b3e0605e..a78d73b5d55 100644 --- a/engines/twine/twine.cpp +++ b/engines/twine/twine.cpp @@ -587,6 +587,7 @@ void TwinEEngine::processBonusList() { void TwinEEngine::processInventoryAction() { ScopedEngineFreeze scoped(this); + exitSceneryView(); _menu->processInventoryMenu(); switch (loopInventoryItem) { @@ -674,6 +675,7 @@ void TwinEEngine::processInventoryAction() { void TwinEEngine::processOptionsMenu() { ScopedEngineFreeze scoped(this); + exitSceneryView(); _sound->pauseSamples(); _menu->inGameOptionsMenu(); _scene->playSceneMusic(); @@ -738,6 +740,7 @@ int32 TwinEEngine::runGameEngine() { // mainLoopInteration // Process give up menu - Press ESC if (_input->toggleAbortAction() && _scene->sceneHero->life > 0 && _scene->sceneHero->entity != -1 && !_scene->sceneHero->staticFlags.bIsHidden) { freezeTime(); + exitSceneryView(); const int giveUp = _menu->giveupMenu(); if (giveUp == kQuitEngine) { return 0; @@ -821,7 +824,6 @@ int32 TwinEEngine::runGameEngine() { // mainLoopInteration // Draw holomap if (_input->toggleActionIfActive(TwinEActionType::OpenHolomap) && _gameState->hasItem(InventoryItems::kiHolomap) && !_gameState->inventoryDisabled()) { freezeTime(); - //TestRestoreModeSVGA(1); _holomap->processHolomap(); _screens->lockPalette = true; unfreezeTime();