fix trailing whitespace everywhere

This commit is contained in:
Chris Forbes
2011-09-25 14:37:12 +13:00
parent 0eb98ef3b5
commit 55036cd58c
596 changed files with 3194 additions and 3194 deletions

View File

@@ -1,7 +1,7 @@
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
@@ -21,18 +21,18 @@ namespace OpenRA.Graphics
{
public const int MaxPalettes = 256;
int allocated = 0;
ITexture texture;
Dictionary<string, Palette> palettes;
Dictionary<string, int> indices;
public HardwarePalette()
{
palettes = new Dictionary<string, Palette>();
indices = new Dictionary<string, int>();
texture = Game.Renderer.Device.CreateTexture();
}
public Palette GetPalette(string name)
{
Palette ret;
@@ -48,12 +48,12 @@ namespace OpenRA.Graphics
throw new InvalidOperationException("Palette `{0}` does not exist".F(name));
return ret;
}
public void AddPalette(string name, Palette p)
{
if (palettes.ContainsKey(name))
throw new InvalidOperationException("Palette {0} has already been defined".F(name));
palettes.Add(name, p);
indices.Add(name, allocated++);
}
@@ -62,10 +62,10 @@ namespace OpenRA.Graphics
public void Update(IEnumerable<IPaletteModifier> paletteMods)
{
var copy = palettes.ToDictionary(p => p.Key, p => new Palette(p.Value));
foreach (var mod in paletteMods)
mod.AdjustPalette(copy);
foreach (var pal in copy)
{
var j = indices[pal.Key];
@@ -73,7 +73,7 @@ namespace OpenRA.Graphics
for (var i = 0; i < 256; i++)
data[j,i] = c[i];
}
// Doesn't work
texture.SetData(data);
Game.Renderer.PaletteTexture = texture;