diff options
author | Paul Gilbert | 2010-07-01 12:01:17 +0000 |
---|---|---|
committer | Paul Gilbert | 2010-07-01 12:01:17 +0000 |
commit | 6c6d8b3fb39afe4a5866348ca2d34a7b13b566bb (patch) | |
tree | 2534a8ec7d4cd1cc155f99f0ad6f9d34fc9936be /engines/m4/mads_logic.cpp | |
parent | b45d2cd92b137dc429f12f67b887a193f601afb2 (diff) | |
download | scummvm-rg350-6c6d8b3fb39afe4a5866348ca2d34a7b13b566bb.tar.gz scummvm-rg350-6c6d8b3fb39afe4a5866348ca2d34a7b13b566bb.tar.bz2 scummvm-rg350-6c6d8b3fb39afe4a5866348ca2d34a7b13b566bb.zip |
Introduced a hash for storing all the miscellaneous data values, and used it to more properly implement display of all the wakeup text in the first room
svn-id: r50544
Diffstat (limited to 'engines/m4/mads_logic.cpp')
-rw-r--r-- | engines/m4/mads_logic.cpp | 54 |
1 files changed, 46 insertions, 8 deletions
diff --git a/engines/m4/mads_logic.cpp b/engines/m4/mads_logic.cpp index 9cb053a876..72c5fde40b 100644 --- a/engines/m4/mads_logic.cpp +++ b/engines/m4/mads_logic.cpp @@ -69,6 +69,10 @@ void MadsSceneLogic::getAnimName() { strcpy(_madsVm->scene()->_aaName, newName); } +IntStorage &MadsSceneLogic::dataMap() { + return _madsVm->globals()->_dataMap; +} + /*--------------------------------------------------------------------------*/ uint16 MadsSceneLogic::loadSpriteSet(uint16 suffixNum, uint16 sepChar) { @@ -239,9 +243,13 @@ void MadsSceneLogic::enterScene() { _madsVm->scene()->getSceneResources().playerPos = Common::Point(68, 140); _madsVm->scene()->getSceneResources().playerDir = 4; - // TODO: Flags setting + + dataMap()[0x56FC] = 0; + dataMap()[0x5482] = 0; + dataMap()[0x5484] = 30; } + _madsVm->globals()->_dataMap[0x5486] = 0; lowRoomsEntrySound(); } @@ -250,14 +258,44 @@ void MadsSceneLogic::doAction() { } void MadsSceneLogic::sceneStep() { - // FIXME: Temporary code to display a message on-screen - static bool tempBool = false; - if (!tempBool) { - tempBool = true; + // Wake up message sequence + Animation *anim = _madsVm->scene()->activeAnimation(); + if (anim) { + if ((anim->getCurrentFrame() == 6) && (dataMap()[0x5482] == 0)) { + dataMap()[0x5482]++; + _madsVm->scene()->_kernelMessages.add(Common::Point(63, dataMap()[0x5484]), + 0x1110, 0, 0, 240, _madsVm->globals()->getQuote(49)); + dataMap()[0x5484] += 14; + } - _madsVm->scene()->_kernelMessages.add(Common::Point(63, 100), 0x1110, 0, 0, 240, - _madsVm->globals()->getQuote(49)); - } + if ((anim->getCurrentFrame() == 7) && (dataMap()[0x5482] == 1)) { + dataMap()[0x5482]++; + _madsVm->scene()->_kernelMessages.add(Common::Point(63, dataMap()[0x5484]), + 0x1110, 0, 0, 240, _madsVm->globals()->getQuote(54)); + dataMap()[0x5484] += 14; + } + + if ((anim->getCurrentFrame() == 10) && (dataMap()[0x5482] == 2)) { + dataMap()[0x5482]++; + _madsVm->scene()->_kernelMessages.add(Common::Point(63, dataMap()[0x5484]), + 0x1110, 0, 0, 240, _madsVm->globals()->getQuote(55)); + dataMap()[0x5484] += 14; + } + + if ((anim->getCurrentFrame() == 17) && (dataMap()[0x5482] == 3)) { + dataMap()[0x5482]++; + _madsVm->scene()->_kernelMessages.add(Common::Point(63, dataMap()[0x5484]), + 0x1110, 0, 0, 240, _madsVm->globals()->getQuote(56)); + dataMap()[0x5484] += 14; + } + + if ((anim->getCurrentFrame() == 20) && (dataMap()[0x5482] == 4)) { + dataMap()[0x5482]++; + _madsVm->scene()->_kernelMessages.add(Common::Point(63, dataMap()[0x5484]), + 0x1110, 0, 0, 240, _madsVm->globals()->getQuote(50)); + dataMap()[0x5484] += 14; + } + } } } |