TWINE: exit scenery view in some situations
This commit is contained in:
parent
6b6048aabb
commit
15832bdb09
6 changed files with 13 additions and 1 deletions
|
@ -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();
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue