diff options
| author | Travis Howell | 2009-03-17 05:29:59 +0000 | 
|---|---|---|
| committer | Travis Howell | 2009-03-17 05:29:59 +0000 | 
| commit | cb837c3fe030e2a975727f94889e78b2338db8ca (patch) | |
| tree | 95a6cd738f9381cb03274872104fd34d2e48ea91 | |
| parent | e47c9189d4939d5651a0e026bb3cfa59f7815ba5 (diff) | |
| download | scummvm-rg350-cb837c3fe030e2a975727f94889e78b2338db8ca.tar.gz scummvm-rg350-cb837c3fe030e2a975727f94889e78b2338db8ca.tar.bz2 scummvm-rg350-cb837c3fe030e2a975727f94889e78b2338db8ca.zip | |
Fix regression, caused by my change to adjustForPalette().
svn-id: r39472
| -rw-r--r-- | engines/parallaction/disk.h | 2 | ||||
| -rw-r--r-- | engines/parallaction/disk_br.cpp | 11 | 
2 files changed, 6 insertions, 7 deletions
| diff --git a/engines/parallaction/disk.h b/engines/parallaction/disk.h index 7bad24fad1..d9f343ec49 100644 --- a/engines/parallaction/disk.h +++ b/engines/parallaction/disk.h @@ -253,7 +253,7 @@ protected:  	Sprites*	createSprites(Common::ReadStream &stream);  	Font *createFont(const char *name, Common::SeekableReadStream &stream);  	void loadBackground(BackgroundInfo& info, const char *filename); -	void adjustForPalette(Graphics::Surface &surf, int move); +	void adjustForPalette(Graphics::Surface &surf, int transparentColor = -1);  public:  	AmigaDisk_br(Parallaction *vm); diff --git a/engines/parallaction/disk_br.cpp b/engines/parallaction/disk_br.cpp index cd8cab276d..3debf6e354 100644 --- a/engines/parallaction/disk_br.cpp +++ b/engines/parallaction/disk_br.cpp @@ -443,13 +443,12 @@ void AmigaDisk_br::init() {  		_sset.add(subDirNames[i], _baseDir->getSubDirectory(subDirPrefixes[i], subDirNames[i], 2), 6);  } -void AmigaDisk_br::adjustForPalette(Graphics::Surface &surf, int move) { +void AmigaDisk_br::adjustForPalette(Graphics::Surface &surf, int transparentColor) {  	uint size = surf.w * surf.h;  	byte *data = (byte*)surf.pixels; -	// Color zero is used for transparency, and shouldn't be adjusted  	for (uint i = 0; i < size; i++, data++) { -		if (*data) -			*data += move; +		if (transparentColor == -1 || transparentColor != *data) +			*data += 16;  	}  } @@ -509,7 +508,7 @@ void AmigaDisk_br::loadBackground(BackgroundInfo& info, const char *filename) {  	free(pal);  	// background data is drawn used the upper portion of the palette -	adjustForPalette(info.bg, 16); +	adjustForPalette(info.bg);  } @@ -570,7 +569,7 @@ GfxObj* AmigaDisk_br::loadStatic(const char* name) {  	decoder.decode();  	// static pictures are drawn used the upper half of the palette -	adjustForPalette(*surf, 16); +	adjustForPalette(*surf, 0);  	free(pal);  	delete stream; | 
