aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/tsage/core.cpp10
-rw-r--r--engines/tsage/scenes.cpp4
2 files changed, 8 insertions, 6 deletions
diff --git a/engines/tsage/core.cpp b/engines/tsage/core.cpp
index 07548224ed..7749e89580 100644
--- a/engines/tsage/core.cpp
+++ b/engines/tsage/core.cpp
@@ -2160,8 +2160,8 @@ void SceneObject::updateScreen() {
if (srcRect.isValidRect()) {
Rect destRect = srcRect;
- destRect.translate(-_globals->_sceneOffset.x, -_globals->_sceneOffset.y);
destRect.translate(-sceneBounds.left, -sceneBounds.top);
+ srcRect.translate(-_globals->_sceneOffset.x, -_globals->_sceneOffset.y);
_globals->_screenSurface.copyFrom(_globals->_sceneManager._scene->_backSurface, srcRect, destRect);
}
@@ -2194,8 +2194,10 @@ void SceneObjectList::draw() {
} else {
// If there is a scroll follower, check whether it has moved off-screen
if (_globals->_scrollFollower) {
- const Common::Point &objPos = _globals->_scrollFollower->_position;
const Rect &scrollerRect = _globals->_sceneManager._scrollerRect;
+ Common::Point objPos(
+ _globals->_scrollFollower->_position.x - _globals->_sceneManager._scene->_sceneBounds.left,
+ _globals->_scrollFollower->_position.y - _globals->_sceneManager._scene->_sceneBounds.top);
int loadCount = 0;
if (objPos.x >= scrollerRect.right) {
@@ -2568,8 +2570,8 @@ void Player::process(Event &event) {
(_position != event.mousePos) && _globals->_sceneObjects->contains(this)) {
PlayerMover *newMover = new PlayerMover();
- Common::Point destPos(event.mousePos.x - _globals->_sceneManager._scene->_sceneBounds.left,
- event.mousePos.y - _globals->_sceneManager._scene->_sceneBounds.top);
+ Common::Point destPos(event.mousePos.x + _globals->_sceneManager._scene->_sceneBounds.left,
+ event.mousePos.y + _globals->_sceneManager._scene->_sceneBounds.top);
addMover(newMover, &destPos, NULL);
event.handled = true;
diff --git a/engines/tsage/scenes.cpp b/engines/tsage/scenes.cpp
index e0ef87f66b..cc5ccb333a 100644
--- a/engines/tsage/scenes.cpp
+++ b/engines/tsage/scenes.cpp
@@ -344,10 +344,10 @@ void Scene::refreshBackground(int xAmount, int yAmount) {
int yHalfOffset = (_backgroundBounds.height() / 100) == 3 ? 0 : _sceneBounds.top / 100;
// Set the limits and increment amounts
- int yInc = (xAmount < 0) ? -1 : 1;
+ int xInc = (xAmount < 0) ? -1 : 1;
int xSection = (xAmount < 0) ? 15 : 0;
int xSectionEnd = (xAmount < 0) ? -1 : 16;
- int xInc = (yAmount < 0) ? -1 : 1;
+ int yInc = (yAmount < 0) ? -1 : 1;
int ySection = (yAmount < 0) ? 15 : 0;
int ySectionEnd = (yAmount < 0) ? -1 : 16;
bool changedFlag = false;