Re: [cc65] Colormania (was: TGI summary)

From: Oliver Schmidt <ol.sc1web.de>
Date: 2009-11-01 23:27:53
Hi Uz,

> If we make sure that drivers for one platform have common colors at the same
> indices (this may be done internally in the driver by a color remap table),
> all we need are platform specific defines and we're done. This will probably
> force TGI_COLOR_WHITE to be always 1, because it's usually the foreground
> color for a two color driver. Platforms like the Atari, where white may
> actually be represented by $0E may use a replacement table in the driver that
> maps 0 => 0 for black and 1 => $0E for white.

This approach we kind of agreed on has a disadvantage I just
discovered. tgi_init() contains the following code:

; Set the drawing color to the maximum color

@L1:    ldx     _tgi_colorcount
        dex
        txa
        jsr     _tgi_setcolor           ; tgi_setcolor (tgi_getmaxcolor ());

Now ... if drivers having more colors share their color macros with
drivers having less colors (and remap the values internally) than
white obviously won't be the maximum color for those drivers anymore.
So the code above doesn't set white anymore - but was is it actually
supposed to do so ?!?

Best, Oliver
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Sun Nov 1 23:27:58 2009

This archive was generated by hypermail 2.1.8 : 2009-11-01 23:28:00 CET