call refreshPalette in the right place. make Game.worldRenderer PRIVATE (yay)

This commit is contained in:
Bob
2010-10-12 01:41:42 +13:00
parent 6ea2a06e4b
commit 4cd3195f9f
3 changed files with 2 additions and 3 deletions

View File

@@ -32,7 +32,7 @@ namespace OpenRA
public static ModData modData;
public static World world;
public static WorldRenderer worldRenderer;
private static WorldRenderer worldRenderer;
public static Viewport viewport;
public static Settings Settings;

View File

@@ -73,7 +73,6 @@ namespace OpenRA.Graphics
Renderable[] worldSprites = { };
public void Tick()
{
RefreshPalette();
var bounds = GetBoundsRect();
var comparer = new SpriteComparer();
@@ -93,6 +92,7 @@ namespace OpenRA.Graphics
public void Draw()
{
RefreshPalette();
var bounds = GetBoundsRect();
Game.Renderer.EnableScissor(bounds.Left, bounds.Top, bounds.Width, bounds.Height);

View File

@@ -173,7 +173,6 @@ namespace OpenRA.Widgets.Delegates
{
CurrentColorPreview1 = PlayerColorRemap.ColorFromHSL(hf, sf, lf);
CurrentColorPreview2 = PlayerColorRemap.ColorFromHSL(hf, sf, r * lf);
Game.worldRenderer.RefreshPalette();
}
void UpdateCurrentMap()