From c17ce48de94d95ad55f2da44d157b51f1a523c3f Mon Sep 17 00:00:00 2001 From: neil Date: Sat, 13 Oct 2012 09:04:03 +0000 Subject: [PATCH] - Removed unnecessary casts. - SetRGB4CM(): corrected colour-shift offsets. git-svn-id: https://svn.aros.org/svn/aros/trunk/AROS@45898 fb15a70f-31f2-0310-bbcc-cdcc74a49acc --- rom/graphics/setrgb32cm.c | 18 +++++++++--------- rom/graphics/setrgb4cm.c | 8 ++++---- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/rom/graphics/setrgb32cm.c b/rom/graphics/setrgb32cm.c index 8b5ac3c40a..5ce64b966d 100644 --- a/rom/graphics/setrgb32cm.c +++ b/rom/graphics/setrgb32cm.c @@ -1,5 +1,5 @@ /* - Copyright © 1995-2010, The AROS Development Team. All rights reserved. + Copyright © 1995-2012, The AROS Development Team. All rights reserved. $Id$ Desc: Graphics function SetRGB32CM() @@ -64,17 +64,17 @@ /* Preserve the highest nibble. Needed for interoperability with m68k graphics.library. Exact purpose is currently unknown - sonic */ - UWORD a = ((UWORD *)cm->ColorTable)[n]; + UWORD a = cm->ColorTable[n]; - ((UWORD *)cm->ColorTable)[n] = (a & 0xF000) | - ((r >> 20) & 0x0f00) | - ((g >> 24) & 0x00f0) | - ((b >> 28) & 0x000f); + cm->ColorTable[n] = (a & 0xF000) | + ((r >> 20) & 0x0f00) | + ((g >> 24) & 0x00f0) | + ((b >> 28) & 0x000f); if (cm->Type > COLORMAP_TYPE_V1_2) - ((UWORD *)cm->LowColorBits)[n] = ((r >> 16) & 0x0f00) | - ((g >> 20) & 0x00f0) | - ((b >> 24) & 0x000f); + cm->LowColorBits[n] = ((r >> 16) & 0x0f00) | + ((g >> 20) & 0x00f0) | + ((b >> 24) & 0x000f); } AROS_LIBFUNC_EXIT diff --git a/rom/graphics/setrgb4cm.c b/rom/graphics/setrgb4cm.c index 288e8e014f..c2e498c86a 100644 --- a/rom/graphics/setrgb4cm.c +++ b/rom/graphics/setrgb4cm.c @@ -1,5 +1,5 @@ /* - Copyright © 1995-2010, The AROS Development Team. All rights reserved. + Copyright © 1995-2012, The AROS Development Team. All rights reserved. $Id$ Desc: Graphics function SetRGB4CM() @@ -63,12 +63,12 @@ /* Preserve the highest nibble. Needed for interoperability with m68k graphics.library. Exact purpose is currently unknown - sonic */ - UWORD a = ((UWORD *)cm->ColorTable)[n] & 0xF000; + UWORD a = cm->ColorTable[n] & 0xF000; - ((UWORD *)cm->ColorTable)[n] = a | (r << 16) | (g << 8) | b; + cm->ColorTable[n] = a | (r << 8) | (g << 4) | b; if (cm->Type > COLORMAP_TYPE_V1_2) - ((UWORD *)cm->LowColorBits)[n] = 0; + cm->LowColorBits[n] = 0; } AROS_LIBFUNC_EXIT -- 2.11.4.GIT