Hi, On Wed, May 11, 2011 at 10:29 AM, Karri Kaksonen <karri@sipo.fi> wrote: > On 05/11/2011 02:33 PM, Oliver Schmidt wrote: >> >> Ideas, comments, opinions, objections? >> > > From the programmers point of view I would scrap the concept of > TGI_COLOR_RED completely. > > Instead I would have pens. > > tgi_setpen(index, R, G, B); > tgi_setpen(index, intensity); // For bw display > > To draw in black I could write: > > tgi_setpen(0, 0); > > White would be > > tgi_setpen(1, 255); > > Red could be > > tgi_setpen(2, 255, 0, 0); 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. 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. 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 16:49:58 2011
This archive was generated by hypermail 2.1.8 : 2011-05-11 16:50:01 CEST