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

From: Oliver Schmidt <>
Date: 2011-05-11 18:29:50
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...

To unsubscribe from the list send mail to with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Wed May 11 18:29:58 2011

This archive was generated by hypermail 2.1.8 : 2011-05-11 18:30:01 CEST