Add ISoundLoader
The interface is to be implemented by all sound loaders, just like ISpriteLoader. All loading goes through the interface. This would allow mods to create their own sound loaders outside the engine. Also add a SoundFormats property to mod.yaml, where mods can define what sound loaders they will need. This requires Game.Sound to be initialized after the ModData is loaded.
This commit is contained in:
@@ -72,7 +72,7 @@ namespace OpenRA.Graphics
|
||||
if (loader.TryParseSprite(stream, out frames))
|
||||
return frames;
|
||||
|
||||
throw new InvalidDataException(filename + " is not a valid sprite file");
|
||||
throw new InvalidDataException(filename + " is not a valid sprite file!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user