diff options
Diffstat (limited to 'backends')
| -rw-r--r-- | backends/platform/n64/osys_n64.h | 5 | ||||
| -rw-r--r-- | backends/platform/wii/osystem_gfx.cpp | 17 | 
2 files changed, 14 insertions, 8 deletions
diff --git a/backends/platform/n64/osys_n64.h b/backends/platform/n64/osys_n64.h index 5264a8a82e..e5ffc7f3bc 100644 --- a/backends/platform/n64/osys_n64.h +++ b/backends/platform/n64/osys_n64.h @@ -111,7 +111,10 @@ protected:  	bool _cursorPaletteDisabled;  	bool _dirtyPalette; -	uint _cursorWidth, _cursorHeight; +	// FIXME: This must be left as "int" for now, to fix the sign-comparison problem +	// there is a little more work involved than an int->uint change +	int _cursorWidth, _cursorHeight; +	  	int _cursorKeycolor;  	uint16	_overlayHeight, _overlayWidth; diff --git a/backends/platform/wii/osystem_gfx.cpp b/backends/platform/wii/osystem_gfx.cpp index 09575bb83d..4a925a60c9 100644 --- a/backends/platform/wii/osystem_gfx.cpp +++ b/backends/platform/wii/osystem_gfx.cpp @@ -333,16 +333,19 @@ void OSystem_Wii::setPalette(const byte *colors, uint start, uint num) {  	gfx_tex_flush_palette(&_texGame); +	s = colors; +	d = _cursorPalette; + +	for (uint i = 0; i < num; ++i) { +		d[start + i] = Graphics::ARGBToColor<Graphics::ColorMasks<3444> >(0xff, s[0], s[1], s[2]); +		s += 4; +	} +  	if (_cursorPaletteDisabled) {  		assert(_texMouse.palette); -		s = colors; -		d = _texMouse.palette; - -		for (uint i = 0; i < num; ++i) { -			d[start + i] = Graphics::ARGBToColor<Graphics::ColorMasks<3444> >(0xff, s[0], s[1], s[2]); -			s += 4; -		} +		memcpy((u8 *)_texMouse.palette + start * 2, +			(u8 *)_cursorPalette + start * 2, num * 2);  		_cursorPaletteDirty = true;  	}  | 
