One more palette fix

This commit is contained in:
2020-05-20 01:03:40 +01:00
parent 597e346869
commit 48d098134e
3 changed files with 8 additions and 4 deletions

View File

@@ -4,7 +4,8 @@ import "image/color"
var ( var (
ChaosGatePalette = color.Palette{ ChaosGatePalette = color.Palette{
color.RGBA{R: 0, G: 0, B: 0, A: 255}, Transparent,
color.RGBA{R: 128, G: 0, B: 0, A: 255}, color.RGBA{R: 128, G: 0, B: 0, A: 255},
color.RGBA{R: 0, G: 128, B: 0, A: 255}, color.RGBA{R: 0, G: 128, B: 0, A: 255},
color.RGBA{R: 128, G: 128, B: 0, A: 255}, color.RGBA{R: 128, G: 128, B: 0, A: 255},

View File

@@ -4,7 +4,8 @@ import "image/color"
var ( var (
SoldiersAtWarPalette = color.Palette{ SoldiersAtWarPalette = color.Palette{
color.RGBA{R: 0, G: 0, B: 0, A: 255}, Transparent,
color.RGBA{R: 128, G: 0, B: 0, A: 255}, color.RGBA{R: 128, G: 0, B: 0, A: 255},
color.RGBA{R: 0, G: 128, B: 0, A: 255}, color.RGBA{R: 0, G: 128, B: 0, A: 255},
color.RGBA{R: 128, G: 128, B: 0, A: 255}, color.RGBA{R: 128, G: 128, B: 0, A: 255},

View File

@@ -23,11 +23,13 @@ import "image/color"
var ( var (
#{PALETTENAME}Palette = color.Palette{ #{PALETTENAME}Palette = color.Palette{
Transparent,
EOF EOF
# bytes.shift(3) # Ignore idx 0 so we can make it transparent bytes.read(3) # Ignore idx 0 so we can make it transparent
256.times do 255.times do
r, g, b = f.read(3).bytes r, g, b = f.read(3).bytes
puts "\t\tcolor.RGBA{R: #{r}, G: #{g}, B: #{b}, A: 255}," puts "\t\tcolor.RGBA{R: #{r}, G: #{g}, B: #{b}, A: 255},"