aboutsummaryrefslogtreecommitdiff
path: root/engines/tsage/scenes.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2011-10-22 20:44:26 +1100
committerPaul Gilbert2011-10-22 20:44:26 +1100
commitd3193687a73b92213095db6b8bbf6b6b4614af12 (patch)
tree4390c932f05c3005705a83138dce22f5e522eeeb /engines/tsage/scenes.cpp
parent583b8278950a56be3b061ecf9cb2b57125d30dbe (diff)
downloadscummvm-rg350-d3193687a73b92213095db6b8bbf6b6b4614af12.tar.gz
scummvm-rg350-d3193687a73b92213095db6b8bbf6b6b4614af12.tar.bz2
scummvm-rg350-d3193687a73b92213095db6b8bbf6b6b4614af12.zip
TSAGE: Beginnings of support for Return to Ringworld
Diffstat (limited to 'engines/tsage/scenes.cpp')
-rw-r--r--engines/tsage/scenes.cpp36
1 files changed, 32 insertions, 4 deletions
diff --git a/engines/tsage/scenes.cpp b/engines/tsage/scenes.cpp
index baa114218e..686b8725f5 100644
--- a/engines/tsage/scenes.cpp
+++ b/engines/tsage/scenes.cpp
@@ -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();