From 36828287ad6041de7c8e98d0fe2979730a8b094f Mon Sep 17 00:00:00 2001 From: Nicola Mettifogo Date: Fri, 12 Jun 2009 08:51:05 +0000 Subject: * Moved the updated IFF code from Parallaction to common/ * Updated Parallaction and SAGA to use the new decoder infrastructure. svn-id: r41465 --- engines/saga/scene.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'engines/saga') 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); } -- cgit v1.2.3