diff options
| -rw-r--r-- | engines/parallaction/graphics.cpp | 22 | ||||
| -rw-r--r-- | engines/parallaction/graphics.h | 2 | 
2 files changed, 11 insertions, 13 deletions
| diff --git a/engines/parallaction/graphics.cpp b/engines/parallaction/graphics.cpp index 259ad84f69..020dcc9415 100644 --- a/engines/parallaction/graphics.cpp +++ b/engines/parallaction/graphics.cpp @@ -160,26 +160,24 @@ void Palette::fadeTo(const Palette& target, uint step) {  	return;  } -uint Palette::fillRGBA(byte *rgba) { +uint Palette::fillRGB(byte *rgb) {  	byte r, g, b; -	byte *hbPal = rgba + _colors * 4; +	byte *hbPal = rgb + _colors * 4;  	for (uint32 i = 0; i < _colors; i++) {  		r = (_data[i*3]   << 2) | (_data[i*3]   >> 4);  		g = (_data[i*3+1] << 2) | (_data[i*3+1] >> 4);  		b = (_data[i*3+2] << 2) | (_data[i*3+2] >> 4); -		rgba[i*4]   = r; -		rgba[i*4+1] = g; -		rgba[i*4+2] = b; -		rgba[i*4+3] = 0; +		rgb[i*3]   = r; +		rgb[i*3+1] = g; +		rgb[i*3+2] = b;  		if (_hb) { -			hbPal[i*4]   = r >> 1; -			hbPal[i*4+1] = g >> 1; -			hbPal[i*4+2] = b >> 1; -			hbPal[i*4+3] = 0; +			hbPal[i*3]   = r >> 1; +			hbPal[i*3+1] = g >> 1; +			hbPal[i*3+2] = b >> 1;  		}  	} @@ -222,9 +220,9 @@ void Palette::rotate(uint first, uint last, bool forward) {  void Gfx::setPalette(Palette pal) { -	byte sysPal[256*4]; +	byte sysPal[256*3]; -	uint n = pal.fillRGBA(sysPal); +	uint n = pal.fillRGB(sysPal);  	_vm->_system->getPaletteManager()->setPalette(sysPal, 0, n);  } diff --git a/engines/parallaction/graphics.h b/engines/parallaction/graphics.h index afabcad21c..d6732e6fe4 100644 --- a/engines/parallaction/graphics.h +++ b/engines/parallaction/graphics.h @@ -250,7 +250,7 @@ public:  	void setEntry(uint index, int red, int green, int blue);  	void makeGrayscale();  	void fadeTo(const Palette& target, uint step); -	uint fillRGBA(byte *rgba); +	uint fillRGB(byte *rgb);  	void rotate(uint first, uint last, bool forward);  }; | 
