Load (almost) everything from a single side-specific image
This commit is contained in:
@@ -106,13 +106,21 @@ namespace OpenRa.Game.Graphics
|
||||
|
||||
|
||||
public static Sprite GetImageFromCollection(Renderer renderer,string collection, string image)
|
||||
{
|
||||
{
|
||||
|
||||
|
||||
// Cached sprite
|
||||
if (cachedSprites.ContainsKey(collection) && cachedSprites[collection].ContainsKey(image))
|
||||
return cachedSprites[collection][image];
|
||||
|
||||
var mi = collections[collection][image];
|
||||
|
||||
MappedImage mi;
|
||||
try { mi = collections[collection][image];}
|
||||
catch (KeyNotFoundException)
|
||||
{
|
||||
throw new InvalidOperationException(
|
||||
"Collection `{0}` does not have an image `{1}`".F(collection, image));
|
||||
}
|
||||
|
||||
// Cached sheet
|
||||
Sheet sheet;
|
||||
if (cachedSheets.ContainsKey(mi.Src))
|
||||
|
||||
Reference in New Issue
Block a user