From: MirceaKitsune Date: Tue, 31 Jan 2012 15:37:59 +0000 (+0200) Subject: Re-arrange player colors in rainbow order, as done in Xonotic X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=aaffdd2a7ff2e3f2e6aa39ea263521a2b7978975;p=voretournament%2Fvoretournament.git Re-arrange player colors in rainbow order, as done in Xonotic --- diff --git a/data/gfx/colormap_palette.lmp b/data/gfx/colormap_palette.lmp index 5450eedc..f798c8cc 100644 Binary files a/data/gfx/colormap_palette.lmp and b/data/gfx/colormap_palette.lmp differ diff --git a/data/gfx/colormap_palette.pl b/data/gfx/colormap_palette.pl index b9643fc8..07ad2de1 100644 --- a/data/gfx/colormap_palette.pl +++ b/data/gfx/colormap_palette.pl @@ -1,43 +1,56 @@ -use strict; -use warnings; - -my @colors = ( - 'cccccc', - '996600', - '00ff80', - '00ff00', - 'ff0000', - '00a8ff', # was: 0080ff, green increased - '00ffff', - '80ff00', - '8000ff', - 'ff00ff', - 'ff0080', - '999999', - 'ffff00', - '0050ff', # was: 0000ff, green increased so the color is perceptively just as bright as red (for teamplay) - 'ff8000', - '000000' -); - -my $value_min = 0x0F; -my $value_max = 0xFF; -my $value_smin = 0x00; -my $value_smax = 0xB3; - -my $i = 0; -my $pal_colormap = ""; -my $pal_scoreboard = ""; -for(@colors) -{ - /^(..)(..)(..)$/ or die "invalid color spec: $_"; - my $r = hex $1; - my $g = hex $2; - my $b = hex $3; - $pal_colormap .= sprintf "%c%c%c", map { int(0.5 + $value_min + ($_ * 1.0 / 0xFF) * ($value_max - $value_min)) } $r, $g, $b; - $pal_scoreboard .= sprintf "%c%c%c", map { int(0.5 + $value_smin + ($_ * 1.0 / 0xFF) * ($value_smax - $value_smin)) } $r, $g, $b; - printf STDERR "\t\tcase %2d: return '%f %f %f';\n", $i, $r / 0xFF, $g / 0xFF, $b / 0xFF; - ++$i; -} - -print "$pal_colormap$pal_scoreboard$pal_colormap$pal_scoreboard"; +use strict; +use warnings; + +# Colors: +# red +# ORANGE1 +# ORANGE2 +# yellow +# yellowgreen +# green +# cyangreen +# cyan +# CYANBLUE1 +# CYANBLUE2 +# blue +# bluemagenta +# magenta +# redmagenta + +my @colors = ( + 'ffffff', # white + 'ff5500', # orange1 + '00ff80', # cyangreen + '00ff00', # green + 'ff0000', # red + '00aaff', # cyanblue1 + '00ffff', # cyan + '80ff00', # yellowgreen + '8000ff', # bluemagenta + 'ff00ff', # magenta + 'ff0080', # redmagenta + '0000ff', # blue + 'ffff00', # yellow + '0055ff', # cyanblue2 + 'ffaa00', # orange2 + '000000' # unused +); + +my $value_min = 0x0F; +my $value_max = 0xFF; + +my $i = 0; +my $pal_colormap = ""; +my $pal_scoreboard = ""; +for(@colors) +{ + /^(..)(..)(..)$/ or die "invalid color spec: $_"; + my $r = hex $1; + my $g = hex $2; + my $b = hex $3; + $pal_colormap .= sprintf "%c%c%c", map { int(0.5 + $value_min + ($_ * 1.0 / 0xFF) * ($value_max - $value_min)) } $r, $g, $b; + printf STDERR "\t\tcase %2d: return '%f %f %f';\n", $i, $r / 0xFF, $g / 0xFF, $b / 0xFF; + ++$i; +} + +print "$pal_colormap$pal_colormap$pal_colormap$pal_colormap"; diff --git a/data/qcsrc/common/util.qc b/data/qcsrc/common/util.qc index bcd8465e..f592115d 100644 --- a/data/qcsrc/common/util.qc +++ b/data/qcsrc/common/util.qc @@ -280,21 +280,21 @@ vector colormapPaletteColor(float c, float isPants) { switch(c) { - case 0: return '0.800000 0.800000 0.800000'; - case 1: return '0.600000 0.400000 0.000000'; + case 0: return '1.000000 1.000000 1.000000'; + case 1: return '1.000000 0.333333 0.000000'; case 2: return '0.000000 1.000000 0.501961'; case 3: return '0.000000 1.000000 0.000000'; case 4: return '1.000000 0.000000 0.000000'; - case 5: return '0.000000 0.658824 1.000000'; + case 5: return '0.000000 0.666667 1.000000'; case 6: return '0.000000 1.000000 1.000000'; case 7: return '0.501961 1.000000 0.000000'; case 8: return '0.501961 0.000000 1.000000'; case 9: return '1.000000 0.000000 1.000000'; case 10: return '1.000000 0.000000 0.501961'; - case 11: return '0.600000 0.600000 0.600000'; + case 11: return '0.000000 0.000000 1.000000'; case 12: return '1.000000 1.000000 0.000000'; - case 13: return '0.000000 0.313725 1.000000'; - case 14: return '1.000000 0.501961 0.000000'; + case 13: return '0.000000 0.333333 1.000000'; + case 14: return '1.000000 0.666667 0.000000'; case 15: if(isPants) return diff --git a/data/qcsrc/menu/voret/colorbutton.c b/data/qcsrc/menu/voret/colorbutton.c index e694bbcb..89cc3a62 100644 --- a/data/qcsrc/menu/voret/colorbutton.c +++ b/data/qcsrc/menu/voret/colorbutton.c @@ -28,6 +28,28 @@ entity makeVoretColorButton(float theGroup, float theColor, float theValue) } void configureVoretColorButtonVoretColorButton(entity me, float theGroup, float theColor, float theValue) { + switch(theValue) + { + // rearrange 1..15 for rainbow order + case 1: theValue = 10; break; + case 2: theValue = 4; break; + case 3: theValue = 1; break; + case 4: theValue = 14; break; + case 5: theValue = 12; break; + case 6: theValue = 7; break; + case 7: theValue = 3; break; + case 8: theValue = 2; break; + case 9: theValue = 6; break; + case 10: theValue = 5; break; + case 11: theValue = 13; break; + case 12: theValue = 11; break; + case 13: theValue = 8; break; + case 14: theValue = 9; break; + case 15: theValue = 15; break; + default: + // no change + break; + } me.cvarName = "_cl_color"; me.cvarValueFloat = theValue; me.cvarPart = theColor; diff --git a/docs/TODO.txt b/docs/TODO.txt index 1fc98ccb..5de508db 100644 --- a/docs/TODO.txt +++ b/docs/TODO.txt @@ -104,8 +104,6 @@ - 0.7: Does r_viewfbo belong in the effect presets too? -- 0.7: Rearrange player colors and make them the same as in Xonotic. - - 0.7 | 0.8: Add cubemap reflections for eX and trak5 - 0.7 | 0.8: Maybe find better footstep sounds? @@ -124,4 +122,6 @@ - 0.7: Better portrait images. -- 0.7 BUG: If the player is dead, his display digits still appear on his third person model, visible with chase event camera \ No newline at end of file +- 0.7 BUG: If the player is dead, his display digits still appear on his third person model, visible with chase event camera + +- 0.7 BUG: Default player model is broken? \ No newline at end of file