Fix editor
This commit is contained in:
@@ -47,8 +47,7 @@ namespace OpenRA.Editor
|
||||
new TileReference<ushort, byte>
|
||||
{
|
||||
type = Brush.N,
|
||||
index = template.PickAny ? byte.MaxValue : (byte)z,
|
||||
image = template.PickAny ? (byte)((u + pos.X) % 4 + ((v + pos.Y) % 4) * 4) : (byte)z,
|
||||
index = template.PickAny ? (byte)((u + pos.X) % 4 + ((v + pos.Y) % 4) * 4) : (byte)z,
|
||||
};
|
||||
|
||||
var ch = new int2((pos.X + u) / Surface.ChunkSize, (pos.Y + v) / Surface.ChunkSize);
|
||||
@@ -97,7 +96,7 @@ namespace OpenRA.Editor
|
||||
|
||||
for (var x = a.X; x <= b.X; x++)
|
||||
{
|
||||
s.Map.MapTiles[x, p.Y] = new TileReference<ushort, byte> { type = Brush.N, image = (byte)0, index = (byte)0 };
|
||||
s.Map.MapTiles[x, p.Y] = new TileReference<ushort, byte> { type = Brush.N, index = (byte)0 };
|
||||
if (s.Map.MapTiles[x, p.Y - 1].Equals(replace))
|
||||
MaybeEnqueue(x, p.Y - 1);
|
||||
if (s.Map.MapTiles[x, p.Y + 1].Equals(replace))
|
||||
|
||||
@@ -27,8 +27,7 @@ namespace OpenRA.Editor
|
||||
= new TileReference<byte, byte>
|
||||
{
|
||||
type = (byte)Resource.Info.ResourceType,
|
||||
index = (byte)random.Next(Resource.Info.SpriteNames.Length),
|
||||
image = (byte)Resource.Value
|
||||
index = (byte)Resource.Value
|
||||
};
|
||||
|
||||
var ch = new int2((surface.GetBrushLocation().X) / Surface.ChunkSize,
|
||||
|
||||
@@ -214,7 +214,7 @@ namespace OpenRA.Editor
|
||||
{
|
||||
var tr = Map.MapTiles[u * ChunkSize + i, v * ChunkSize + j];
|
||||
var tile = TileSet.Tiles[tr.type];
|
||||
var index = (tr.image < tile.TileBitmapBytes.Count) ? tr.image : (byte)0;
|
||||
var index = (tr.index < tile.TileBitmapBytes.Count) ? tr.index : (byte)0;
|
||||
var rawImage = tile.TileBitmapBytes[index];
|
||||
for (var x = 0; x < TileSet.TileSize; x++)
|
||||
for (var y = 0; y < TileSet.TileSize; y++)
|
||||
|
||||
Reference in New Issue
Block a user