From 063962a583fc3268a5a6b1737a6272c653d6ba9a Mon Sep 17 00:00:00 2001 From: Joseph-Eugene Winzer Date: Thu, 28 Dec 2017 01:16:12 +0100 Subject: SUPERNOVA: Updates palette when changing room brightness --- engines/supernova/rooms.cpp | 3 --- engines/supernova/state.cpp | 9 ++------- 2 files changed, 2 insertions(+), 10 deletions(-) (limited to 'engines') diff --git a/engines/supernova/rooms.cpp b/engines/supernova/rooms.cpp index 0c4d84dc15..8727ca27af 100644 --- a/engines/supernova/rooms.cpp +++ b/engines/supernova/rooms.cpp @@ -1187,13 +1187,11 @@ bool ShipLandingModule::interact(Action verb, Object &obj1, Object &obj2) { if (r->isSectionVisible(9)) _gm->_state._powerOff = true; _gm->roomBrightness(); - _vm->paletteBrightness(); } else { _vm->renderImage(7); if (r->isSectionVisible(9)) _gm->_state._powerOff = false; _gm->roomBrightness(); - _vm->paletteBrightness(); r = _gm->_rooms[SLEEP]; r->setSectionVisible(1, false); r->setSectionVisible(2, false); @@ -2859,7 +2857,6 @@ bool AxacussExit::interact(Action verb, Object &obj1, Object &obj2) { _gm->search(450); _gm->roomBrightness(); - _vm->paletteBrightness(); } else if ((verb == ACTION_USE) && (Object::combine(obj1,obj2,MAGNET,GUARDIAN) || Object::combine(obj1,obj2,KNIFE,GUARDIAN))) _vm->renderMessage(kStringArsanoEntrance27); else diff --git a/engines/supernova/state.cpp b/engines/supernova/state.cpp index 5313f081eb..2b5ae29243 100644 --- a/engines/supernova/state.cpp +++ b/engines/supernova/state.cpp @@ -1433,7 +1433,6 @@ void GameManager::turnOff() { _state._powerOff = true; roomBrightness(); - _vm->paletteBrightness(); } void GameManager::turnOn() { @@ -1442,7 +1441,6 @@ void GameManager::turnOn() { _state._powerOff = false; _vm->_brightness = 255; -// _vm->paletteBrightness(); _rooms[SLEEP]->setSectionVisible(1, false); _rooms[SLEEP]->setSectionVisible(2, false); _rooms[COCKPIT]->setSectionVisible(22, false); @@ -1582,6 +1580,8 @@ void GameManager::roomBrightness() { if (_vm->_brightness != 0) _vm->_brightness = _roomBrightness; + + _vm->paletteBrightness(); } void GameManager::changeRoom(RoomID id) { @@ -1955,7 +1955,6 @@ bool GameManager::genericInteract(Action verb, Object &obj1, Object &obj2) { getInput(); _vm->renderRoom(*_currentRoom); roomBrightness(); - _vm->paletteBrightness(); _vm->renderMessage(kStringGenericInteract_12); } else if ((verb == ACTION_LOOK) && (obj1._id == KEYCARD2)) { _vm->renderMessage(obj1._description); @@ -2266,10 +2265,6 @@ void GameManager::executeRoom() { } roomBrightness(); - if (_vm->_brightness == 0) - _vm->paletteFadeIn(); - else - _vm->paletteBrightness(); if (!_currentRoom->hasSeen() && _newRoom) { _newRoom = false; -- cgit v1.2.3