diff options
author | Eugene Sandulenko | 2013-12-09 18:17:30 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2013-12-09 18:17:30 +0200 |
commit | 8a936200037e6d97212a4d0ad6a710c87cc15b58 (patch) | |
tree | 94d913b8d37e3d92be5a211eba24389c15d772e9 /engines | |
parent | c732ee501cea60f5634cb19e86877cf3ab40feef (diff) | |
download | scummvm-rg350-8a936200037e6d97212a4d0ad6a710c87cc15b58.tar.gz scummvm-rg350-8a936200037e6d97212a4d0ad6a710c87cc15b58.tar.bz2 scummvm-rg350-8a936200037e6d97212a4d0ad6a710c87cc15b58.zip |
FULLPIPE: Implement Scene::updateScrolling2()
Diffstat (limited to 'engines')
-rw-r--r-- | engines/fullpipe/scene.cpp | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/engines/fullpipe/scene.cpp b/engines/fullpipe/scene.cpp index c26187419f..61ff3457a7 100644 --- a/engines/fullpipe/scene.cpp +++ b/engines/fullpipe/scene.cpp @@ -515,7 +515,29 @@ void Scene::updateScrolling() { } void Scene::updateScrolling2() { - warning("STUB Scene::updateScrolling2()"); + if (_picObjList.size()) { + Common::Point point; + int offsetY = 0; + int offsetX = 0; + + ((PictureObject *)_picObjList[0])->getDimensions(&point); + + int flags = ((PictureObject *)_picObjList[0])->_flags; + + if (g_fullpipe->_sceneRect.left < 0 && !(flags & 2)) + offsetX = -g_fullpipe->_sceneRect.left; + + if (g_fullpipe->_sceneRect.top < 0 && !(flags & 0x20)) + offsetY = -g_fullpipe->_sceneRect.top; + + if (g_fullpipe->_sceneRect.right > point.x - 1 && g_fullpipe->_sceneRect.left > 0 && !(flags & 2)) + offsetX = point.x - g_fullpipe->_sceneRect.right - 1; + + if (g_fullpipe->_sceneRect.bottom > point.y - 1 && g_fullpipe->_sceneRect.top > 0 && !(flags & 0x20)) + offsetY = point.y - g_fullpipe->_sceneRect.bottom - 1; + + g_fullpipe->_sceneRect.translate(offsetX, offsetY); + } } StaticANIObject *Scene::getStaticANIObjectAtPos(int x, int y) { |