[Scummvm-cvs-logs] scummvm master -> fbc4ec1d4cfa9cb6eb1380c62ab6ce1dbc3d2081

sev- sev at scummvm.org
Mon Oct 28 23:12:47 CET 2013


This automated email contains information about 5 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
78afb3f836 FULLPIPE: Implement ModalIntro::init()
da710ba3bb FULLPIPE: Implement ModalIntro::idle()
3a444f3b63 FULLPIPE: Enable intro
727c44a72a FULLPIPE: Implement ModalIntro::update()
fbc4ec1d4c FULLPIPE: Fix intro playback. Still hangs on part2


Commit: 78afb3f836ad2e9283b6435758f6f31f7e335c13
    https://github.com/scummvm/scummvm/commit/78afb3f836ad2e9283b6435758f6f31f7e335c13
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2013-10-28T15:11:47-07:00

Commit Message:
FULLPIPE: Implement ModalIntro::init()

Changed paths:
    engines/fullpipe/constants.h
    engines/fullpipe/modal.cpp
    engines/fullpipe/modal.h



diff --git a/engines/fullpipe/constants.h b/engines/fullpipe/constants.h
index fe72238..6c1686d 100644
--- a/engines/fullpipe/constants.h
+++ b/engines/fullpipe/constants.h
@@ -89,6 +89,7 @@ namespace Fullpipe {
 #define PIC_CSR_ITN_RED 5329
 #define PIC_CSR_LIFT 5176
 #define PIC_CSR_MAP 5339
+#define PIC_IN1_GAMETITLE 5169
 #define PIC_IN1_PIPETITLE 5167
 #define PIC_INV_MENU 991
 #define PIC_MAP_A13 5275
@@ -101,6 +102,7 @@ namespace Fullpipe {
 #define QU_IN2_DO 5144
 #define QU_INTR_FINISH 5138
 #define QU_INTR_GETUPMAN 5136
+#define QU_INTR_STARTINTRO 5133
 #define SC_1 301
 #define SC_10 653
 #define SC_11 654
diff --git a/engines/fullpipe/modal.cpp b/engines/fullpipe/modal.cpp
index 85999bc..14090ad 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() {
diff --git a/engines/fullpipe/modal.h b/engines/fullpipe/modal.h
index 3562622..7273b5f 100644
--- a/engines/fullpipe/modal.h
+++ b/engines/fullpipe/modal.h
@@ -34,9 +34,12 @@ class BaseModalObject {
  	BaseModalObject() : _parentObj(0) {}
 	virtual ~BaseModalObject() {}
 
+
+	virtual bool pollEvent() = 0;
 	virtual bool handleMessage(ExCommand *message) = 0;
 	virtual bool init(int counterdiff) = 0;
 	virtual bool update() = 0;
+
 	virtual void saveload() = 0;
 };
 
@@ -50,10 +53,25 @@ class ModalIntro : public BaseModalObject {
  public:
 	ModalIntro();
 
+	virtual bool pollEvent() { return true; }
 	virtual bool handleMessage(ExCommand *message);
 	virtual bool init(int counterdiff);
 	virtual bool update();
-	virtual void saveload();
+	virtual void saveload() {}
+
+	void idle();
+};
+
+class ModalVideoPlayer : public BaseModalObject {
+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 saveload() {}
+
+	void play(const char *fname);
 };
 
 } // End of namespace Fullpipe


Commit: da710ba3bbaccd5a4c023d40235a63208d0f7cdf
    https://github.com/scummvm/scummvm/commit/da710ba3bbaccd5a4c023d40235a63208d0f7cdf
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2013-10-28T15:11:47-07:00

Commit Message:
FULLPIPE: Implement ModalIntro::idle()

Changed paths:
    engines/fullpipe/modal.cpp



diff --git a/engines/fullpipe/modal.cpp b/engines/fullpipe/modal.cpp
index 14090ad..bade318 100644
--- a/engines/fullpipe/modal.cpp
+++ b/engines/fullpipe/modal.cpp
@@ -187,7 +187,12 @@ bool ModalIntro::update() {
 }
 
 void ModalIntro::idle() {
-	warning("STUB: ModalIntro::idle()");
+	g_fullpipe->_gameLoader->unloadScene(SC_INTRO2);
+	g_fullpipe->_currentScene = g_fullpipe->accessScene(SC_INTRO1);
+	g_fullpipe->_gameLoader->preloadScene(SC_INTRO1, TrubaDown);
+
+	if (g_fullpipe->_currentScene)
+		g_fullpipe->_gameLoader->updateSystems(42);
 }
 
 void ModalVideoPlayer::play(const char *fname) {


Commit: 3a444f3b63d43083dde26b5f63a481ec2da9df46
    https://github.com/scummvm/scummvm/commit/3a444f3b63d43083dde26b5f63a481ec2da9df46
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2013-10-28T15:11:47-07:00

Commit Message:
FULLPIPE: Enable intro

Changed paths:
    engines/fullpipe/fullpipe.cpp



diff --git a/engines/fullpipe/fullpipe.cpp b/engines/fullpipe/fullpipe.cpp
index a0db6aa..2f49a41 100644
--- a/engines/fullpipe/fullpipe.cpp
+++ b/engines/fullpipe/fullpipe.cpp
@@ -80,7 +80,7 @@ FullpipeEngine::FullpipeEngine(OSystem *syst, const ADGameDescription *gameDesc)
 
 	_gameContinue = true;
 	_needRestart = false;
-	_flgPlayIntro = false;
+	_flgPlayIntro = true;
 	_gamePaused = false;
 	_inputArFlag = false;
 	_recordEvents = false;


Commit: 727c44a72ae0051af2780200acad1e18939e552d
    https://github.com/scummvm/scummvm/commit/727c44a72ae0051af2780200acad1e18939e552d
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2013-10-28T15:11:47-07:00

Commit Message:
FULLPIPE: Implement ModalIntro::update()

Changed paths:
    engines/fullpipe/constants.h
    engines/fullpipe/modal.cpp
    engines/fullpipe/modal.h



diff --git a/engines/fullpipe/constants.h b/engines/fullpipe/constants.h
index 6c1686d..2cf7425 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 bade318..95ad86f 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 7273b5f..56657e6 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);


Commit: fbc4ec1d4cfa9cb6eb1380c62ab6ce1dbc3d2081
    https://github.com/scummvm/scummvm/commit/fbc4ec1d4cfa9cb6eb1380c62ab6ce1dbc3d2081
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2013-10-28T15:11:55-07:00

Commit Message:
FULLPIPE: Fix intro playback. Still hangs on part2

Changed paths:
    engines/fullpipe/modal.cpp
    engines/fullpipe/modal.h



diff --git a/engines/fullpipe/modal.cpp b/engines/fullpipe/modal.cpp
index 95ad86f..44e7b46 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 56657e6..f3f571e 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() {}
 






More information about the Scummvm-git-logs mailing list