shroud: it works. perf is pretty ugly, and there are a lot of small bugs.

This commit is contained in:
Chris Forbes
2010-01-05 22:12:22 +13:00
parent 27b2d20cab
commit 77da5c89de
11 changed files with 142 additions and 5 deletions

View File

@@ -0,0 +1,32 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;
namespace OpenRa.FileFormats
{
public class ShroudPaletteRemap : IPaletteRemap
{
public Color GetRemappedColor(Color original, int index)
{
// false-color version for debug
//return new[] {
// Color.Orange, Color.Green,
// Color.Blue, Color.Yellow,
// Color.Black,
// Color.Red,
// Color.Purple,
// Color.Cyan}[index % 8];
return new[] {
Color.Transparent, Color.Green,
Color.Blue, Color.Yellow,
Color.Black,
Color.FromArgb(192,0,0,0),
Color.FromArgb(128,0,0,0),
Color.FromArgb(64,0,0,0)}[index % 8];
}
}
}