diff options
author | Torbjörn Andersson | 2005-07-04 07:46:48 +0000 |
---|---|---|
committer | Torbjörn Andersson | 2005-07-04 07:46:48 +0000 |
commit | 399bd16ab1175e6b816bc6cec26d650cfcb7cad0 (patch) | |
tree | 50498f15ae418512b4d9d3e125a3037d7bee5e09 /saga | |
parent | caa614840d4b849c24e974c72cffd38bbc1f8a60 (diff) | |
download | scummvm-rg350-399bd16ab1175e6b816bc6cec26d650cfcb7cad0.tar.gz scummvm-rg350-399bd16ab1175e6b816bc6cec26d650cfcb7cad0.tar.bz2 scummvm-rg350-399bd16ab1175e6b816bc6cec26d650cfcb7cad0.zip |
Apparently some masks are bigger than the image they are supposed to be
masking, and therefore need to be clipped. This fixes a slight glitch in the
ITE intro where an actor is drawn partly in the status text field.
svn-id: r18490
Diffstat (limited to 'saga')
-rw-r--r-- | saga/scene.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/saga/scene.cpp b/saga/scene.cpp index 778bb6873d..a4244a6b5f 100644 --- a/saga/scene.cpp +++ b/saga/scene.cpp @@ -772,6 +772,12 @@ int Scene::processSceneResources() { _bgMask.loaded = 1; _vm->decodeBGImage(_bgMask.res_buf, _bgMask.res_len, &_bgMask.buf, &_bgMask.buf_len, &_bgMask.w, &_bgMask.h); + + // At least in ITE the mask needs to be clipped. + + _bgMask.w = MIN(_bgMask.w, _vm->getDisplayWidth()); + _bgMask.h = MIN(_bgMask.h, _vm->getClippedSceneHeight()); + debug(0, "BACKGROUND MASK width=%d height=%d length=%d", _bgMask.w, _bgMask.h, _bgMask.buf_len); break; case SAGA_STRINGS: |