aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xengines/pegasus/energymonitor.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/engines/pegasus/energymonitor.cpp b/engines/pegasus/energymonitor.cpp
index 9a82e36d84..94ac093c99 100755
--- a/engines/pegasus/energymonitor.cpp
+++ b/engines/pegasus/energymonitor.cpp
@@ -248,7 +248,7 @@ void EnergyMonitor::calibrateEnergyBar() {
_calibrating = true;
- // TODO: set death reason to -1
+ vm->setEnergyDeathReason(-1);
uint32 numFrames = _energyLight.getNumFrames();
for (uint32 i = 1; i < numFrames; i++) {
@@ -261,18 +261,25 @@ void EnergyMonitor::calibrateEnergyBar() {
_energyLight.setCurrentFrameIndex(0);
_energyLight.hide();
+
+#if 0
+ // FIXME: This doesn't work yet
show();
setEnergyValue(0);
setEnergyDrainRate(-kMaxJMPEnergy / 2);
// Make sure warning light is hidden...
_energyLight.hide();
- while (getCurrentEnergy() != (int32)kMaxJMPEnergy)
+ while (getCurrentEnergy() != (int32)kMaxJMPEnergy) {
+ vm->checkCallBacks();
vm->refreshDisplay();
+ g_system->delayMillis(10);
+ }
vm->refreshDisplay();
setEnergyDrainRate(0);
hide();
+#endif
_calibrating = false;
}