2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
6 #include "icon_intern.h"
8 #define EFFECT_NONE (0)
9 #define EFFECT_LIGHTEN (1)
10 #define EFFECT_TINT_BLUE (2)
11 #define EFFECT_XOR (3)
13 #define EFFECT EFFECT_LIGHTEN
15 /*****************************************************************************
19 AROS_LH1(VOID
, ChangeToSelectedIconColor
,
22 AROS_LHA(struct ColorRegister
*, cr
, A0
),
25 struct Library
*, IconBase
, 33, Icon
)
28 Change a color register for selected icon state.
31 cr - colorregister to be changed.
45 *****************************************************************************/
49 #if EFFECT == EFFECT_LIGHTEN
50 cr
->red
= (cr
->red
>> 1) + (0xFF >> 1);
51 cr
->green
= (cr
->green
>> 1) + (0xFF >> 1);
52 cr
->blue
= (cr
->blue
>> 1) + (0xFF >> 1);
53 #elif EFFECT == EFFECT_TINT_BLUE
54 cr
->red
= (cr
->red
>> 1);
55 cr
->green
= (cr
->green
>> 1);
56 cr
->blue
= (cr
->blue
>> 1) + (0xFF >> 2);
57 #elif EFFECT == EFFECT_XOR
58 cr
->red
= cr
->red
^ 0xFF;
59 cr
->green
= cr
->green
^ 0xFF;
60 cr
->blue
= cr
->blue
^ 0xFF;
64 } /* ChangeToSelectedIconColor() */