[Scummvm-cvs-logs] scummvm master -> 50129178efcd2a6defae679f059bd9de796a3122

dhewg dhewg at wiibrew.org
Mon Feb 14 22:12:51 CET 2011


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
50129178ef WII: Fix 16bit cursors on some HE games


Commit: 50129178efcd2a6defae679f059bd9de796a3122
    https://github.com/scummvm/scummvm/commit/50129178efcd2a6defae679f059bd9de796a3122
Author: dhewg (dhewg at wiibrew.org)
Date: 2011-02-14T13:12:30-08:00

Commit Message:
WII: Fix 16bit cursors on some HE games

Changed paths:
    backends/platform/wii/osystem_gfx.cpp



diff --git a/backends/platform/wii/osystem_gfx.cpp b/backends/platform/wii/osystem_gfx.cpp
index 09575bb..4a925a6 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;
 	}






More information about the Scummvm-git-logs mailing list