delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/03/10/06:07:03

Message-ID: <8D53104ECD0CD211AF4000A0C9D60AE362A8E3@probe-2.acclaim-euro.net>
From: Shawn Hargreaves <ShawnH AT Probe DOT co DOT uk>
To: djgpp AT delorie DOT com
Subject: Re: colors from hex to dec - newbee -major stumped
Date: Wed, 10 Mar 1999 11:03:15 -0000
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.0.1460.8)
Reply-To: djgpp AT delorie DOT com

> in allegro text grey is
> rgb = grey(32,32,32)
> 
> but
> in a dialog i cant do &grey for [].bg = &grey
> i tryed to put 323232 for bg and it worked but the color wasnt grey

No, it wouldn't be. You can't precalculate and hardcode the bit pattern
for a color, because this varies depending on the video mode and your
graphics hardware, for example the makecol() function is quite likely
to return a totally different value on my machine to what it does on
yours. So you can't store these numbers directly into an initialised
array, but will have to calculate them after you set the video mode,
using makecol().


	Shawn Hargreaves.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019