moved Game.palette into WorldRenderer
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using OpenRa.FileFormats;
|
||||
using OpenRa.Traits;
|
||||
|
||||
namespace OpenRa.Graphics
|
||||
{
|
||||
@@ -38,5 +40,15 @@ namespace OpenRa.Graphics
|
||||
|
||||
return allocated++;
|
||||
}
|
||||
|
||||
public void Update(IEnumerable<IPaletteModifier> paletteMods)
|
||||
{
|
||||
var b = new Bitmap(Bitmap);
|
||||
foreach (var mod in paletteMods)
|
||||
mod.AdjustPalette(b);
|
||||
|
||||
Texture.SetData(b);
|
||||
Game.renderer.PaletteTexture = Texture;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user