eliminate public CursorProvider.Palettes

don't hand over the cursor palette to the world renderer at all
still update worldrender palette (set and apply modifiers)
This commit is contained in:
Matthias Mailänder
2013-03-24 22:02:45 +01:00
parent ba12aafd78
commit 851512a84e
2 changed files with 7 additions and 5 deletions

View File

@@ -20,7 +20,6 @@ namespace OpenRA.Graphics
{
public static class CursorProvider
{
public static Dictionary<string, Palette> Palettes { get; private set; }
public static HardwarePalette Palette;
static Dictionary<string, CursorSequence> cursors;
@@ -36,12 +35,12 @@ namespace OpenRA.Graphics
ShadowIndex[ShadowIndex.Length - 1] = Convert.ToInt32(sequences.NodesDict["ShadowIndex"].Value);
}
Palettes = new Dictionary<string, Palette>();
var palettes = new Dictionary<string, Palette>();
foreach (var s in sequences.NodesDict["Palettes"].Nodes)
Palettes.Add(s.Key, new Palette(FileSystem.Open(s.Value.Value), ShadowIndex));
palettes.Add(s.Key, new Palette(FileSystem.Open(s.Value.Value), ShadowIndex));
Palette = new HardwarePalette();
foreach (var p in CursorProvider.Palettes)
foreach (var p in palettes)
Palette.AddPalette(p.Key, p.Value, false);
// Generate initial palette texture