diff options
author | Eugene Sandulenko | 2013-10-28 23:03:43 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2013-10-29 00:11:47 +0200 |
commit | 78afb3f836ad2e9283b6435758f6f31f7e335c13 (patch) | |
tree | e8054c03db953830e0fc7afdcf39313c964eb498 /engines/fullpipe/modal.cpp | |
parent | fc9f0712019dbad28748819956128b753359aaa0 (diff) | |
download | scummvm-rg350-78afb3f836ad2e9283b6435758f6f31f7e335c13.tar.gz scummvm-rg350-78afb3f836ad2e9283b6435758f6f31f7e335c13.tar.bz2 scummvm-rg350-78afb3f836ad2e9283b6435758f6f31f7e335c13.zip |
FULLPIPE: Implement ModalIntro::init()
Diffstat (limited to 'engines/fullpipe/modal.cpp')
-rw-r--r-- | engines/fullpipe/modal.cpp | 116 |
1 files changed, 113 insertions, 3 deletions
diff --git a/engines/fullpipe/modal.cpp b/engines/fullpipe/modal.cpp index 85999bcadb..14090ad813 100644 --- a/engines/fullpipe/modal.cpp +++ b/engines/fullpipe/modal.cpp @@ -25,6 +25,7 @@ #include "fullpipe/messages.h" #include "fullpipe/constants.h" #include "fullpipe/scenes.h" +#include "fullpipe/gameloader.h" namespace Fullpipe { @@ -69,7 +70,112 @@ bool ModalIntro::handleMessage(ExCommand *message) { } bool ModalIntro::init(int counterdiff) { - warning("STUB: ModalIntro::init(%d)", counterdiff); + if (!g_vars->sceneIntro_playing) { + if (!_needRedraw) { + idle(); + return 0; + } + + if (_introFlags & 0x10) + g_fullpipe->_gameLoader->updateSystems(42); + + _introFlags |= 2; + + return true; + } + + if (_introFlags & 4) { + ModalVideoPlayer *player = new ModalVideoPlayer(); + + g_fullpipe->_modalObject = player; + player->_parentObj = this; + player->play("intro.avi"); + + _countDown--; + + if (_countDown > 0 ) + return true; + + if (_needRedraw <= 0) { + _countDown = 0; + _needRedraw = 0; + _introFlags = (_introFlags & 0xfb) | 0x40; + + return true; + } + + _introFlags |= 2; + return true; + } + + if (_introFlags & 0x40) { + ModalVideoPlayer *player = new ModalVideoPlayer(); + + g_fullpipe->_modalObject = player; + player->_parentObj = this; + player->play("intro2.avi"); + + _countDown--; + if (_countDown > 0) + return true; + + if (_needRedraw <= 0) { + _countDown = 50; + _needRedraw = 0; + _introFlags = (_introFlags & 0xbf) | 9; + + return true; + } + _introFlags |= 2; + return true; + } + + if (_introFlags & 8) { + _countDown--; + + if (_countDown > 0 ) + return true; + + if (_needRedraw > 0) { + _introFlags |= 2; + return true; + } + + _countDown = 150; + _introFlags = (_introFlags & 0xf7) | 0x21; + g_fullpipe->accessScene(SC_INTRO1)->getPictureObjectById(PIC_IN1_PIPETITLE, 0)->_flags &= 0xfffb; + } + + if (!(_introFlags & 0x20)) { + if (_introFlags & 0x10) { + if (!_needRedraw) { + _introFlags |= 1; + + g_fullpipe->accessScene(SC_INTRO1)->getPictureObjectById(PIC_IN1_PIPETITLE, 0)->_flags &= 0xfffb; + g_fullpipe->accessScene(SC_INTRO1)->getPictureObjectById(PIC_IN1_GAMETITLE, 0)->_flags &= 0xfffb; + + chainQueue(QU_INTR_STARTINTRO, 1); + } + g_fullpipe->_gameLoader->updateSystems(42); + } + return true; + } + + _countDown--; + + if (_countDown <= 0) { + if (_needRedraw > 0) { + _introFlags |= 2; + + return true; + } + + _introFlags = (_introFlags & 0xdf) | 0x10; + + g_fullpipe->accessScene(SC_INTRO1)->getPictureObjectById(PIC_IN1_GAMETITLE, 0)->_flags &= 0xfffb; + + _needRedraw = 0; + } return true; } @@ -80,8 +186,12 @@ bool ModalIntro::update() { return true; } -void ModalIntro::saveload() { - // No saveload +void ModalIntro::idle() { + warning("STUB: ModalIntro::idle()"); +} + +void ModalVideoPlayer::play(const char *fname) { + warning("STUB: ModalVideoPlayer::play(%s)", fname); } void FullpipeEngine::openMap() { |