[Scummvm-git-logs] scummvm master -> b03b7902ebf265d18410266da3426fe42c67c065

sev- sev at scummvm.org
Sat Dec 10 00:16:08 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:
b03b7902eb FULLPIPE: Implement wide scene autoscrolling


Commit: b03b7902ebf265d18410266da3426fe42c67c065
    https://github.com/scummvm/scummvm/commit/b03b7902ebf265d18410266da3426fe42c67c065
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-12-10T00:05:19+01:00

Commit Message:
FULLPIPE: Implement wide scene autoscrolling

Changed paths:
    engines/fullpipe/fullpipe.h
    engines/fullpipe/scenes.cpp
    engines/fullpipe/scenes/scene04.cpp
    engines/fullpipe/scenes/scene06.cpp
    engines/fullpipe/scenes/scene09.cpp
    engines/fullpipe/scenes/scene11.cpp
    engines/fullpipe/scenes/scene13.cpp
    engines/fullpipe/scenes/scene14.cpp
    engines/fullpipe/scenes/scene18and19.cpp
    engines/fullpipe/scenes/scene21.cpp
    engines/fullpipe/scenes/scene22.cpp
    engines/fullpipe/scenes/scene28.cpp
    engines/fullpipe/scenes/scene32.cpp
    engines/fullpipe/scenes/scene33.cpp
    engines/fullpipe/scenes/scene34.cpp
    engines/fullpipe/scenes/scene35.cpp
    engines/fullpipe/scenes/scene37.cpp


diff --git a/engines/fullpipe/fullpipe.h b/engines/fullpipe/fullpipe.h
index 41769ba..0b7bf78 100644
--- a/engines/fullpipe/fullpipe.h
+++ b/engines/fullpipe/fullpipe.h
@@ -277,6 +277,7 @@ public:
 	void setObjectState(const char *name, int state);
 	int getObjectEnumState(const char *name, const char *state);
 
+	void sceneAutoScrolling();
 	bool sceneSwitcher(EntranceInfo *entrance);
 	Scene *accessScene(int sceneId);
 	void setSceneMusicParameters(GameVar *var);
diff --git a/engines/fullpipe/scenes.cpp b/engines/fullpipe/scenes.cpp
index 4b50763..15f6b0b 100644
--- a/engines/fullpipe/scenes.cpp
+++ b/engines/fullpipe/scenes.cpp
@@ -519,6 +519,17 @@ int FullpipeEngine::getSceneFromTag(int tag) {
 	return 1;
 }
 
+void FullpipeEngine::sceneAutoScrolling() {
+	if (_aniMan2 == _aniMan && _currentScene && !_currentScene->_messageQueueId) {
+		if (800 - _mouseScreenPos.x >= 47 || _sceneRect.right >= _sceneWidth - 1 || _aniMan->_ox <= _sceneRect.left + 230) {
+			if (_mouseScreenPos.x < 47 && _sceneRect.left > 0 && _aniMan->_ox < _sceneRect.right - 230)
+				_currentScene->_x = -10;
+		} else {
+			_currentScene->_x = 10;
+		}
+	}
+}
+
 bool FullpipeEngine::sceneSwitcher(EntranceInfo *entrance) {
 	GameVar *sceneVar;
 	Common::Point sceneDim;
diff --git a/engines/fullpipe/scenes/scene04.cpp b/engines/fullpipe/scenes/scene04.cpp
index d349783..0e50400 100644
--- a/engines/fullpipe/scenes/scene04.cpp
+++ b/engines/fullpipe/scenes/scene04.cpp
@@ -1447,7 +1447,11 @@ int sceneHandler04(ExCommand *ex) {
 				}
 
 				res = 1;
+			}
+
+			g_fp->sceneAutoScrolling();
 
