aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sky/control.cpp19
-rw-r--r--sky/sky.cpp2
2 files changed, 14 insertions, 7 deletions
diff --git a/sky/control.cpp b/sky/control.cpp
index 7a2e5cc9be..4f2a1249ad 100644
--- a/sky/control.cpp
+++ b/sky/control.cpp
@@ -427,10 +427,13 @@ uint16 SkyControl::handleClick(SkyConResource *pButton) {
bool SkyControl::getYesNo(void) {
- _yesNo->drawToScreen(WITH_MASK);
- bool retVal; bool quitPanel = false;
+ bool retVal = false;
+ bool quitPanel = false;
uint8 mouseType = MOUSE_NORMAL;
uint8 wantMouse = MOUSE_NORMAL;
+
+ _yesNo->drawToScreen(WITH_MASK);
+
while (!quitPanel) {
if (mouseType != wantMouse) {
mouseType = wantMouse;
@@ -442,15 +445,19 @@ bool SkyControl::getYesNo(void) {
if ((_mouseX >= 77) && (_mouseX <= 114)) { // over 'yes'
wantMouse = MOUSE_CROSS;
if (_mouseClicked) {
- quitPanel = true; retVal = true;
+ quitPanel = true;
+ retVal = true;
}
} else if ((_mouseX >= 156) && (_mouseX <= 193)) { // over 'no'
wantMouse = MOUSE_CROSS;
if (_mouseClicked) {
- quitPanel = true; retVal = false;
+ quitPanel = true;
+ retVal = false;
}
- } else wantMouse = MOUSE_NORMAL;
- } else wantMouse = MOUSE_NORMAL;
+ } else
+ wantMouse = MOUSE_NORMAL;
+ } else
+ wantMouse = MOUSE_NORMAL;
}
return retVal;
}
diff --git a/sky/sky.cpp b/sky/sky.cpp
index e4fd8a88cb..1f32882c08 100644
--- a/sky/sky.cpp
+++ b/sky/sky.cpp
@@ -54,7 +54,7 @@ Engine *Engine_SKY_create(GameDetector *detector, OSystem *syst) {
void **SkyState::_itemList[300];
-SystemVars SkyState::_systemVars = {0, 0, 0, 0, 4316};
+SystemVars SkyState::_systemVars = {0, 0, 0, 0, 4316, 0};
SkyState::SkyState(GameDetector *detector, OSystem *syst)
: Engine(detector, syst) {