Make ISpriteLoader aware of the source file name.

This commit is contained in:
Andre Mohren
2021-03-11 12:09:54 +01:00
committed by reaperrr
parent d60c05eff3
commit 3f510b6d93
13 changed files with 16 additions and 16 deletions

View File

@@ -155,7 +155,7 @@ namespace OpenRA.Mods.Cnc.SpriteLoaders
return frames;
}
public bool TryParseSprite(Stream s, out ISpriteFrame[] frames, out TypeDictionary metadata)
public bool TryParseSprite(Stream s, string filename, out ISpriteFrame[] frames, out TypeDictionary metadata)
{
metadata = null;
if (!IsShpD2(s))

View File

@@ -31,7 +31,7 @@ namespace OpenRA.Mods.Cnc.SpriteLoaders
return isZipFile;
}
public bool TryParseSprite(Stream s, out ISpriteFrame[] frames, out TypeDictionary metadata)
public bool TryParseSprite(Stream s, string filename, out ISpriteFrame[] frames, out TypeDictionary metadata)
{
metadata = null;
if (!IsShpRemastered(s))

View File

@@ -57,7 +57,7 @@ namespace OpenRA.Mods.Cnc.SpriteLoaders
return b == 0x20 || b == 0x40 || b == 0x80;
}
public bool TryParseSprite(Stream s, out ISpriteFrame[] frames, out TypeDictionary metadata)
public bool TryParseSprite(Stream s, string filename, out ISpriteFrame[] frames, out TypeDictionary metadata)
{
metadata = null;
if (!IsShpTD(s))

View File

@@ -85,7 +85,7 @@ namespace OpenRA.Mods.Cnc.SpriteLoaders
return tiles;
}
public bool TryParseSprite(Stream s, out ISpriteFrame[] frames, out TypeDictionary metadata)
public bool TryParseSprite(Stream s, string filename, out ISpriteFrame[] frames, out TypeDictionary metadata)
{
metadata = null;
if (!IsTmpRA(s))

View File

@@ -82,7 +82,7 @@ namespace OpenRA.Mods.Cnc.SpriteLoaders
return tiles;
}
public bool TryParseSprite(Stream s, out ISpriteFrame[] frames, out TypeDictionary metadata)
public bool TryParseSprite(Stream s, string filename, out ISpriteFrame[] frames, out TypeDictionary metadata)
{
metadata = null;
if (!IsTmpTD(s))

View File

@@ -184,7 +184,7 @@ namespace OpenRA.Mods.Cnc.SpriteLoaders
return tiles;
}
public bool TryParseSprite(Stream s, out ISpriteFrame[] frames, out TypeDictionary metadata)
public bool TryParseSprite(Stream s, string filename, out ISpriteFrame[] frames, out TypeDictionary metadata)
{
metadata = null;
if (!IsTmpTS(s))