Highlight on armagetron

General Stuff about Armagetron, That doesn't belong anywhere else...
Post Reply
User avatar
tonybbb
Average Program
Posts: 64
Joined: Sun Aug 26, 2007 5:24 am

Highlight on armagetron

Post by tonybbb »

How do u make a highlight with a color code besides 0x00000
Signature:
User avatar
Lucifer
Project Developer
Posts: 8751
Joined: Sun Aug 15, 2004 3:32 pm
Location: Republic of Texas

Post by Lucifer »

Change the numbers after the x.
Check out my YouTube channel: https://youtube.com/@davefancella?si=H--oCK3k_dQ1laDN

Be the devil's own, Lucifer's my name.
- Iron Maiden
User avatar
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 »

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 »

0x666666 works :twisted: :twisted:
epsy
Adjust Outside Corner Grinder
Posts: 2003
Joined: Tue Nov 07, 2006 6:02 pm
Location: paris
Contact:

Post by epsy »

i'm wondering what's the algorithm to display the white background or not...
User avatar
Jonathan
A Brave Victim
Posts: 3391
Joined: Thu Feb 03, 2005 12:50 am
Location: Not really lurking anymore

Post by Jonathan »

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
:|
User avatar
tonybbb
Average Program
Posts: 64
Joined: Sun Aug 26, 2007 5:24 am

Post by tonybbb »

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:
User avatar
Jonathan
A Brave Victim
Posts: 3391
Joined: Thu Feb 03, 2005 12:50 am
Location: Not really lurking anymore

Post by Jonathan »

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.
User avatar
tonybbb
Average Program
Posts: 64
Joined: Sun Aug 26, 2007 5:24 am

Post by tonybbb »

oo
Signature:
Concord
Reverse Outside Corner Grinder
Posts: 1661
Joined: Sun Oct 21, 2007 5:24 pm

Post by Concord »

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.
User avatar
tonybbb
Average Program
Posts: 64
Joined: Sun Aug 26, 2007 5:24 am

Post by tonybbb »

oh ok Awesome
Signature:
Post Reply