Remove requirement for depth sprites to share color sheet.

This commit is contained in:
Paul Chote
2018-05-31 23:36:14 +00:00
committed by reaperrr
parent 2f2a7724d5
commit 8461a82577
5 changed files with 35 additions and 47 deletions

View File

@@ -111,23 +111,6 @@ namespace OpenRA.Graphics
return sprite;
}
}
/// <summary>Returns all instances of sets of sprites with the given filename</summary>
public IEnumerable<Sprite[]> AllCached(string filename)
{
return sprites.GetOrAdd(filename);
}
/// <summary>Loads and caches a new instance of sprites with the given filename</summary>
public Sprite[] Reload(string filename)
{
var sprite = FrameLoader.GetFrames(fileSystem, filename, loaders)
.Select(a => SheetBuilder.Add(a))
.ToArray();
sprites.GetOrAdd(filename).Add(sprite);
return sprite;
}
}
public class FrameCache