aboutsummaryrefslogtreecommitdiff
path: root/saga/scene.cpp
diff options
context:
space:
mode:
authorEugene Sandulenko2005-07-29 18:29:23 +0000
committerEugene Sandulenko2005-07-29 18:29:23 +0000
commit208815a811044be91d9488f41957dd28330ca430 (patch)
tree763c4e46a76743ac7947d2e4aa8ed5392ce78a6f /saga/scene.cpp
parente85519624d561dbed8c23518c463f23f8443f2d5 (diff)
downloadscummvm-rg350-208815a811044be91d9488f41957dd28330ca430.tar.gz
scummvm-rg350-208815a811044be91d9488f41957dd28330ca430.tar.bz2
scummvm-rg350-208815a811044be91d9488f41957dd28330ca430.zip
Restrict scene substitutes only to demos which actually use them
svn-id: r18597
Diffstat (limited to 'saga/scene.cpp')
-rw-r--r--saga/scene.cpp45
1 files changed, 24 insertions, 21 deletions
diff --git a/saga/scene.cpp b/saga/scene.cpp
index 23b5ea3a90..ded43ee8eb 100644
--- a/saga/scene.cpp
+++ b/saga/scene.cpp
@@ -364,30 +364,33 @@ static struct SceneSubstitutes {
void Scene::changeScene(uint16 sceneNumber, int actorsEntrance, SceneTransitionType transitionType) {
// This is used for latter demos where all places on world map except
// Tent Faire are substituted with LBM picture and short description
- for (int i = 0; i < ARRAYSIZE(sceneSubstitutes); i++) {
+ if (_vm->getFeatures() & GF_SCENE_SUBSTITUTES) {
+ for (int i = 0; i < ARRAYSIZE(sceneSubstitutes); i++) {
+ if (sceneSubstitutes[i].sceneId == sceneNumber) {
+ Surface *backBuffer = _vm->_gfx->getBackBuffer();
+ Surface bbmBuffer;
+ byte *pal, *colors;
+ Common::File file;
+ Rect rect;
+ PalEntry cPal[PAL_ENTRIES];
- if (sceneSubstitutes[i].sceneId == sceneNumber) {
- Surface *backBuffer = _vm->_gfx->getBackBuffer();
- Surface bbmBuffer;
- byte *pal, *colors;
- Common::File file;
- Rect rect;
- PalEntry cPal[PAL_ENTRIES];
-
- if (file.open(sceneSubstitutes[i].image)) {
_vm->_interface->setMode(kPanelSceneSubstitute);
- Graphics::decodeILBM(file, bbmBuffer, pal);
- colors = pal;
- rect.setWidth(bbmBuffer.w);
- rect.setHeight(bbmBuffer.h);
- backBuffer->blit(rect, (const byte*)bbmBuffer.pixels);
- for (int j = 0; j < PAL_ENTRIES; j++) {
- cPal[j].red = *pal++;
- cPal[j].green = *pal++;
- cPal[j].blue = *pal++;
+
+ if (file.open(sceneSubstitutes[i].image)) {
+ Graphics::decodeILBM(file, bbmBuffer, pal);
+ colors = pal;
+ rect.setWidth(bbmBuffer.w);
+ rect.setHeight(bbmBuffer.h);
+ backBuffer->blit(rect, (const byte*)bbmBuffer.pixels);
+ for (int j = 0; j < PAL_ENTRIES; j++) {
+ cPal[j].red = *pal++;
+ cPal[j].green = *pal++;
+ cPal[j].blue = *pal++;
+ }
+ free(colors);
+ _vm->_gfx->setPalette(cPal);
+
}
- free(colors);
- _vm->_gfx->setPalette(cPal);
_vm->_interface->setStatusText("Click or Press Return to continue. Press Q to quit.", 96);
_vm->_font->textDrawRect(kMediumFont, backBuffer, sceneSubstitutes[i].title,