[Scummvm-git-logs] scummvm master -> 5f26c445c9661fa723ddbec23892d07beea0c89c

sev- sev at scummvm.org
Sat Dec 10 17:16:07 CET 2016


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

Summary:
5f26c445c9 FULLPIPE: Implemented support for German demo


Commit: 5f26c445c9661fa723ddbec23892d07beea0c89c
    https://github.com/scummvm/scummvm/commit/5f26c445c9661fa723ddbec23892d07beea0c89c
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-12-10T17:15:49+01:00

Commit Message:
FULLPIPE: Implemented support for German demo

Changed paths:
    engines/fullpipe/constants.h
    engines/fullpipe/detection.cpp
    engines/fullpipe/fullpipe.h
    engines/fullpipe/modal.cpp
    engines/fullpipe/modal.h
    engines/fullpipe/scenes/scene08.cpp


diff --git a/engines/fullpipe/constants.h b/engines/fullpipe/constants.h
index 236b4be..da80ef3 100644
--- a/engines/fullpipe/constants.h
+++ b/engines/fullpipe/constants.h
@@ -368,6 +368,12 @@ namespace Fullpipe {
 #define PIC_MSV_SPACE_D 5190
 #define PIC_MSV_SPACE_L 5191
 
+// Demo screen
+#define PIC_POST_BGR 5396
+#define PIC_POST_TEXT 5397
+#define PIC_POST_BUTTON 5398
+#define SND_CMN_069 4969
+
 // Intro
 #define ANI_IN1MAN 5110
 #define MSG_INTR_ENDINTRO 5139
diff --git a/engines/fullpipe/detection.cpp b/engines/fullpipe/detection.cpp
index e42de65..ceda26a 100644
--- a/engines/fullpipe/detection.cpp
+++ b/engines/fullpipe/detection.cpp
@@ -31,8 +31,12 @@
 
 namespace Fullpipe {
 
-const char *FullpipeEngine::getGameId() const {
-	return _gameDescription->gameId;
+uint32 FullpipeEngine::getFeatures() const {
+	return _gameDescription->flags;
+}
+
+Common::Language FullpipeEngine::getLanguage() const {
+	return _gameDescription->language;
 }
 
 }
diff --git a/engines/fullpipe/fullpipe.h b/engines/fullpipe/fullpipe.h
index 0b7bf78..f7ad9f7 100644
--- a/engines/fullpipe/fullpipe.h
+++ b/engines/fullpipe/fullpipe.h
@@ -112,8 +112,8 @@ public:
 
 	// Detection related functions
 	const ADGameDescription *_gameDescription;
-	const char *getGameId() const;
-	Common::Platform getPlatform() const;
+	uint32 getFeatures() const;
+	Common::Language getLanguage() const;
 
 	Common::RandomSource *_rnd;
 
diff --git a/engines/fullpipe/modal.cpp b/engines/fullpipe/modal.cpp
index 6bfd9ef..6202ad8 100644
--- a/engines/fullpipe/modal.cpp
+++ b/engines/fullpipe/modal.cpp
@@ -2132,6 +2132,101 @@ void ModalSaveGame::saveload() {
 	}
 }
 
+ModalDemo::ModalDemo() {
+	_bg = 0;
+	_button = 0;
+	_text = 0;
+	_clickedQuit = -1;
+	_countdown = 1000;
+}
+
+ModalDemo::~ModalDemo() {
+	_bg->_flags &= 0xFFFB;
+	_button->_flags &= 0xFFFB;
+	_text->_flags &= 0xFFFB;
+}
+
+bool ModalDemo::launch() {
+	Scene *sc = g_fp->accessScene(SC_MAINMENU);
+
+	_bg = sc->getPictureObjectById(PIC_POST_BGR, 0);
+
+	if (!_bg)
+		return false;
+
+	_button = sc->getPictureObjectById(PIC_POST_BUTTON, 0);
+	_text = sc->getPictureObjectById(PIC_POST_TEXT, 0);
+
+	_clickedQuit = -1;
+
+	// fadeout
+	warning("STUB: ModelDemo: fadeout");
+	update();
+
+	g_fp->stopAllSoundStreams();
+	g_fp->stopAllSounds();
+	g_fp->playSound(SND_CMN_056, 0);
+	g_fp->playSound(SND_CMN_069, 1);
+
+	return true;
+}
+
+bool ModalDemo::init(int counterDiff) {
+	g_fp->_cursorId = PIC_CSR_DEFAULT;
+
+	if (_button->isPointInside(g_fp->_mouseScreenPos.x, g_fp->_mouseScreenPos.y)) {
+		if (!(_button->_flags & 4))
+			g_fp->playSound(SND_CMN_070, 0);
+
+		_button->_flags |= 4;
+
+		g_fp->_cursorId = PIC_CSR_ITN;
+	} else {
+		_button->_flags &= 0xFFFB;
+	}
+
+	g_fp->setCursor(g_fp->_cursorId);
+
+	_countdown -= counterDiff;
+
+	if (_countdown <= 0)
+		_countdown = 1000;
+
+	if (_clickedQuit == -1)
+		return true;
+
+	// open URL
+	// http://www.amazon.de/EuroVideo-Bildprogramm-GmbH-Full-Pipe/dp/B003TO51YE/ref=sr_1_1?ie=UTF8&s=videogames&qid=1279207213&sr=8-1
+
+	g_fp->_gameContinue = false;
+
+	return false;
+}
+
+void ModalDemo::update() {
+	_bg->draw();
+
+	if (_button->_flags & 4)
+		_button->draw();
+
+	if (_text->_flags & 4)
+		_text->draw();
+}
+
+bool ModalDemo::handleMessage(ExCommand *cmd) {
+	if (cmd->_messageKind != 17)
+		return false;
+
+	if (cmd->_messageNum == 29) {
+		if (_button->isPointInside(g_fp->_mouseScreenPos.x, g_fp->_mouseScreenPos.y))
+			_clickedQuit = 1;
+	} else if (cmd->_messageNum == 36 && cmd->_param == 27) {
+		_clickedQuit = 1;
+	}
+
+	return false;
+}
+
 void FullpipeEngine::openHelp() {
 	if (!_modalObject) {
 		ModalHelp *help = new ModalHelp;
diff --git a/engines/fullpipe/modal.h b/engines/fullpipe/modal.h
index 2e7c4f9..dd5faa8 100644
--- a/engines/fullpipe/modal.h
+++ b/engines/fullpipe/modal.h
@@ -300,6 +300,26 @@ public:
 	int _queryRes;
 };
 
+class ModalDemo : public BaseModalObject {
+	PictureObject *_bg;
+	PictureObject *_button;
+	PictureObject *_text;
+	int _clickedQuit;
+	int _countdown;
+
+ public:
+	ModalDemo();
+	virtual ~ModalDemo();
+
+	bool launch();
+
+	virtual bool pollEvent() { return true; }
+	virtual bool handleMessage(ExCommand *message);
+	virtual bool init(int counterdiff);
+	virtual void update();
+	virtual void saveload() {}
+};
+
 
 } // End of namespace Fullpipe
 
diff --git a/engines/fullpipe/scenes/scene08.cpp b/engines/fullpipe/scenes/scene08.cpp
index e64ef28..0c8b68b 100644
--- a/engines/fullpipe/scenes/scene08.cpp
+++ b/engines/fullpipe/scenes/scene08.cpp
@@ -20,6 +20,8 @@
  *
  */
 
+#include "engines/advancedDetector.h"
+
 #include "fullpipe/fullpipe.h"
 
 #include "fullpipe/objects.h"
@@ -33,6 +35,7 @@
 #include "fullpipe/gameloader.h"
 #include "fullpipe/behavior.h"
 #include "fullpipe/interaction.h"
+#include "fullpipe/modal.h"
 
 namespace Fullpipe {
 
@@ -409,6 +412,15 @@ void sceneHandler08_checkEndArcade() {
 		if (y < 80) {
 			sceneHandler08_finishArcade();
 
+			if (g_fp->getFeatures() & ADGF_DEMO && g_fp->getLanguage() == Common::DE_DEU) {
+				ModalDemo *demo = new ModalDemo;
+				demo->launch();
+
+				g_fp->_modalObject = demo;
+
+				return;
+			}
+
 			ExCommand *ex = new ExCommand(SC_8, 17, 0, 0, 0, 0, 1, 0, 0, 0);
 			ex->_messageNum = 61;
 			ex->_excFlags |= 2;





More information about the Scummvm-git-logs mailing list