diff options
Diffstat (limited to 'engines/avalanche/avalot.cpp')
-rw-r--r-- | engines/avalanche/avalot.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/engines/avalanche/avalot.cpp b/engines/avalanche/avalot.cpp index b1bbf4ff09..36ce16d09c 100644 --- a/engines/avalanche/avalot.cpp +++ b/engines/avalanche/avalot.cpp @@ -118,10 +118,13 @@ Room AvalancheEngine::_whereIs[29] = { Clock::Clock(AvalancheEngine *vm) { _vm = vm; + // Magic value to determine if we just created the instance _oldHour = _oldHourAngle = _oldMinute = 17717; + _hour = _minute = _second = 0; + _hourAngle = 0; } -void Clock::update() { // TODO: Move variables from Gyro to here (or at least somewhere nearby), rename them. +void Clock::update() { TimeDate t; _vm->_system->getTimeAndDate(t); _hour = t.tm_hour; @@ -177,7 +180,9 @@ void Clock::plotHands() { } void Clock::chime() { - if ((_oldHour == 17717) || (!_vm->_soundFx)) // Too high - must be first time around + // Too high - must be first time around + // Mute - skip the sound generation + if ((_oldHour == 17717) || (!_vm->_soundFx)) return; byte hour = _hour % 12; |