diff options
author | Matthew Hoops | 2011-12-12 15:25:28 -0500 |
---|---|---|
committer | Matthew Hoops | 2011-12-12 15:25:28 -0500 |
commit | 00279659b22cbd5db739d5351e83a9fc2a2ae408 (patch) | |
tree | 497f06f46820043cbdf1725652b8f0073223e24a /engines/tsage/scenes.cpp | |
parent | d932df79bed5aac97e17c0920a5e75cb5ce733ee (diff) | |
parent | d1628feb761acc9f4607f64de3eb620fea53bcc9 (diff) | |
download | scummvm-rg350-00279659b22cbd5db739d5351e83a9fc2a2ae408.tar.gz scummvm-rg350-00279659b22cbd5db739d5351e83a9fc2a2ae408.tar.bz2 scummvm-rg350-00279659b22cbd5db739d5351e83a9fc2a2ae408.zip |
Merge remote branch 'upstream/master' into pegasus
Conflicts:
video/qt_decoder.cpp
Diffstat (limited to 'engines/tsage/scenes.cpp')
-rw-r--r-- | engines/tsage/scenes.cpp | 45 |
1 files changed, 37 insertions, 8 deletions
diff --git a/engines/tsage/scenes.cpp b/engines/tsage/scenes.cpp index baa114218e..6362c63bc3 100644 --- a/engines/tsage/scenes.cpp +++ b/engines/tsage/scenes.cpp @@ -259,7 +259,7 @@ Scene::Scene() : _sceneBounds(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT), _sceneMode = 0; _activeScreenNumber = 0; _oldSceneBounds = Rect(4000, 4000, 4100, 4100); - Common::set_to(&_zoomPercents[0], &_zoomPercents[256], 0); + Common::fill(&_zoomPercents[0], &_zoomPercents[256], 0); } Scene::~Scene() { @@ -316,11 +316,39 @@ void Scene::loadScene(int sceneNum) { void Scene::loadSceneData(int sceneNum) { _activeScreenNumber = sceneNum; - // Get the basic scene size - byte *data = g_resourceManager->getResource(RES_BITMAP, sceneNum, 9999); - _backgroundBounds = Rect(0, 0, READ_LE_UINT16(data), READ_LE_UINT16(data + 2)); + if (g_vm->getGameID() == GType_Ringworld2) { + // Most scenes in Ringworld 2 don't have a scene size resource, but rather just have + // a standard 320x200 size. Only read the scene size data for the specific few scenes + switch (sceneNum) { + case 700: + case 1020: + case 1100: + case 1700: + case 2600: + case 2950: + case 3100: + case 3101: + case 3275: + case 3600: { + // Get the basic scene size from the resource + byte *data = g_resourceManager->getResource(RES_BITMAP, sceneNum, 9999); + _backgroundBounds = Rect(0, 0, READ_LE_UINT16(data), READ_LE_UINT16(data + 2)); + DEALLOCATE(data); + break; + } + default: + // For all other scenes, use a standard screen size + _backgroundBounds = Rect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT); + break; + } + } else { + // Get the basic scene size + byte *data = g_resourceManager->getResource(RES_BITMAP, sceneNum, 9999); + _backgroundBounds = Rect(0, 0, READ_LE_UINT16(data), READ_LE_UINT16(data + 2)); + DEALLOCATE(data); + } + g_globals->_sceneManager._scene->_sceneBounds.contain(_backgroundBounds); - DEALLOCATE(data); // Set up a surface for storing the scene background SceneManager::setBackSurface(); @@ -335,7 +363,7 @@ void Scene::loadSceneData(int sceneNum) { _priorities.load(sceneNum); // Initialize the section enabled list - Common::set_to(&_enabledSections[0], &_enabledSections[16 * 16], 0xffff); + Common::fill(&_enabledSections[0], &_enabledSections[16 * 16], 0xffff); g_globals->_sceneOffset.x = (_sceneBounds.left / 160) * 160; g_globals->_sceneOffset.y = (_sceneBounds.top / 100) * 100; @@ -428,8 +456,9 @@ void Scene::refreshBackground(int xAmount, int yAmount) { (xSectionSrc + 1) * 160, (ySectionSrc + 1) * 100); Rect destBounds(xSectionDest * 160, ySectionDest * 100, (xSectionDest + 1) * 160, (ySectionDest + 1) * 100); - if (g_vm->getGameID() == GType_BlueForce) { - // For Blue Force, if the scene has an interface area, exclude it from the copy + if (g_vm->getGameID() != GType_Ringworld) { + // For Blue Force and Return to Ringworld, if the scene has an interface area, + // exclude it from the copy srcBounds.bottom = MIN<int16>(srcBounds.bottom, BF_GLOBALS._interfaceY); destBounds.bottom = MIN<int16>(destBounds.bottom, BF_GLOBALS._interfaceY); } |