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

From: Greg King <greg.king41verizon.net>
Date: 2011-05-25 15:03:20
From: "Ullrich von Bassewitz"; on Tue., May 24, 2011; at 12:39 PM -0400
>
> On Tue, May 24, 2011 at 07:00:34AM -0400, Greg King wrote:
> > But, a program still needs to know _when_ it happens!
>
> Why? If this happens, there's not much a program can do, anyway.

I previously gave an example of a program that does need to do something
about an approximation.  That program wants to use a light/bright color
to highlight one of the graphics objects on its screen.  But, a driver
might not support light colors.  Therefore, it would substitute the dark
version of that color.  The program needs to know about that act, so
that it can choose a different method of highlighting that graphics
object (when it is using that particular driver).

>
> And, please note that the problem does only hit portable programs that
> run on new/unknown platforms or with new/unknown drivers. A program
> written with knowledge of the platform will, of course, know that it
> will get orange instead of red on an Apple, and act accordingly -- if
> this is really necessary. The difference to the scenario above is that
> the program does not get just an abstract error-code ("What I got is
> not red, but some other, unknown, but hopefully similar, color") which
> cannot be handled in a reasonable way; but, knows "Ahh, this is the
> Apple; so, I allocated red, but got orange".

That can be true when the platform has only one kind of driver; but, the
Atari platform has many different kinds.  A versatile program might ask
the user which of those drivers he wants to use.  Then, it would load,
and adjust itself to, that driver.  That is why TGI has functions that
describe the driver's characteristics.  It shouldn't be the job of the
program to know, ahead of time, _everything_ about _every_ TGI driver
that it might use.  It should be the job of each driver to "explain"
itself.  That explanation should include alerting the program when the
driver approximates a color!

----------------------------------------------------------------------
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 25 15:06:21 2011

This archive was generated by hypermail 2.1.8 : 2011-05-25 15:06:25 CEST