+			if (g_fp->_aniMan2) {
 				if (g_vars->scene04_soundPlaying) {
 					if (g_fp->_aniMan->_movement) {
 						if (g_fp->_aniMan->_movement->_id == MV_MAN_TOLADDER) {
diff --git a/engines/fullpipe/scenes/scene06.cpp b/engines/fullpipe/scenes/scene06.cpp
index 5fab4b5..6d8c152 100644
--- a/engines/fullpipe/scenes/scene06.cpp
+++ b/engines/fullpipe/scenes/scene06.cpp
@@ -707,6 +707,8 @@ int sceneHandler06(ExCommand *ex) {
 				}
 
 				res = 1;
+
+				g_fp->sceneAutoScrolling();
 			}
 			if (g_vars->scene06_arcadeEnabled) {
 				if (g_vars->scene06_mumsyPos > -3)
diff --git a/engines/fullpipe/scenes/scene09.cpp b/engines/fullpipe/scenes/scene09.cpp
index 3a8b937..42d0291 100644
--- a/engines/fullpipe/scenes/scene09.cpp
+++ b/engines/fullpipe/scenes/scene09.cpp
@@ -475,6 +475,8 @@ int sceneHandler09(ExCommand *cmd) {
 					g_fp->_currentScene->_x = x - g_fp->_sceneRect.right + 300;
 
 				res = 1;
+
+				g_fp->sceneAutoScrolling();
 			} else {
 				if (g_fp->_aniMan->_movement && g_fp->_aniMan->_movement->_id != MV_MAN9_SHOOT)
 					g_fp->_aniMan2 = g_fp->_aniMan;
diff --git a/engines/fullpipe/scenes/scene11.cpp b/engines/fullpipe/scenes/scene11.cpp
index 8c3de9e..72af59a 100644
--- a/engines/fullpipe/scenes/scene11.cpp
+++ b/engines/fullpipe/scenes/scene11.cpp
@@ -671,6 +671,8 @@ int sceneHandler11(ExCommand *cmd) {
 
 					if (x >= 940)
 						g_vars->scene11_scrollIsMaximized = true;
+
+					g_fp->sceneAutoScrolling();
 				}
 				res = 1;
 			}
diff --git a/engines/fullpipe/scenes/scene13.cpp b/engines/fullpipe/scenes/scene13.cpp
index 12fe1dd..39b31b3 100644
--- a/engines/fullpipe/scenes/scene13.cpp
+++ b/engines/fullpipe/scenes/scene13.cpp
@@ -348,6 +348,8 @@ int sceneHandler13(ExCommand *cmd) {
 					g_fp->_currentScene->_x = x - g_fp->_sceneRect.right + 300;
 
 				res = 1;
+
+				g_fp->sceneAutoScrolling();
 			} else {
 				x = g_vars->scene13_dudeX;
 			}
diff --git a/engines/fullpipe/scenes/scene14.cpp b/engines/fullpipe/scenes/scene14.cpp
index 977f3d9..2ebb82a 100644
--- a/engines/fullpipe/scenes/scene14.cpp
+++ b/engines/fullpipe/scenes/scene14.cpp
@@ -788,6 +788,8 @@ int sceneHandler14(ExCommand *cmd) {
 
 				if (x > g_fp->_sceneRect.right - g_vars->scene14_sceneDeltaX)
 					g_fp->_currentScene->_x = x + g_vars->scene14_sceneDiffX - g_fp->_sceneRect.right;
+
+				g_fp->sceneAutoScrolling();
 			}
 
 			if (g_vars->scene14_ballIsFlying)
diff --git a/engines/fullpipe/scenes/scene18and19.cpp b/engines/fullpipe/scenes/scene18and19.cpp
index a6f77a3..eb338ea 100644
--- a/engines/fullpipe/scenes/scene18and19.cpp
+++ b/engines/fullpipe/scenes/scene18and19.cpp
@@ -774,6 +774,8 @@ int sceneHandler18(ExCommand *cmd) {
 
 			if (x > g_fp->_sceneRect.right - 200)
 				g_fp->_currentScene->_x = x + 300 - g_fp->_sceneRect.right;
+
+			g_fp->sceneAutoScrolling();
 		}
 
 		if (g_vars->scene18_manIsReady && g_fp->_aniMan->_movement)
diff --git a/engines/fullpipe/scenes/scene21.cpp b/engines/fullpipe/scenes/scene21.cpp
index 1b232e1..7a61e48 100644
--- a/engines/fullpipe/scenes/scene21.cpp
+++ b/engines/fullpipe/scenes/scene21.cpp
@@ -129,6 +129,8 @@ int sceneHandler21(ExCommand *cmd) {
 
 			if (x > g_fp->_sceneRect.right - 200)
 				g_fp->_currentScene->_x = x + 300 - g_fp->_sceneRect.right;
+
+			g_fp->sceneAutoScrolling();
 		}
 
 		if (g_vars->scene21_pipeIsOpen && !g_vars->scene21_wiggleTrigger)
diff --git a/engines/fullpipe/scenes/scene22.cpp b/engines/fullpipe/scenes/scene22.cpp
index 3af8bad..5b9b091 100644
--- a/engines/fullpipe/scenes/scene22.cpp
+++ b/engines/fullpipe/scenes/scene22.cpp
@@ -381,6 +381,8 @@ int sceneHandler22(ExCommand *cmd) {
 			if (x > g_fp->_sceneRect.right - 200)
 				g_fp->_currentScene->_x = x + 300 - g_fp->_sceneRect.right;
 
+			g_fp->sceneAutoScrolling();
+
 			g_fp->_behaviorManager->updateBehaviors();
 
 			g_fp->startSceneTrack();
diff --git a/engines/fullpipe/scenes/scene28.cpp b/engines/fullpipe/scenes/scene28.cpp
index 8d829d7..275c788 100644
--- a/engines/fullpipe/scenes/scene28.cpp
+++ b/engines/fullpipe/scenes/scene28.cpp
@@ -440,6 +440,8 @@ int sceneHandler28(ExCommand *cmd) {
 
 			if (x > g_fp->_sceneRect.right - 200)
 				g_fp->_currentScene->_x = x + 300 - g_fp->_sceneRect.right;
+
+			g_fp->sceneAutoScrolling();
 		}
 
 		if (g_vars->scene28_darkeningObject) {
diff --git a/engines/fullpipe/scenes/scene32.cpp b/engines/fullpipe/scenes/scene32.cpp
index 9cd79d8..593f7b4 100644
--- a/engines/fullpipe/scenes/scene32.cpp
+++ b/engines/fullpipe/scenes/scene32.cpp
@@ -355,6 +355,8 @@ int sceneHandler32(ExCommand *cmd) {
 
 			if (x > g_fp->_sceneRect.right - 200)
 				g_fp->_currentScene->_x = x + 300 - g_fp->_sceneRect.right;
+
+			g_fp->sceneAutoScrolling();
 		}
 
 		if (!g_vars->scene32_flag->_movement) {
diff --git a/engines/fullpipe/scenes/scene33.cpp b/engines/fullpipe/scenes/scene33.cpp
index 6a58cdf..717e9f6 100644
--- a/engines/fullpipe/scenes/scene33.cpp
+++ b/engines/fullpipe/scenes/scene33.cpp
@@ -296,6 +296,8 @@ int sceneHandler33(ExCommand *cmd) {
 
 			if (x > g_fp->_sceneRect.right - 200)
 				g_fp->_currentScene->_x = x + 300 - g_fp->_sceneRect.right;
+
+			g_fp->sceneAutoScrolling();
 		}
 
 		if (g_vars->scene33_cube)
diff --git a/engines/fullpipe/scenes/scene34.cpp b/engines/fullpipe/scenes/scene34.cpp
index bc4ff18..69f3cd5 100644
--- a/engines/fullpipe/scenes/scene34.cpp
+++ b/engines/fullpipe/scenes/scene34.cpp
@@ -457,6 +457,8 @@ int sceneHandler34(ExCommand *cmd) {
 
 			if (x > g_fp->_sceneRect.right - 200)
 				g_fp->_currentScene->_x = x + 300 - g_fp->_sceneRect.right;
+
+			g_fp->sceneAutoScrolling();
 		}
 
 		--g_vars->scene34_fliesCountdown;
diff --git a/engines/fullpipe/scenes/scene35.cpp b/engines/fullpipe/scenes/scene35.cpp
index 3cdbb42..e8b08b2 100644
--- a/engines/fullpipe/scenes/scene35.cpp
+++ b/engines/fullpipe/scenes/scene35.cpp
@@ -236,6 +236,8 @@ int sceneHandler35(ExCommand *cmd) {
 
 			if (x > g_fp->_sceneRect.right - 200)
 				g_fp->_currentScene->_x = x + 300 - g_fp->_sceneRect.right;
+
+			g_fp->sceneAutoScrolling();
 		}
 
 		if (g_vars->scene35_flowCounter > 0) {
diff --git a/engines/fullpipe/scenes/scene37.cpp b/engines/fullpipe/scenes/scene37.cpp
index ba18164..bce28ef 100644
--- a/engines/fullpipe/scenes/scene37.cpp
+++ b/engines/fullpipe/scenes/scene37.cpp
@@ -280,6 +280,8 @@ int sceneHandler37(ExCommand *cmd) {
 
 			if (x > g_fp->_sceneRect.right - 200)
 				g_fp->_currentScene->_x = x + 300 - g_fp->_sceneRect.right;
+
+			g_fp->sceneAutoScrolling();
 		}
 
 		sceneHandler37_setRingsState();





More information about the Scummvm-git-logs mailing list