diff options
author | Kamil Zbróg | 2013-10-28 17:07:28 +0000 |
---|---|---|
committer | Kamil Zbróg | 2013-10-28 17:07:28 +0000 |
commit | 6734377e1bbb00403e11ef2194e890d8529e791b (patch) | |
tree | d2889578042cd056b9780f2b0b8be84dd106cf43 /engines/avalanche/avalot.cpp | |
parent | 39265b7a4b3e39348165b126ae53c9d89ccf32a9 (diff) | |
parent | 5653a89e81d600b2388831cfe05c36d3068813b5 (diff) | |
download | scummvm-rg350-6734377e1bbb00403e11ef2194e890d8529e791b.tar.gz scummvm-rg350-6734377e1bbb00403e11ef2194e890d8529e791b.tar.bz2 scummvm-rg350-6734377e1bbb00403e11ef2194e890d8529e791b.zip |
Merge branch 'master' into prince
Diffstat (limited to 'engines/avalanche/avalot.cpp')
-rw-r--r-- | engines/avalanche/avalot.cpp | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/engines/avalanche/avalot.cpp b/engines/avalanche/avalot.cpp index 8ef41a2c93..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; @@ -1229,7 +1234,7 @@ void AvalancheEngine::checkClick() { _parser->_thing += 49; _parser->_person = kPeoplePardon; } else { - _parser->_person = (People) _thinks; + _parser->_person = (People)_thinks; _parser->_thing = _parser->kPardon; } callVerb(kVerbCodeExam); @@ -1448,8 +1453,8 @@ void AvalancheEngine::resetVariables() { _standingOnDais = false; _takenPen = false; _arrowInTheDoor = false; - _favouriteDrink = ""; - _favouriteSong = ""; + _favoriteDrink = ""; + _favoriteSong = ""; _worstPlaceOnEarth = ""; _spareEvening = ""; _totalTime = 0; @@ -1502,7 +1507,7 @@ void AvalancheEngine::newGame() { _dialogs->setBubbleStateNatural(); _spareEvening = "answer a questionnaire"; - _favouriteDrink = "beer"; + _favoriteDrink = "beer"; _money = 30; // 2/6 _animation->setDirection(kDirStopped); _parser->_wearing = kObjectClothes; @@ -1564,10 +1569,12 @@ Common::String AvalancheEngine::getName(People whose) { static const char lasses[4][15] = {"Arkata", "Geida", "\0xB1", "the Wise Woman"}; - if (whose < kPeopleArkata) + if (whose <= kPeopleJacques) return Common::String(lads[whose - kPeopleAvalot]); - else + else if ((whose >= kPeopleArkata) && (whose <= kPeopleWisewoman)) return Common::String(lasses[whose - kPeopleArkata]); + else + error("getName() - Unexpected character id %d", (byte) whose); } Common::String AvalancheEngine::getItem(byte which) { @@ -1674,6 +1681,9 @@ void AvalancheEngine::flipRoom(Room room, byte ped) { if (_room == kRoomLustiesRoom) _enterCatacombsFromLustiesRoom = true; + if (room > kRoomMap) + return; + enterRoom(room, ped); _animation->appearPed(0, ped - 1); _enterCatacombsFromLustiesRoom = false; |