aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorEugene Sandulenko2013-10-28 23:37:27 +0200
committerEugene Sandulenko2013-10-29 00:11:55 +0200
commitfbc4ec1d4cfa9cb6eb1380c62ab6ce1dbc3d2081 (patch)
tree406b7a7ee6b62fdcd574f6f4e4558a47c1b627ae /engines
parent727c44a72ae0051af2780200acad1e18939e552d (diff)
downloadscummvm-rg350-fbc4ec1d4cfa9cb6eb1380c62ab6ce1dbc3d2081.tar.gz
scummvm-rg350-fbc4ec1d4cfa9cb6eb1380c62ab6ce1dbc3d2081.tar.bz2
scummvm-rg350-fbc4ec1d4cfa9cb6eb1380c62ab6ce1dbc3d2081.zip
FULLPIPE: Fix intro playback. Still hangs on part2
Diffstat (limited to 'engines')
-rw-r--r--engines/fullpipe/modal.cpp39
-rw-r--r--engines/fullpipe/modal.h6
2 files changed, 24 insertions, 21 deletions
diff --git a/engines/fullpipe/modal.cpp b/engines/fullpipe/modal.cpp
index 95ad86f695..44e7b46184 100644
--- a/engines/fullpipe/modal.cpp
+++ b/engines/fullpipe/modal.cpp
@@ -32,7 +32,8 @@ namespace Fullpipe {
ModalIntro::ModalIntro() {
_field_8 = 0;
_countDown = 0;
- _needRedraw = 0;
+ _stillRunning = 0;
+
if (g_vars->sceneIntro_skipIntro) {
_introFlags = 4;
} else {
@@ -42,6 +43,7 @@ ModalIntro::ModalIntro() {
PictureObject *pict = g_fullpipe->accessScene(SC_INTRO1)->getPictureObjectById(PIC_IN1_PIPETITLE, 0);
pict->setFlags(pict->_flags & 0xFFFB);
}
+
g_vars->sceneIntro_skipIntro = false;
_sfxVolume = g_fullpipe->_sfxVolume;
}
@@ -56,7 +58,7 @@ bool ModalIntro::handleMessage(ExCommand *message) {
if (message->_keyCode != 13 && message->_keyCode != 27 && message->_keyCode != 32)
return false;
- if (_needRedraw) {
+ if (_stillRunning) {
if (!(_introFlags & 0x10)) {
_countDown = 0;
g_vars->sceneIntro_needBlackout = true;
@@ -71,9 +73,9 @@ bool ModalIntro::handleMessage(ExCommand *message) {
bool ModalIntro::init(int counterdiff) {
if (!g_vars->sceneIntro_playing) {
- if (!_needRedraw) {
- idle();
- return 0;
+ if (!_stillRunning) {
+ finish();
+ return false;
}
if (_introFlags & 0x10)
@@ -96,9 +98,9 @@ bool ModalIntro::init(int counterdiff) {
if (_countDown > 0 )
return true;
- if (_needRedraw <= 0) {
+ if (_stillRunning <= 0) {
_countDown = 0;
- _needRedraw = 0;
+ _stillRunning = 0;
_introFlags = (_introFlags & 0xfb) | 0x40;
return true;
@@ -119,13 +121,14 @@ bool ModalIntro::init(int counterdiff) {
if (_countDown > 0)
return true;
- if (_needRedraw <= 0) {
+ if (_stillRunning <= 0) {
_countDown = 50;
- _needRedraw = 0;
+ _stillRunning = 0;
_introFlags = (_introFlags & 0xbf) | 9;
return true;
}
+
_introFlags |= 2;
return true;
}
@@ -136,7 +139,7 @@ bool ModalIntro::init(int counterdiff) {
if (_countDown > 0 )
return true;
- if (_needRedraw > 0) {
+ if (_stillRunning > 0) {
_introFlags |= 2;
return true;
}
@@ -148,7 +151,7 @@ bool ModalIntro::init(int counterdiff) {
if (!(_introFlags & 0x20)) {
if (_introFlags & 0x10) {
- if (!_needRedraw) {
+ if (!_stillRunning) {
_introFlags |= 1;
g_fullpipe->accessScene(SC_INTRO1)->getPictureObjectById(PIC_IN1_PIPETITLE, 0)->_flags &= 0xfffb;
@@ -164,7 +167,7 @@ bool ModalIntro::init(int counterdiff) {
_countDown--;
if (_countDown <= 0) {
- if (_needRedraw > 0) {
+ if (_stillRunning > 0) {
_introFlags |= 2;
return true;
@@ -174,7 +177,7 @@ bool ModalIntro::init(int counterdiff) {
g_fullpipe->accessScene(SC_INTRO1)->getPictureObjectById(PIC_IN1_GAMETITLE, 0)->_flags &= 0xfffb;
- _needRedraw = 0;
+ _stillRunning = 0;
}
return true;
@@ -184,7 +187,7 @@ void ModalIntro::update() {
if (g_fullpipe->_currentScene) {
if (_introFlags & 1) {
//sceneFade(virt, g_currentScene, 1);
- _needRedraw = 255;
+ _stillRunning = 255;
_introFlags &= 0xfe;
if (_introFlags & 0x20)
@@ -193,20 +196,20 @@ void ModalIntro::update() {
if (g_vars->sceneIntro_needBlackout) {
//vrtRectangle(*(_DWORD *)virt, 0, 0, 0, 800, 600);
g_vars->sceneIntro_needBlackout = 0;
- _needRedraw = 0;
+ _stillRunning = 0;
_introFlags &= 0xfd;
} else {
//sceneFade(virt, g_currentScene, 0);
- _needRedraw = 0;
+ _stillRunning = 0;
_introFlags &= 0xfd;
}
- } else if (_needRedraw) {
+ } else if (_stillRunning) {
g_fullpipe->_currentScene->draw();
}
}
}
-void ModalIntro::idle() {
+void ModalIntro::finish() {
g_fullpipe->_gameLoader->unloadScene(SC_INTRO2);
g_fullpipe->_currentScene = g_fullpipe->accessScene(SC_INTRO1);
g_fullpipe->_gameLoader->preloadScene(SC_INTRO1, TrubaDown);
diff --git a/engines/fullpipe/modal.h b/engines/fullpipe/modal.h
index 56657e616d..f3f571e2a9 100644
--- a/engines/fullpipe/modal.h
+++ b/engines/fullpipe/modal.h
@@ -47,7 +47,7 @@ class ModalIntro : public BaseModalObject {
int _field_8;
int _introFlags;
int _countDown;
- int _needRedraw;
+ int _stillRunning;
int _sfxVolume;
public:
@@ -59,7 +59,7 @@ class ModalIntro : public BaseModalObject {
virtual void update();
virtual void saveload() {}
- void idle();
+ void finish();
};
class ModalVideoPlayer : public BaseModalObject {
@@ -67,7 +67,7 @@ public:
virtual bool pollEvent() { return true; }
virtual bool handleMessage(ExCommand *message) { return true; }
- virtual bool init(int counterdiff) { return true; }
+ virtual bool init(int counterdiff) { return false; }
virtual void update() {}
virtual void saveload() {}