aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--saga/image.cpp4
-rw-r--r--saga/saga.h2
-rw-r--r--saga/scene.cpp2
3 files changed, 4 insertions, 4 deletions
diff --git a/saga/image.cpp b/saga/image.cpp
index ed2320ef10..95b947e598 100644
--- a/saga/image.cpp
+++ b/saga/image.cpp
@@ -47,7 +47,7 @@ static int granulate(int value, int granularity) {
}
int SagaEngine::decodeBGImage(const byte *image_data, size_t image_size,
- byte **output_buf, size_t *output_buf_len, int *w, int *h) {
+ byte **output_buf, size_t *output_buf_len, int *w, int *h, bool flip) {
ImageHeader hdr;
int modex_height;
const byte *RLE_data_ptr;
@@ -90,7 +90,7 @@ int SagaEngine::decodeBGImage(const byte *image_data, size_t image_size,
unbankBGImage(out_buf, decode_buf, hdr.width, hdr.height);
// For some reason bg images in IHNM are upside down
- if (getGameType() == GType_IHNM) {
+ if (getGameType() == GType_IHNM && !flip) {
flipImage(out_buf, hdr.width, hdr.height);
}
diff --git a/saga/saga.h b/saga/saga.h
index b6a245e410..0ba789bf3c 100644
--- a/saga/saga.h
+++ b/saga/saga.h
@@ -632,7 +632,7 @@ private:
public:
int decodeBGImage(const byte *image_data, size_t image_size,
- byte **output_buf, size_t *output_buf_len, int *w, int *h);
+ byte **output_buf, size_t *output_buf_len, int *w, int *h, bool flip = false);
const byte *getImagePal(const byte *image_data, size_t image_size);
void loadStrings(StringsTable &stringsTable, const byte *stringsPointer, size_t stringsLength);
diff --git a/saga/scene.cpp b/saga/scene.cpp
index 13bd9d929a..4e77bc02a2 100644
--- a/saga/scene.cpp
+++ b/saga/scene.cpp
@@ -1040,7 +1040,7 @@ void Scene::processSceneResources() {
_bgMask.res_len = resourceDataLength;
_bgMask.loaded = 1;
_vm->decodeBGImage(_bgMask.res_buf, _bgMask.res_len, &_bgMask.buf,
- &_bgMask.buf_len, &_bgMask.w, &_bgMask.h);
+ &_bgMask.buf_len, &_bgMask.w, &_bgMask.h, true);
// At least in ITE the mask needs to be clipped.