diff options
author | Filippos Karapetis | 2015-10-22 02:14:41 +0300 |
---|---|---|
committer | Filippos Karapetis | 2015-10-22 02:14:41 +0300 |
commit | 9bfa51ef300cf95872ca2325b7bd0d64f85372e6 (patch) | |
tree | 4a492273ace032bb94743af615e961b81eb12bf0 /engines/mads/scene_data.cpp | |
parent | 80dae7b8fcd3e20a0f18d9287a9fc44793f6c38a (diff) | |
download | scummvm-rg350-9bfa51ef300cf95872ca2325b7bd0d64f85372e6.tar.gz scummvm-rg350-9bfa51ef300cf95872ca2325b7bd0d64f85372e6.tar.bz2 scummvm-rg350-9bfa51ef300cf95872ca2325b7bd0d64f85372e6.zip |
MADS: Phantom: Expand the existing camera adjustment logic for V2 games
This fixes all of the scenes that expand over the screen (e.g. 101, 104,
109 in Phantom, as well as the several scenes in the Dragonsphere intro).
Also added a new debugger command, "set_camera", which sets the scene
camera to specific coordinates
Diffstat (limited to 'engines/mads/scene_data.cpp')
-rw-r--r-- | engines/mads/scene_data.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/engines/mads/scene_data.cpp b/engines/mads/scene_data.cpp index e48bcd8c6f..d4610c53d4 100644 --- a/engines/mads/scene_data.cpp +++ b/engines/mads/scene_data.cpp @@ -422,6 +422,18 @@ void SceneInfo::loadMadsV2Background(int sceneId, const Common::String &resName, assert(screenWidth == _width); assert(screenHeight <= _height); + // Resize the background surface to hold all of the tiles + uint16 newWidth = bgSurface.w; + uint16 newHeight = bgSurface.h; + + if (tileWidth < screenWidth && bgSurface.w != tileCount * tileWidth) + newWidth = tileCount * tileWidth; + if (tileHeight < screenHeight && bgSurface.h != tileCount * tileHeight) + newHeight = tileCount * tileHeight; + + if (bgSurface.w != newWidth || bgSurface.h != newHeight) + bgSurface.setSize(newWidth, newHeight); + // -------------------------------------------------------------------------------- // Get tile data |