Re: [cc65] TGI palettes (was: TGI colors revisited)

From: Daniel Serpell <daniel.serpell1gmail.com>
Date: 2011-05-11 18:45:48
Hi,

On Wed, May 11, 2011 at 12:29 PM, Oliver Schmidt <ol.sc@web.de> wrote:
> Hi Daniel,
>
>> Problem is that there is no simple way to go from R,G,B to
>> a palette color in many drivers (ie, c64 and atari), so you
>> put a lot of code in the driver and slow down the application.
>
> Full ACK.
>
>> Using the TGI_COLOR_* macros you can map the value
>> of the macro directly to the palette color, using char, int or
>> long depending on the platform.
>>
>> In Atari, you could define TGI_COLOR_BLUE to 148,
>> TGI_COLOR to 34, etc.
>
> I've been thinking about this approach too. It has the downside that
> you can't use TGI_COLOR_... macros anymore as palette indexes (see my
> OP). But maybe the benefits outweight this downside. I'm personally
> open to that direction...

Also, in platforms with fixed colors, you could define tgi_alloccolor (from my
previous email) as a NOP, so there is no overhead.

Regards,
    Daniel.
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Wed May 11 18:45:58 2011

This archive was generated by hypermail 2.1.8 : 2011-05-11 18:46:00 CEST