aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2016-12-09 23:35:51 +0100
committerEugene Sandulenko2016-12-10 00:05:19 +0100
commitb03b7902ebf265d18410266da3426fe42c67c065 (patch)
tree0aa6b4f3b6043a109e7c572231cf48b17bd636bf
parent774d55b7b6a52c30cdadee57441597a6542db70e (diff)
downloadscummvm-rg350-b03b7902ebf265d18410266da3426fe42c67c065.tar.gz
scummvm-rg350-b03b7902ebf265d18410266da3426fe42c67c065.tar.bz2
scummvm-rg350-b03b7902ebf265d18410266da3426fe42c67c065.zip
FULLPIPE: Implement wide scene autoscrolling
-rw-r--r--engines/fullpipe/fullpipe.h1
-rw-r--r--engines/fullpipe/scenes.cpp11
-rw-r--r--engines/fullpipe/scenes/scene04.cpp4
-rw-r--r--engines/fullpipe/scenes/scene06.cpp2
-rw-r--r--engines/fullpipe/scenes/scene09.cpp2
-rw-r--r--engines/fullpipe/scenes/scene11.cpp2
-rw-r--r--engines/fullpipe/scenes/scene13.cpp2
-rw-r--r--engines/fullpipe/scenes/scene14.cpp2
-rw-r--r--engines/fullpipe/scenes/scene18and19.cpp2
-rw-r--r--engines/fullpipe/scenes/scene21.cpp2
-rw-r--r--engines/fullpipe/scenes/scene22.cpp2
-rw-r--r--engines/fullpipe/scenes/scene28.cpp2
-rw-r--r--engines/fullpipe/scenes/scene32.cpp2
-rw-r--r--engines/fullpipe/scenes/scene33.cpp2
-rw-r--r--engines/fullpipe/scenes/scene34.cpp2
-rw-r--r--engines/fullpipe/scenes/scene35.cpp2
-rw-r--r--engines/fullpipe/scenes/scene37.cpp2
17 files changed, 44 insertions, 0 deletions
diff --git a/engines/fullpipe/fullpipe.h b/engines/fullpipe/fullpipe.h
index 41769baab9..0b7bf7819a 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 4b50763e8c..15f6b0bdbc 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 d349783c10..0e5040097c 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 5fab4b5862..6d8c152052 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 3a8b937f24..42d02917ef 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 8c3de9e11e..72af59aacf 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 12fe1dd35d..39b31b3793 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 977f3d95ac..2ebb82abcf 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 a6f77a33fd..eb338ead88 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 1b232e1aee..7a61e4862d 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 3af8bad456..5b9b091f36 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 8d829d7b98..275c78802f 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 9cd79d8115..593f7b446c 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 6a58cdf694..717e9f6572 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 bc4ff18bae..69f3cd5293 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 3cdbb42c1e..e8b08b2614 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 ba181642df..bce28ef382 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();