Use TileSetRenderer in the editor.

This commit is contained in:
Paul Chote
2013-08-14 22:57:19 +12:00
parent 70580b27b9
commit 18759e01cf
3 changed files with 15 additions and 12 deletions

View File

@@ -27,7 +27,7 @@ namespace OpenRA.Editor
{
// change the bits in the map
var template = surface.TileSet.Templates[brushTemplate.N];
var tile = template.Data;
var tile = surface.TileSetRenderer.Data(brushTemplate.N);
var pos = surface.GetBrushLocation();
if (surface.GetModifiers() == Keys.Shift)
@@ -42,7 +42,7 @@ namespace OpenRA.Editor
if (surface.Map.IsInMap(new CVec(u, v) + pos))
{
var z = u + v * template.Size.X;
if (tile.TileBitmapBytes[z] != null)
if (tile[z] != null)
surface.Map.MapTiles.Value[u + pos.X, v + pos.Y] =
new TileReference<ushort, byte>
{