aboutsummaryrefslogtreecommitdiff
path: root/saga/scene.cpp
diff options
context:
space:
mode:
authorAndrew Kurushin2005-01-07 21:24:26 +0000
committerAndrew Kurushin2005-01-07 21:24:26 +0000
commit12b5c5f85515b3f2f837992f63040373aba167ba (patch)
treecf1f3dc506d587e76d2782018db068b7dbe41422 /saga/scene.cpp
parenteb76ac619fdb9cccf0e3ba97115894d046a8f563 (diff)
downloadscummvm-rg350-12b5c5f85515b3f2f837992f63040373aba167ba.tar.gz
scummvm-rg350-12b5c5f85515b3f2f837992f63040373aba167ba.tar.bz2
scummvm-rg350-12b5c5f85515b3f2f837992f63040373aba167ba.zip
fixing scene transition
svn-id: r16480
Diffstat (limited to 'saga/scene.cpp')
-rw-r--r--saga/scene.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/saga/scene.cpp b/saga/scene.cpp
index c4d8102c5a..d11f953952 100644
--- a/saga/scene.cpp
+++ b/saga/scene.cpp
@@ -409,15 +409,14 @@ bool Scene::offscreenPath(Point &testPoint) {
return false;
}
-
- first.x = clamp( 0, testPoint.x, _vm->getDisplayWidth() - 1 );
- first.y = clamp( 0, testPoint.y, _vm->getDisplayHeight() - 1 );
+ first.x = clamp( 0, testPoint.x, _bgMask.w - 1 );
+ first.y = clamp( 0, testPoint.y, _bgMask.h - 1 );
if (first == testPoint) {
return false;
}
- if (first.y >= _vm->getDisplayHeight() - 1) {
- first.y = 200 -1 - 1;
+ if (first.y >= _bgMask.h - 1) {
+ first.y = _bgMask.h - 2;
}
testPoint = first;
@@ -432,12 +431,12 @@ bool Scene::offscreenPath(Point &testPoint) {
break;
}
} else {
- if (third.x >= _vm->getDisplayWidth()) {
+ if (third.x >= _bgMask.w) {
return false;
}
}
- if (third.x < _vm->getDisplayWidth()) {
+ if (third.x < _bgMask.w) {
maskType = getBGMaskType(third);
if (getDoorState(maskType) == 0) {
testPoint.x = third.x + 1;
@@ -458,12 +457,12 @@ bool Scene::offscreenPath(Point &testPoint) {
break;
}
} else {
- if (third.y > _vm->getDisplayHeight() - 1) {
+ if (third.y >= _bgMask.h) {
return false;
}
}
- if (third.y <= _vm->getDisplayHeight() - 1) {
+ if (third.y < _bgMask.h) {
maskType = getBGMaskType(third);
if (getDoorState(maskType) == 0) {
testPoint.y = third.y + 1;
@@ -809,6 +808,7 @@ int Scene::processSceneResources() {
_bgMask.loaded = 1;
_vm->decodeBGImage(_bgMask.res_buf, _bgMask.res_len, &_bgMask.buf,
&_bgMask.buf_len, &_bgMask.w, &_bgMask.h);
+ debug(0, "BACKGROUND MASK width=%d height=%d length=%d", _bgMask.w, _bgMask.h, _bgMask.buf_len);
break;
case SAGA_OBJECT_NAME_LIST:
debug(0, "Loading object name list resource...");