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:
Pavel Penev
2015-11-19 00:27:22 +02:00
parent e5cb7e03e1
commit 8d56de80ca
5 changed files with 43 additions and 20 deletions

View File

@@ -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!");
}
}
}