aboutsummaryrefslogtreecommitdiff
path: root/engines/lastexpress/game/scenes.cpp
diff options
context:
space:
mode:
authorJulien2012-07-26 17:19:58 -0400
committerJulien2012-07-27 00:15:05 -0400
commit3d6807b35905a951688508d3b696ee48c1453c4d (patch)
tree4bf9dacca0d96c2b0c1a3c4c26f1f655953c637a /engines/lastexpress/game/scenes.cpp
parentb4b4a7d127194cf29fdfcf5ee7b41b875d26b37e (diff)
downloadscummvm-rg350-3d6807b35905a951688508d3b696ee48c1453c4d.tar.gz
scummvm-rg350-3d6807b35905a951688508d3b696ee48c1453c4d.tar.bz2
scummvm-rg350-3d6807b35905a951688508d3b696ee48c1453c4d.zip
LASTEXPRESS: Implement Logic::resetState()
Diffstat (limited to 'engines/lastexpress/game/scenes.cpp')
-rw-r--r--engines/lastexpress/game/scenes.cpp31
1 files changed, 19 insertions, 12 deletions
diff --git a/engines/lastexpress/game/scenes.cpp b/engines/lastexpress/game/scenes.cpp
index 254b0fdb58..447e8714b0 100644
--- a/engines/lastexpress/game/scenes.cpp
+++ b/engines/lastexpress/game/scenes.cpp
@@ -739,24 +739,31 @@ void SceneManager::resetQueue() {
_queue.clear();
}
-void SceneManager::setCoordinates(SequenceFrame *frame) {
+void SceneManager::setCoordinates(Common::Rect rect) {
+ _flagCoordinates = true;
- if (!frame || frame->getInfo()->subType == 3)
- return;
+ if (_coords.right > rect.right)
+ _coords.right = rect.right;
- _flagCoordinates = true;
+ if (_coords.bottom > rect.bottom)
+ _coords.bottom = rect.bottom;
- if (_coords.right > (int)frame->getInfo()->xPos1)
- _coords.right = (int16)frame->getInfo()->xPos1;
+ if (_coords.left < rect.left)
+ _coords.left = rect.left;
- if (_coords.bottom > (int)frame->getInfo()->yPos1)
- _coords.bottom = (int16)frame->getInfo()->yPos1;
+ if (_coords.top < rect.top)
+ _coords.top = rect.top;
+}
+
+void SceneManager::setCoordinates(SequenceFrame *frame) {
- if (_coords.left < (int)frame->getInfo()->xPos2)
- _coords.left = (int16)frame->getInfo()->xPos2;
+ if (!frame || frame->getInfo()->subType == 3)
+ return;
- if (_coords.top < (int)frame->getInfo()->yPos2)
- _coords.top = (int16)frame->getInfo()->yPos2;
+ setCoordinates(Common::Rect((int16)frame->getInfo()->xPos1,
+ (int16)frame->getInfo()->yPos1,
+ (int16)frame->getInfo()->xPos2,
+ (int16)frame->getInfo()->yPos2));
}
void SceneManager::resetCoordinates() {