support d2k remap range

This commit is contained in:
Paul Chote
2010-09-12 00:55:05 +12:00
parent 7e5b861caf
commit 629e73ac29
6 changed files with 13 additions and 10 deletions

View File

@@ -93,7 +93,7 @@ namespace OpenRA
{
var info = Rules.Info["world"].Traits.Get<PlayerColorPaletteInfo>();
var newpal = new Palette(world.WorldRenderer.GetPalette(info.BasePalette),
new PlayerColorRemap(Color, Color2, info.SplitRamp));
new PlayerColorRemap(Color, Color2, info.PaletteFormat));
world.WorldRenderer.AddPalette(palette, newpal);
}

View File

@@ -8,12 +8,13 @@
*/
#endregion
using OpenRA.FileFormats;
namespace OpenRA.Traits
{
{
public class PlayerColorPaletteInfo : TraitInfo<PlayerColorPalette>
{
public readonly string BasePalette = null;
public readonly bool SplitRamp = false;
public readonly PaletteFormat PaletteFormat = PaletteFormat.ra;
}
public class PlayerColorPalette {}