aboutsummaryrefslogtreecommitdiff
path: root/engines/parallaction/parallaction_br.cpp
diff options
context:
space:
mode:
authorNicola Mettifogo2009-03-23 00:56:05 +0000
committerNicola Mettifogo2009-03-23 00:56:05 +0000
commit71f42a954988bfe490d9c76e16edfa06873fe1b8 (patch)
treee641a159bd307189d96dc6afca2efbec56f9316e /engines/parallaction/parallaction_br.cpp
parente3f9acc3e6c66ab42e6e992536c933069771c99e (diff)
downloadscummvm-rg350-71f42a954988bfe490d9c76e16edfa06873fe1b8.tar.gz
scummvm-rg350-71f42a954988bfe490d9c76e16edfa06873fe1b8.tar.bz2
scummvm-rg350-71f42a954988bfe490d9c76e16edfa06873fe1b8.zip
Fully implemented scrolling.
svn-id: r39622
Diffstat (limited to 'engines/parallaction/parallaction_br.cpp')
-rw-r--r--engines/parallaction/parallaction_br.cpp17
1 files changed, 15 insertions, 2 deletions
diff --git a/engines/parallaction/parallaction_br.cpp b/engines/parallaction/parallaction_br.cpp
index 54b91896d3..6fcf009a21 100644
--- a/engines/parallaction/parallaction_br.cpp
+++ b/engines/parallaction/parallaction_br.cpp
@@ -293,6 +293,19 @@ void Parallaction_br::changeLocation() {
_location._followerStartPosition.x = -1000;
_location._followerStartPosition.y = -1000;
+ _gfx->setScrollPosX(0);
+ _gfx->setScrollPosY(0);
+ if (_char._ani->gfxobj) {
+ Common::Point foot;
+ _char._ani->getFoot(foot);
+
+ if (foot.x > 550)
+ _gfx->setScrollPosX(320);
+
+ if (foot.y > 350)
+ _gfx->setScrollPosY(foot.y - 350);
+ }
+
// kFlagsRemove is cleared because the character is visible by default.
// Commands can hide the character, anyway.
_char._ani->_flags &= ~kFlagsRemove;
@@ -301,8 +314,8 @@ void Parallaction_br::changeLocation() {
doLocationEnterTransition();
_cmdExec->run(_location._aCommands);
-
- // NOTE: music should not started here!
+
+ // NOTE: music should not started here!
// TODO: implement the music commands which control music execution
_soundMan->execute(SC_PLAYMUSIC);