Remove HSLColor.
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
#endregion
|
||||
|
||||
using OpenRA.Graphics;
|
||||
using OpenRA.Primitives;
|
||||
|
||||
namespace OpenRA.Traits
|
||||
{
|
||||
@@ -26,7 +27,7 @@ namespace OpenRA.Traits
|
||||
public readonly int[] RemapIndex = { };
|
||||
|
||||
[Desc("The fixed color to remap.")]
|
||||
public readonly HSLColor Color;
|
||||
public readonly Color Color;
|
||||
|
||||
[Desc("Luminosity range to span.")]
|
||||
public readonly float Ramp = 0.05f;
|
||||
|
||||
@@ -52,7 +52,7 @@ namespace OpenRA.Traits
|
||||
this.info = info;
|
||||
}
|
||||
|
||||
public void LoadPlayerPalettes(WorldRenderer wr, string playerName, HSLColor color, bool replaceExisting)
|
||||
public void LoadPlayerPalettes(WorldRenderer wr, string playerName, Color color, bool replaceExisting)
|
||||
{
|
||||
var basePalette = wr.Palette(info.BasePalette).Palette;
|
||||
ImmutablePalette pal;
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#endregion
|
||||
|
||||
using OpenRA.Graphics;
|
||||
using OpenRA.Primitives;
|
||||
|
||||
namespace OpenRA.Traits
|
||||
{
|
||||
@@ -43,7 +44,7 @@ namespace OpenRA.Traits
|
||||
this.info = info;
|
||||
}
|
||||
|
||||
public void LoadPlayerPalettes(WorldRenderer wr, string playerName, HSLColor color, bool replaceExisting)
|
||||
public void LoadPlayerPalettes(WorldRenderer wr, string playerName, Color color, bool replaceExisting)
|
||||
{
|
||||
var remap = new PlayerColorRemap(info.RemapIndex, color, info.Ramp);
|
||||
var pal = new ImmutablePalette(wr.Palette(info.BasePalette).Palette, remap);
|
||||
|
||||
@@ -33,9 +33,9 @@ namespace OpenRA.Traits
|
||||
this.info = info;
|
||||
}
|
||||
|
||||
public void LoadPlayerPalettes(WorldRenderer wr, string playerName, HSLColor color, bool replaceExisting)
|
||||
public void LoadPlayerPalettes(WorldRenderer wr, string playerName, Color color, bool replaceExisting)
|
||||
{
|
||||
var argb = (uint)Color.FromArgb(128, color.RGB).ToArgb();
|
||||
var argb = (uint)Color.FromArgb(128, color).ToArgb();
|
||||
var pal = new ImmutablePalette(Enumerable.Range(0, Palette.Size).Select(i => i == 0 ? 0 : argb));
|
||||
wr.AddPalette(info.BaseName + playerName, pal, false, replaceExisting);
|
||||
}
|
||||
|
||||
@@ -278,7 +278,7 @@ namespace OpenRA.Traits
|
||||
}
|
||||
|
||||
public interface ILoadsPalettes { void LoadPalettes(WorldRenderer wr); }
|
||||
public interface ILoadsPlayerPalettes { void LoadPlayerPalettes(WorldRenderer wr, string playerName, HSLColor playerColor, bool replaceExisting); }
|
||||
public interface ILoadsPlayerPalettes { void LoadPlayerPalettes(WorldRenderer wr, string playerName, Color playerColor, bool replaceExisting); }
|
||||
public interface IPaletteModifier { void AdjustPalette(IReadOnlyDictionary<string, MutablePalette> b); }
|
||||
public interface IPips { IEnumerable<PipType> GetPips(Actor self); }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user