aboutsummaryrefslogtreecommitdiff
path: root/engines/supernova/rooms.cpp
diff options
context:
space:
mode:
authorJoseph-Eugene Winzer2017-08-04 11:43:42 +0200
committerThierry Crozat2018-01-23 01:01:19 +0000
commit8e9141d516b18c3a297c70198aff9008a734055d (patch)
tree42d2ddbf54f9dc321c815e005383a4d580ea5db0 /engines/supernova/rooms.cpp
parent48870921f09d126a3084f12e265719bdd97e9bb3 (diff)
downloadscummvm-rg350-8e9141d516b18c3a297c70198aff9008a734055d.tar.gz
scummvm-rg350-8e9141d516b18c3a297c70198aff9008a734055d.tar.bz2
scummvm-rg350-8e9141d516b18c3a297c70198aff9008a734055d.zip
SUPERNOVA: Fixes SleepCabin::animation()
Some of the code didn't belong into the function.
Diffstat (limited to 'engines/supernova/rooms.cpp')
-rw-r--r--engines/supernova/rooms.cpp47
1 files changed, 21 insertions, 26 deletions
diff --git a/engines/supernova/rooms.cpp b/engines/supernova/rooms.cpp
index 484a44fe5e..d608f6f471 100644
--- a/engines/supernova/rooms.cpp
+++ b/engines/supernova/rooms.cpp
@@ -265,37 +265,32 @@ bool ShipSleepCabin::interact(Action verb, Object &obj1, Object &obj2) {
void ShipSleepCabin::animation() {
static char color;
-
- if (!_gm->_guiEnabled) {
- if (color) {
- color = kColorBlack;
- _gm->setAnimationTimer(5);
- } else {
- color = kColorLightYellow;
- _gm->setAnimationTimer(10);
- }
- _vm->renderText("Achtung: Triebwerke funktionsunfähig",50,145,color);
- } else {
- if (isSectionVisible(21)) {
- _gm->drawImage(_gm->invertSection(21));
- _gm->setAnimationTimer(5);
- } else {
- _gm->drawImage(21);
- _gm->setAnimationTimer(10);
- }
- }
- if (_gm->_state.powerOff) {
- if (!_gm->_guiEnabled) {
- _vm->renderText("Energievorrat erschöpft",97,165,color);
- _vm->renderText("Notstromversorgung aktiv",97,175,color);
+ if (_gm->_state.powerOff && _gm->_state.time) {
+ if (_gm->_guiEnabled) {
+ if (isSectionVisible(1)) {
+ _gm->drawImage(2);
+ setSectionVisible(1, false);
+ } else {
+ _gm->drawImage(1);
+ setSectionVisible(2, false);
+ }
} else {
- if (isSectionVisible(21)) {
- _gm->drawImage(22);
+ if (color == kColorLightRed) {
+ color = kColorDarkBlue;
} else {
- _gm->drawImage(_gm->invertSection(22));
+ color = kColorLightRed;
}
+
+ _vm->renderText("Achtung", 60, 75, color);
}
+ } else if (isSectionVisible(5) && _gm->_guiEnabled) {
+ if (isSectionVisible(4))
+ _gm->drawImage(_gm->invertSection(4));
+ else
+ _gm->drawImage(4);
}
+
+ _gm->setAnimationTimer(6);
}
void ShipSleepCabin::onEntrance() {
if (_gm->_state.dream && (_gm->_rooms[CAVE]->getObject(1)->_exitRoom == MEETUP3)) {