aboutsummaryrefslogtreecommitdiff
path: root/engines/saga
diff options
context:
space:
mode:
authorTomas Jakobsson2013-01-06 20:04:50 +0100
committerTomas Jakobsson2013-01-06 20:04:50 +0100
commitfe10773ac3533e301931586c93eb0b2a5bb7cf80 (patch)
tree0bf9eb6a847c3485833ca002093626ab2baf7bca /engines/saga
parent25752922efba96f2d4cd30fa35dbffa0c51bc31d (diff)
downloadscummvm-rg350-fe10773ac3533e301931586c93eb0b2a5bb7cf80.tar.gz
scummvm-rg350-fe10773ac3533e301931586c93eb0b2a5bb7cf80.tar.bz2
scummvm-rg350-fe10773ac3533e301931586c93eb0b2a5bb7cf80.zip
SAGA: Update to new IFFDecoder for PBM images
Diffstat (limited to 'engines/saga')
-rw-r--r--engines/saga/scene.cpp19
1 files changed, 10 insertions, 9 deletions
diff --git a/engines/saga/scene.cpp b/engines/saga/scene.cpp
index 35d923f821..75876b1c90 100644
--- a/engines/saga/scene.cpp
+++ b/engines/saga/scene.cpp
@@ -41,9 +41,10 @@
#include "saga/actor.h"
#include "saga/resource.h"
-#include "graphics/iff.h"
#include "common/util.h"
+#include "graphics/decoders/iff.h"
+
namespace Saga {
static int initSceneDoors[SCENE_DOORS_MAX] = {
@@ -450,11 +451,11 @@ void Scene::changeScene(int16 sceneNumber, int actorsEntrance, SceneTransitionTy
debug(5, "Scene::changeScene(%d, %d, %d, %d)", sceneNumber, actorsEntrance, transitionType, chapter);
// This is used for latter ITE demos where all places on world map except
- // Tent Faire are substituted with LBM picture and short description
+ // Tent Faire are substituted with IFF picture and short description
if (_vm->_hasITESceneSubstitutes) {
for (int i = 0; i < ARRAYSIZE(sceneSubstitutes); i++) {
if (sceneSubstitutes[i].sceneId == sceneNumber) {
- byte *pal, colors[768];
+ const byte *pal;
Common::File file;
Rect rect;
PalEntry cPal[PAL_ENTRIES];
@@ -462,12 +463,12 @@ void Scene::changeScene(int16 sceneNumber, int actorsEntrance, SceneTransitionTy
_vm->_interface->setMode(kPanelSceneSubstitute);
if (file.open(sceneSubstitutes[i].image)) {
- Graphics::Surface bbmBuffer;
- Graphics::decodePBM(file, bbmBuffer, colors);
- pal = colors;
- rect.setWidth(bbmBuffer.w);
- rect.setHeight(bbmBuffer.h);
- _vm->_gfx->drawRegion(rect, (const byte*)bbmBuffer.pixels);
+ Graphics::IFFDecoder decoder;
+ decoder.loadStream(file);
+ pal = decoder.getPalette();
+ rect.setWidth(decoder.getSurface()->w);
+ rect.setHeight(decoder.getSurface()->h);
+ _vm->_gfx->drawRegion(rect, (const byte *)decoder.getSurface()->pixels);
for (int j = 0; j < PAL_ENTRIES; j++) {
cPal[j].red = *pal++;
cPal[j].green = *pal++;