diff options
author | Eugene Sandulenko | 2013-10-28 23:18:33 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2013-10-29 00:11:47 +0200 |
commit | 727c44a72ae0051af2780200acad1e18939e552d (patch) | |
tree | e69b2117527e77d2315a2f71091ff7d8c903c5a8 | |
parent | 3a444f3b63d43083dde26b5f63a481ec2da9df46 (diff) | |
download | scummvm-rg350-727c44a72ae0051af2780200acad1e18939e552d.tar.gz scummvm-rg350-727c44a72ae0051af2780200acad1e18939e552d.tar.bz2 scummvm-rg350-727c44a72ae0051af2780200acad1e18939e552d.zip |
FULLPIPE: Implement ModalIntro::update()
-rw-r--r-- | engines/fullpipe/constants.h | 1 | ||||
-rw-r--r-- | engines/fullpipe/modal.cpp | 28 | ||||
-rw-r--r-- | engines/fullpipe/modal.h | 6 |
3 files changed, 28 insertions, 7 deletions
diff --git a/engines/fullpipe/constants.h b/engines/fullpipe/constants.h index 6c1686db4c..2cf7425de4 100644 --- a/engines/fullpipe/constants.h +++ b/engines/fullpipe/constants.h @@ -157,6 +157,7 @@ namespace Fullpipe { #define SC_TITLES 5166 #define SND_CMN_031 3516 #define SND_CMN_070 5199 +#define SND_INTR_019 5220 #define ST_IN1MAN_SLEEP 5112 #define ST_LBN_0N 2832 #define ST_LBN_0P 2833 diff --git a/engines/fullpipe/modal.cpp b/engines/fullpipe/modal.cpp index bade31828d..95ad86f695 100644 --- a/engines/fullpipe/modal.cpp +++ b/engines/fullpipe/modal.cpp @@ -180,10 +180,30 @@ bool ModalIntro::init(int counterdiff) { return true; } -bool ModalIntro::update() { - warning("STUB: ModalIntro::update()"); - - return true; +void ModalIntro::update() { + if (g_fullpipe->_currentScene) { + if (_introFlags & 1) { + //sceneFade(virt, g_currentScene, 1); + _needRedraw = 255; + _introFlags &= 0xfe; + + if (_introFlags & 0x20) + g_fullpipe->playSound(SND_INTR_019, 0); + } else if (_introFlags & 2) { + if (g_vars->sceneIntro_needBlackout) { + //vrtRectangle(*(_DWORD *)virt, 0, 0, 0, 800, 600); + g_vars->sceneIntro_needBlackout = 0; + _needRedraw = 0; + _introFlags &= 0xfd; + } else { + //sceneFade(virt, g_currentScene, 0); + _needRedraw = 0; + _introFlags &= 0xfd; + } + } else if (_needRedraw) { + g_fullpipe->_currentScene->draw(); + } + } } void ModalIntro::idle() { diff --git a/engines/fullpipe/modal.h b/engines/fullpipe/modal.h index 7273b5fd8a..56657e616d 100644 --- a/engines/fullpipe/modal.h +++ b/engines/fullpipe/modal.h @@ -38,7 +38,7 @@ class BaseModalObject { virtual bool pollEvent() = 0; virtual bool handleMessage(ExCommand *message) = 0; virtual bool init(int counterdiff) = 0; - virtual bool update() = 0; + virtual void update() = 0; virtual void saveload() = 0; }; @@ -56,7 +56,7 @@ class ModalIntro : public BaseModalObject { virtual bool pollEvent() { return true; } virtual bool handleMessage(ExCommand *message); virtual bool init(int counterdiff); - virtual bool update(); + virtual void update(); virtual void saveload() {} void idle(); @@ -68,7 +68,7 @@ public: virtual bool pollEvent() { return true; } virtual bool handleMessage(ExCommand *message) { return true; } virtual bool init(int counterdiff) { return true; } - virtual bool update() { return true; } + virtual void update() {} virtual void saveload() {} void play(const char *fname); |