]> de.git.xonotic.org Git - voretournament/voretournament.git/commitdiff
Re-arrange player colors in rainbow order, as done in Xonotic
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Tue, 31 Jan 2012 15:37:59 +0000 (17:37 +0200)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Tue, 31 Jan 2012 15:37:59 +0000 (17:37 +0200)
data/gfx/colormap_palette.lmp
data/gfx/colormap_palette.pl
data/qcsrc/common/util.qc
data/qcsrc/menu/voret/colorbutton.c
docs/TODO.txt

index 5450eedccb108be6620d160edec6bedd08398144..f798c8cc845b97fa0d56481a369f1976ce859a9c 100644 (file)
Binary files a/data/gfx/colormap_palette.lmp and b/data/gfx/colormap_palette.lmp differ
index b9643fc8c0997b11ef0358632379bad1e2022fc7..07ad2de1142c640f30c387b969c2f97d86523c5e 100644 (file)
@@ -1,43 +1,56 @@
-use strict;\r
-use warnings;\r
-\r
-my @colors = (\r
-       'cccccc',\r
-       '996600',\r
-       '00ff80',\r
-       '00ff00',\r
-       'ff0000',\r
-       '00a8ff', # was: 0080ff, green increased\r
-       '00ffff',\r
-       '80ff00',\r
-       '8000ff',\r
-       'ff00ff',\r
-       'ff0080',\r
-       '999999',\r
-       'ffff00',\r
-       '0050ff', # was: 0000ff, green increased so the color is perceptively just as bright as red (for teamplay)\r
-       'ff8000',\r
-       '000000'\r
-);\r
-\r
-my $value_min = 0x0F;\r
-my $value_max = 0xFF;\r
-my $value_smin = 0x00;\r
-my $value_smax = 0xB3;\r
-\r
-my $i = 0;\r
-my $pal_colormap = "";\r
-my $pal_scoreboard = "";\r
-for(@colors)\r
-{\r
-       /^(..)(..)(..)$/ or die "invalid color spec: $_";\r
-       my $r = hex $1;\r
-       my $g = hex $2;\r
-       my $b = hex $3;\r
-       $pal_colormap .= sprintf "%c%c%c", map { int(0.5 + $value_min + ($_ * 1.0 / 0xFF) * ($value_max - $value_min)) } $r, $g, $b;\r
-       $pal_scoreboard .= sprintf "%c%c%c", map { int(0.5 + $value_smin + ($_ * 1.0 / 0xFF) * ($value_smax - $value_smin)) } $r, $g, $b;\r
-       printf STDERR "\t\tcase %2d: return '%f %f %f';\n", $i, $r / 0xFF, $g / 0xFF, $b / 0xFF;\r
-       ++$i;\r
-}\r
-\r
-print "$pal_colormap$pal_scoreboard$pal_colormap$pal_scoreboard";\r
+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";
index bcd8465e465e9a9c8b940ced2a74a5ad03b05ae5..f592115dc854e510f7a0c17d18ee9df45c6aa163 100644 (file)
@@ -280,21 +280,21 @@ vector colormapPaletteColor(float c, float isPants)
 {\r
        switch(c)\r
        {\r
-               case  0: return '0.800000 0.800000 0.800000';\r
-               case  1: return '0.600000 0.400000 0.000000';\r
+               case  0: return '1.000000 1.000000 1.000000';\r
+               case  1: return '1.000000 0.333333 0.000000';\r
                case  2: return '0.000000 1.000000 0.501961';\r
                case  3: return '0.000000 1.000000 0.000000';\r
                case  4: return '1.000000 0.000000 0.000000';\r
-               case  5: return '0.000000 0.658824 1.000000';\r
+               case  5: return '0.000000 0.666667 1.000000';\r
                case  6: return '0.000000 1.000000 1.000000';\r
                case  7: return '0.501961 1.000000 0.000000';\r
                case  8: return '0.501961 0.000000 1.000000';\r
                case  9: return '1.000000 0.000000 1.000000';\r
                case 10: return '1.000000 0.000000 0.501961';\r
-               case 11: return '0.600000 0.600000 0.600000';\r
+               case 11: return '0.000000 0.000000 1.000000';\r
                case 12: return '1.000000 1.000000 0.000000';\r
-               case 13: return '0.000000 0.313725 1.000000';\r
-               case 14: return '1.000000 0.501961 0.000000';\r
+               case 13: return '0.000000 0.333333 1.000000';\r
+               case 14: return '1.000000 0.666667 0.000000';\r
                case 15:\r
                        if(isPants)\r
                                return\r
index e694bbcb6c8c8110c180c97971623eb7174f1ff9..89cc3a62f0409a9935fe313b224107f8790f5f95 100644 (file)
@@ -28,6 +28,28 @@ entity makeVoretColorButton(float theGroup, float theColor, float theValue)
 }\r
 void configureVoretColorButtonVoretColorButton(entity me, float theGroup, float theColor, float theValue)\r
 {\r
+       switch(theValue)\r
+       {\r
+               // rearrange 1..15 for rainbow order\r
+               case  1: theValue = 10; break;\r
+               case  2: theValue =  4; break;\r
+               case  3: theValue =  1; break;\r
+               case  4: theValue = 14; break;\r
+               case  5: theValue = 12; break;\r
+               case  6: theValue =  7; break;\r
+               case  7: theValue =  3; break;\r
+               case  8: theValue =  2; break;\r
+               case  9: theValue =  6; break;\r
+               case 10: theValue =  5; break;\r
+               case 11: theValue = 13; break;\r
+               case 12: theValue = 11; break;\r
+               case 13: theValue =  8; break;\r
+               case 14: theValue =  9; break;\r
+               case 15: theValue = 15; break;\r
+               default:\r
+                       // no change\r
+                       break;\r
+       }\r
        me.cvarName = "_cl_color";\r
        me.cvarValueFloat = theValue;\r
        me.cvarPart = theColor;\r
index 1fc98ccb65b05720089e4c5145cbe7189706c184..5de508db9700fc20415bdf0faac31070d18e5543 100644 (file)
 \r
 - 0.7: Does r_viewfbo belong in the effect presets too?\r
 \r
-- 0.7: Rearrange player colors and make them the same as in Xonotic.\r
-\r
 - 0.7 | 0.8: Add cubemap reflections for eX and trak5\r
 \r
 - 0.7 | 0.8: Maybe find better footstep sounds?\r
 \r
 - 0.7: Better portrait images.\r
 \r
-- 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\r
+\r
+- 0.7 BUG: Default player model is broken?
\ No newline at end of file