Re: [cc65] TGI summary

From: Karri Kaksonen <karri1sipo.fi>
Date: 2009-10-27 06:59:02
Daniel Serpell wrote:
> I think some conventions could be enforced:
>
> * The default palette should be (approximately) the same in all drivers:
>   0 = black
>   1 = white
>   2 = ....
>
> * If the driver has no palette, it can emulate the above by replacing the
>   indexes in setcolor.
>   

The Lynx can map the colors to any indexes. The only limitation is pen 0 
that is the only one that can hold "transparent" color. Therefore 
COLOR_BLACK may need to be duplicated somewhere else if we need black in 
a sprite with transparency.

On the other hand TGI knows nothing about transparent colors anyway.

If it helps then the Lynx implementation can agree on a default palette.

/* Color defines (default palette) */

#define COLOR_BLACK             0x00
#define COLOR_RED               0x01
#define COLOR_BLUE              0x02
#define COLOR_GREEN             0x03
#define COLOR_VIOLET            0x04
#define COLOR_PURPLE            COLOR_VIOLET
#define COLOR_CYAN              0x05
#define COLOR_PEAGREEN          0x06
#define COLOR_GREY              0x07
#define COLOR_NAVYBLUE          0x08
#define COLOR_LIGHTRED          0x09
#define COLOR_LIGHTBLUE         0x0A
#define COLOR_LIGHTGREEN        0x0B
#define COLOR_LIGHTPURPLE       0x0C
#define COLOR_LIGHTCYAN         0x0D
#define COLOR_YELLOW            0x0E
#define COLOR_WHITE             0x0F

At least we need
COLOR_BLACK, COLOR_WHITE, COLOR_GREY

It is also good to have
COLOR_RED, COLOR_GREEN, COLOR_BLUE, COLOR_YELLOW

So how about agreeing of these indexes:
#define COLOR_BLACK             0x00
#define COLOR_WHITE             0x01
#define COLOR_GREY              0x02
#define COLOR_RED               0x03
#define COLOR_GREEN             0x04
#define COLOR_BLUE              0x05
#define COLOR_YELLOW            0x06
#define COLOR_NAVYBLUE          0x07

That would be 8 cool, usable colors.

If some platform has hard-coded color indexes then we could adapt to 
these indexes.
--
Regards,

Karri



The rest is really garbage in my opinion.

--
Regards,

Karri


----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Tue Oct 27 06:59:13 2009

This archive was generated by hypermail 2.1.8 : 2009-10-27 06:59:16 CET