General Stuff about Armagetron, That doesn't belong anywhere else...
tonybbb
Average Program
Posts: 64 Joined: Sun Aug 26, 2007 5:24 am
Post
by tonybbb » Wed Nov 28, 2007 12:29 am
How do u make a highlight with a color code besides 0x00000
Signature:
Lucifer
Project Developer
Posts: 8751 Joined: Sun Aug 15, 2004 3:32 pm
Location: Republic of Texas
Post
by Lucifer » Wed Nov 28, 2007 4:35 am
Change the numbers after the x.
kyle
Reverse Outside Corner Grinder
Posts: 1975 Joined: Thu Jun 08, 2006 3:33 pm
Location: Indiana, USA, Earth, Milky Way Galaxy, Universe, Multiverse
Contact:
Post
by kyle » Wed Nov 28, 2007 5:17 am
0xaa0000 red on white
you figure out the rest
Concord
Reverse Outside Corner Grinder
Posts: 1661 Joined: Sun Oct 21, 2007 5:24 pm
Post
by Concord » Wed Nov 28, 2007 1:00 pm
0x666666 works
epsy
Adjust Outside Corner Grinder
Posts: 2003 Joined: Tue Nov 07, 2006 6:02 pm
Location: paris
Contact:
Post
by epsy » Fri Nov 30, 2007 7:46 pm
i'm wondering what's the algorithm to display the white background or not...
Jonathan
A Brave Victim
Posts: 3391 Joined: Thu Feb 03, 2005 12:50 am
Location: Not really lurking anymore
Post
by Jonathan » Sat Dec 01, 2007 1:15 am
Code: Select all
FONT_MIN_R 0.5
FONT_MIN_G 0.5
FONT_MIN_B 0.5
FONT_MIN_TOTAL 0.7
Color components are scaled to 0-1.
if(r < FONT_MIN_R && g < FONT_MIN_G && b < FONT_MIN_B || r + g + b < FONT_MIN_TOTAL)
add background
tonybbb
Average Program
Posts: 64 Joined: Sun Aug 26, 2007 5:24 am
Post
by tonybbb » Sat Dec 01, 2007 1:22 am
Yeah then what am i supposed to do? what is this
if(r < FONT_MIN_R && g < FONT_MIN_G && b < FONT_MIN_B || r + g + b < FONT_MIN_TOTAL)
add background
Signature:
Jonathan
A Brave Victim
Posts: 3391 Joined: Thu Feb 03, 2005 12:50 am
Location: Not really lurking anymore
Post
by Jonathan » Sat Dec 01, 2007 1:30 am
It's C-like. Basically the game's source but changed a bit for brevity. && (AND) has precedence over || (OR). The uppercase names are settings in the source version I checked. [rgb] are obviously the color being tested.
tonybbb
Average Program
Posts: 64 Joined: Sun Aug 26, 2007 5:24 am
Post
by tonybbb » Sat Dec 01, 2007 5:33 pm
oo
Signature:
Concord
Reverse Outside Corner Grinder
Posts: 1661 Joined: Sun Oct 21, 2007 5:24 pm
Post
by Concord » Sat Dec 01, 2007 11:54 pm
translated
into english
its saying
Code: Select all
if the red value is less than FONT_MIN_R setting and the green value is less than FONT_MIN_G setting the blue value is less than FONT_MIN_B setting, or if the red value plus the green value plus the blue value is less than FONT_MIN_TOTAL, then a background is added.
tonybbb
Average Program
Posts: 64 Joined: Sun Aug 26, 2007 5:24 am
Post
by tonybbb » Sun Dec 02, 2007 9:55 pm
oh ok Awesome
Signature: