aboutsummaryrefslogtreecommitdiff
path: root/engines/saga
diff options
context:
space:
mode:
authorNicola Mettifogo2009-06-12 08:51:05 +0000
committerNicola Mettifogo2009-06-12 08:51:05 +0000
commit36828287ad6041de7c8e98d0fe2979730a8b094f (patch)
treec4ea87c25281a75638a4e64aab367659ae2d4a6a /engines/saga
parentb9017519fa1408311199bd0b41c271e35afee02c (diff)
downloadscummvm-rg350-36828287ad6041de7c8e98d0fe2979730a8b094f.tar.gz
scummvm-rg350-36828287ad6041de7c8e98d0fe2979730a8b094f.tar.bz2
scummvm-rg350-36828287ad6041de7c8e98d0fe2979730a8b094f.zip
* Moved the updated IFF code from Parallaction to common/
* Updated Parallaction and SAGA to use the new decoder infrastructure. svn-id: r41465
Diffstat (limited to 'engines/saga')
-rw-r--r--engines/saga/scene.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/engines/saga/scene.cpp b/engines/saga/scene.cpp
index a7c802f0c9..f43db12d1a 100644
--- a/engines/saga/scene.cpp
+++ b/engines/saga/scene.cpp
@@ -472,7 +472,7 @@ void Scene::changeScene(int16 sceneNumber, int actorsEntrance, SceneTransitionTy
for (int i = 0; i < ARRAYSIZE(sceneSubstitutes); i++) {
if (sceneSubstitutes[i].sceneId == sceneNumber) {
Surface bbmBuffer;
- byte *pal, *colors;
+ byte *pal, colors[768];
Common::File file;
Rect rect;
PalEntry cPal[PAL_ENTRIES];
@@ -480,8 +480,8 @@ void Scene::changeScene(int16 sceneNumber, int actorsEntrance, SceneTransitionTy
_vm->_interface->setMode(kPanelSceneSubstitute);
if (file.open(sceneSubstitutes[i].image)) {
- Graphics::decodePBM(file, bbmBuffer, pal);
- colors = pal;
+ Graphics::decodePBM(file, bbmBuffer, colors);
+ pal = colors;
rect.setWidth(bbmBuffer.w);
rect.setHeight(bbmBuffer.h);
_vm->_gfx->drawRegion(rect, (const byte*)bbmBuffer.pixels);
@@ -490,7 +490,6 @@ void Scene::changeScene(int16 sceneNumber, int actorsEntrance, SceneTransitionTy
cPal[j].green = *pal++;
cPal[j].blue = *pal++;
}
- free(colors);
_vm->_gfx->setPalette(cPal);
}