From 4c26710ccb12243a1aa9415763de0b946edf8eba Mon Sep 17 00:00:00 2001 From: Chris Forbes Date: Fri, 21 Oct 2011 22:11:40 +1300 Subject: [PATCH] swap args to PlayerColorRemap --- OpenRA.Editor/Surface.cs | 2 +- OpenRA.FileFormats/PlayerColorRemap.cs | 2 +- OpenRA.Game/Traits/World/PlayerColorPalette.cs | 2 +- OpenRA.Mods.RA/ColorPickerPaletteModifier.cs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/OpenRA.Editor/Surface.cs b/OpenRA.Editor/Surface.cs index b1c8d7f5e0..f030b4a61e 100755 --- a/OpenRA.Editor/Surface.cs +++ b/OpenRA.Editor/Surface.cs @@ -306,7 +306,7 @@ namespace OpenRA.Editor { var pr = Map.Players[name]; var pcpi = Rules.Info["player"].Traits.Get(); - var remap = new PlayerColorRemap(pr.ColorRamp, pcpi.PaletteFormat); + var remap = new PlayerColorRemap(pcpi.PaletteFormat, pr.ColorRamp); return new Palette(Palette, remap).AsSystemPalette(); } diff --git a/OpenRA.FileFormats/PlayerColorRemap.cs b/OpenRA.FileFormats/PlayerColorRemap.cs index 17cc611597..ff303575e1 100755 --- a/OpenRA.FileFormats/PlayerColorRemap.cs +++ b/OpenRA.FileFormats/PlayerColorRemap.cs @@ -21,7 +21,7 @@ namespace OpenRA.FileFormats { Dictionary remapColors; - public PlayerColorRemap(ColorRamp c, PaletteFormat fmt) + public PlayerColorRemap(PaletteFormat fmt, ColorRamp c) { var c1 = c.GetColor(0); var c2 = c.GetColor(1); /* temptemp: this can be expressed better */ diff --git a/OpenRA.Game/Traits/World/PlayerColorPalette.cs b/OpenRA.Game/Traits/World/PlayerColorPalette.cs index 0d925324e6..19c7d256af 100644 --- a/OpenRA.Game/Traits/World/PlayerColorPalette.cs +++ b/OpenRA.Game/Traits/World/PlayerColorPalette.cs @@ -37,7 +37,7 @@ namespace OpenRA.Traits { var paletteName = "{0}{1}".F( info.BaseName, owner.InternalName ); var newpal = new Palette(wr.GetPalette(info.BasePalette), - new PlayerColorRemap(owner.ColorRamp, info.PaletteFormat)); + new PlayerColorRemap(info.PaletteFormat, owner.ColorRamp)); wr.AddPalette(paletteName, newpal); } } diff --git a/OpenRA.Mods.RA/ColorPickerPaletteModifier.cs b/OpenRA.Mods.RA/ColorPickerPaletteModifier.cs index b8db9393b2..2f4f9937bd 100644 --- a/OpenRA.Mods.RA/ColorPickerPaletteModifier.cs +++ b/OpenRA.Mods.RA/ColorPickerPaletteModifier.cs @@ -41,7 +41,7 @@ namespace OpenRA.Mods.RA public void AdjustPalette(Dictionary palettes) { palettes["colorpicker"] = new Palette(palettes["colorpicker"], - new PlayerColorRemap(Ramp, format)); + new PlayerColorRemap(format, Ramp)); } } }