[nexuiz-commits] r6980 - trunk/data/gfx

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Thu Jun 11 07:00:33 EDT 2009


Author: div0
Date: 2009-06-11 07:00:33 -0400 (Thu, 11 Jun 2009)
New Revision: 6980

Modified:
   trunk/data/gfx/colormap_palette.lmp
   trunk/data/gfx/colormap_palette.pl
Log:
fix the recently committed palette


Modified: trunk/data/gfx/colormap_palette.lmp
===================================================================
(Binary files differ)

Modified: trunk/data/gfx/colormap_palette.pl
===================================================================
--- trunk/data/gfx/colormap_palette.pl	2009-06-11 10:23:56 UTC (rev 6979)
+++ trunk/data/gfx/colormap_palette.pl	2009-06-11 11:00:33 UTC (rev 6980)
@@ -22,15 +22,22 @@
 
 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;
-	printf "%c%c%c", map { int(0.5 + $value_min + ($_ * 1.0 / 0xFF) * ($value_max - $value_min)) } $r, $g, $b;
+	$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";



More information about the nexuiz-commits mailing list