diff options
| author | Eugene Sandulenko | 2005-10-17 14:20:18 +0000 | 
|---|---|---|
| committer | Eugene Sandulenko | 2005-10-17 14:20:18 +0000 | 
| commit | b4a4f779e3f45e5034f5985a5bc50d4dfb9b06f0 (patch) | |
| tree | 512d19c187e87c9f1438d058e493e57a786f40f6 | |
| parent | f3c387f328123a8ed15fa45a9008033dc06aed8f (diff) | |
| download | scummvm-rg350-b4a4f779e3f45e5034f5985a5bc50d4dfb9b06f0.tar.gz scummvm-rg350-b4a4f779e3f45e5034f5985a5bc50d4dfb9b06f0.tar.bz2 scummvm-rg350-b4a4f779e3f45e5034f5985a5bc50d4dfb9b06f0.zip  | |
Fix walking in IHNM. It appeared that BG mask wasn't flipped upside down
when everything else is :).
svn-id: r19136
| -rw-r--r-- | saga/image.cpp | 4 | ||||
| -rw-r--r-- | saga/saga.h | 2 | ||||
| -rw-r--r-- | saga/scene.cpp | 2 | 
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.  | 
