mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-13 21:31:53 +00:00
Fix walking in IHNM. It appeared that BG mask wasn't flipped upside down
when everything else is :). svn-id: r19136
This commit is contained in:
parent
f3c387f328
commit
b4a4f779e3
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user