[Scummvm-cvs-logs] scummvm master -> 50bb717bccbf8b6f901f1531e93adf375ea53a5e

sev- sev at scummvm.org
Fri Jan 24 23:30:00 CET 2014


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

Summary:
94b2249f69 FULLPIPE: Started ModalCredits implementation
50bb717bcc FULLPIPE: Complete ModalCredits


Commit: 94b2249f6911a3ce283731857ec1eaf740bd5dc4
    https://github.com/scummvm/scummvm/commit/94b2249f6911a3ce283731857ec1eaf740bd5dc4
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2014-01-24T14:29:23-08:00

Commit Message:
FULLPIPE: Started ModalCredits implementation

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 e25a6f4..dfc2146 100644
--- a/engines/fullpipe/constants.h
+++ b/engines/fullpipe/constants.h
@@ -160,6 +160,7 @@ namespace Fullpipe {
 #define PIC_MAP_S36 5260
 #define PIC_MAP_S37 5261
 #define PIC_MAP_S38 5262
+#define PIC_TTL_CREDITS 5172
 #define QU_INTR_STARTINTRO 5133
 #define SC_1 301
 #define SC_2 302
@@ -210,6 +211,7 @@ namespace Fullpipe {
 #define SC_INV 858
 #define SC_LDR 635
 #define SC_MAP 5222
+#define SC_TITLES 5166
 #define SND_CMN_031 3516
 #define SND_CMN_060 4921
 #define SND_CMN_061 4922
diff --git a/engines/fullpipe/modal.cpp b/engines/fullpipe/modal.cpp
index 5ee6395..043f3b1 100644
--- a/engines/fullpipe/modal.cpp
+++ b/engines/fullpipe/modal.cpp
@@ -657,6 +657,36 @@ void ModalFinal::update() {
 	}
 }
 
+ModalCredits::ModalCredits() {
+	Common::Point point;
+
+	_sceneTitles = g_fp->accessScene(SC_TITLES);
+
+	_creditsPic = _sceneTitles->getPictureObjectById(PIC_TTL_CREDITS, 0);
+	_creditsPic->_flags |= 4;
+
+	_fadeIn = true;
+	_fadeOut = false;
+
+	_creditsPic->getDimensions(&point);
+
+	_countdown = point.y / 2 + 470;
+	_sfxVolume = g_fp->_sfxVolume;
+
+	_currY = 630;
+	_maxY = -1000 - point.y;
+
+	_currX = 400 - point.x / 2;
+
+	_creditsPic->setOXY(_currX, _currY);
+}
+
+ModalCredits::~ModalCredits() {
+	g_fp->_gameLoader->unloadScene(SC_TITLES);
+
+	g_fp->_sfxVolume = _sfxVolume;
+}
+
 void FullpipeEngine::openHelp() {
 	warning("STUB: FullpipeEngine::openHelp()");
 }
diff --git a/engines/fullpipe/modal.h b/engines/fullpipe/modal.h
index 925e4ed..e9a8478 100644
--- a/engines/fullpipe/modal.h
+++ b/engines/fullpipe/modal.h
@@ -125,9 +125,19 @@ class ModalFinal : public BaseModalObject {
 };
 
 class ModalCredits : public BaseModalObject {
+	Scene *_sceneTitles;
+	PictureObject *_creditsPic;
+	bool _fadeIn;
+	bool _fadeOut;
+	int _countdown;
+	int _sfxVolume;
+	int _currX;
+	int _currY;
+	int _maxY;
+
  public:
-	ModalCredits() {}
-	virtual ~ModalCredits() {}
+	ModalCredits();
+	virtual ~ModalCredits();
 
 	virtual bool pollEvent() { return true; }
 	virtual bool handleMessage(ExCommand *message) { return false; }


Commit: 50bb717bccbf8b6f901f1531e93adf375ea53a5e
    https://github.com/scummvm/scummvm/commit/50bb717bccbf8b6f901f1531e93adf375ea53a5e
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2014-01-24T14:29:23-08:00

Commit Message:
FULLPIPE: Complete ModalCredits

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



diff --git a/engines/fullpipe/modal.cpp b/engines/fullpipe/modal.cpp
index 043f3b1..2c22528 100644
--- a/engines/fullpipe/modal.cpp
+++ b/engines/fullpipe/modal.cpp
@@ -195,6 +195,8 @@ bool ModalIntro::init(int counterdiff) {
 }
 
 void ModalIntro::update() {
+	warning("STUB: ModalIntro::update()");
+
 	if (g_fp->_currentScene) {
 		if (_introFlags & 1) {
 			//sceneFade(virt, g_currentScene, 1);
@@ -687,6 +689,72 @@ ModalCredits::~ModalCredits() {
 	g_fp->_sfxVolume = _sfxVolume;
 }
 
+bool ModalCredits::handleMessage(ExCommand *cmd) {
+	if (cmd->_messageKind == 17 && cmd->_messageNum == 36 && cmd->_keyCode == 27) {
+		_fadeIn = false;
+
+		return true;
+	}
+
+	return false;
+}
+
+bool ModalCredits::init(int counterdiff) {
+	if (_fadeIn || _fadeOut) {
+		_countdown--;
+
+		if (_countdown < 0)
+			_fadeIn = false;
+
+		_creditsPic->setOXY(_currX, _currY);
+
+		if (_currY > _maxY)
+			_currY -= 2;
+	} else {
+		if (_parentObj)
+			return 0;
+
+		ModalMainMenu *menu = new ModalMainMenu;
+
+		g_fp->_modalObject = menu;
+
+		menu->_field_34 = 1;
+	}
+
+	return true;
+}
+
+void ModalCredits::update() {
+	warning("STUB: ModalCredits::update()");
+
+	if (_fadeOut) {
+		if (_fadeIn) {
+			_sceneTitles->draw();
+
+			return;
+		}
+	} else if (_fadeIn) {
+		//sceneFade(virt, this->_sceneTitles, 1); // TODO
+		_fadeOut = 1;
+
+		return;
+	}
+
+	if (_fadeOut) {
+		//sceneFade(virt, this->_sceneTitles, 0); // TODO
+		_fadeOut = 0;
+		return;
+	}
+
+	_sceneTitles->draw();
+}
+
+ModalMainMenu::ModalMainMenu() {
+	warning("STUB: ModalMainMenu::ModalMainMenu()");
+
+	_field_34 = 0;
+}
+
 void FullpipeEngine::openHelp() {
 	warning("STUB: FullpipeEngine::openHelp()");
 }
diff --git a/engines/fullpipe/modal.h b/engines/fullpipe/modal.h
index e9a8478..438e341 100644
--- a/engines/fullpipe/modal.h
+++ b/engines/fullpipe/modal.h
@@ -140,15 +140,18 @@ class ModalCredits : public BaseModalObject {
 	virtual ~ModalCredits();
 
 	virtual bool pollEvent() { return true; }
-	virtual bool handleMessage(ExCommand *message) { return false; }
-	virtual bool init(int counterdiff) { return true; }
-	virtual void update() {}
+	virtual bool handleMessage(ExCommand *message);
+	virtual bool init(int counterdiff);
+	virtual void update();
 	virtual void saveload() {}
 };
 
 class ModalMainMenu : public BaseModalObject {
- public:
-	ModalMainMenu() {}
+public:
+	int _field_34;
+
+public:
+	ModalMainMenu();
 	virtual ~ModalMainMenu() {}
 
 	virtual bool pollEvent() { return true; }






More information about the Scummvm-git-logs mailing list