ColourTrans_SetGCOL
Philip Ludlam
philip at philipnet.com
Sat Dec 16 17:16:58 GMT 2006
On 30 Oct, Tony van der Hoff wrote:
>On 28 Oct at 3:22 Christian Ludlam <christian at recoil.org> wrote in message
><5ffcab7c4e.christian at venice.lab>
>
>> Hi,
>>
>> colourtrans_gcol_flags, as used in R3 in colourtrans_set_gcol() should
>> have bit 7 meaning "set background colour" as well as the ECF flag in bit
>> 8.
>>
>
>Woo, there's a bug lurking undiscovered since the dawn of time:
>
>TYPE ColourTrans_GCOLFlags = .Bits;
>CONST
> //for SetGCOL
> ColourTrans_SetFG = ColourTrans_GCOLFlags: 0,
> ColourTrans_SetBG = ColourTrans_GCOLFlags: 0b10000000,
> ColourTrans_UseECFS = ColourTrans_GCOLFlags: 0b100000000,
> ColourTrans_SetText = ColourTrans_GCOLFlags: 0b1000000000;
>
>which is later overwritten by this:
>
>TYPE ColourTrans_TextColourFlags = .Bits;
>CONST
> //for SetTextColour
> ColourTrans_SetFG = ColourTrans_TextColourFlags: 0,
> ColourTrans_SetBG = ColourTrans_TextColourFlags: 0b10000000;
>
>resulting in C:
>
>#define colourtrans_SET_FG ((colourtrans_text_colour_flags) 0x0u)
>#define colourtrans_SET_BG ((colourtrans_text_colour_flags) 0x80u)
>#define colourtrans_USE_ECFS ((colourtrans_gcol_flags) 0x100u)
>#define colourtrans_SET_TEXT ((colourtrans_colour_flags) 0x200u)
>
>Seeing as this has never been noticed before, I guess it's safe to rename
>the former, even if they are the same thing, thus:
> ColourTrans_SetFGCol = ColourTrans_GCOLFlags: 0,
> ColourTrans_SetBGCol = ColourTrans_GCOLFlags: 0b10000000,
> ColourTrans_UseECFS = ColourTrans_GCOLFlags: 0b100000000,
> ColourTrans_SetText = ColourTrans_GCOLFlags: 0b1000000000;
>
>The question is whether to add "Col" to the last two names for consistency,
>bearing in mind that DefMod will treat SetTextCol differently to the rest (I
>think).
>
>Comments, please?
Hey,
I guess there hasn't been many comments then ;-) .
Personally, I think it'll be overkill to append 'Col' to the last two
for consistency sake.
Does DefMod really treat SetTextCol different to the rest?
Yours,
Phil L.
--
http://www.philipnet.com/ | http://director.sourceforge.net/
http://www.windowsadvice.com/blogs/philipnet/
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
More information about the oslib-user
mailing list