diff options
author | Paul Gilbert | 2010-07-03 12:49:42 +0000 |
---|---|---|
committer | Paul Gilbert | 2010-07-03 12:49:42 +0000 |
commit | 88d1155c5e0b265c39466536f572a8aebfef8259 (patch) | |
tree | 46bd4169eaa697a2fa92f321b72e8f01505b8dde /engines/m4/mads_scene.cpp | |
parent | 6b152e803967770d3419642b07fbf3a27333e865 (diff) | |
download | scummvm-rg350-88d1155c5e0b265c39466536f572a8aebfef8259.tar.gz scummvm-rg350-88d1155c5e0b265c39466536f572a8aebfef8259.tar.bz2 scummvm-rg350-88d1155c5e0b265c39466536f572a8aebfef8259.zip |
Implemented necessary logic for the abort timer/action code, which allows the player manager to be correctly activated when the 'getting up' animation finishes
svn-id: r50622
Diffstat (limited to 'engines/m4/mads_scene.cpp')
-rw-r--r-- | engines/m4/mads_scene.cpp | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/engines/m4/mads_scene.cpp b/engines/m4/mads_scene.cpp index c34216aa34..d22ca02475 100644 --- a/engines/m4/mads_scene.cpp +++ b/engines/m4/mads_scene.cpp @@ -144,6 +144,21 @@ void MadsScene::loadScene(int sceneNumber) { _madsVm->_player.loadSprites(NULL); + switch (_madsVm->globals()->_config.screenFades) { + case 0: + _abortTimers2 = 2; + break; + case 2: + _abortTimers2 = 21; + break; + default: + _abortTimers2 = 20; + break; + } + _abortTimers = 0; + _abortTimersMode2 = ABORTMODE_1; + + // Do any scene specific setup if (_vm->getGameType() == GType_RexNebular) _sceneLogic.enterScene(); @@ -318,8 +333,12 @@ void MadsScene::update() { void MadsScene::updateState() { _madsVm->_player.update(); + // Step through the scene _sceneLogic.sceneStep(); + if (_abortTimersMode == ABORTMODE_1) + _abortTimers = 0; + if ((_activeAnimation) && !_abortTimers) { _activeAnimation->update(); if (((MadsAnimation *) _activeAnimation)->freeFlag()) { @@ -468,12 +487,12 @@ void MadsScene::showMADSV2TextBox(char *text, int x, int y, char *faceName) { boxSprites->getFrame(bottomRight)->copyTo(_backgroundSurface, curX, curY + 1); } -void MadsScene::loadAnimation(const Common::String &animName, int v0) { +void MadsScene::loadAnimation(const Common::String &animName, int abortTimers) { if (_activeAnimation) error("Multiple active animations are not allowed"); MadsAnimation *anim = new MadsAnimation(_vm, this); - anim->load(animName.c_str(), 0); + anim->load(animName.c_str(), abortTimers); _activeAnimation = anim; } |