Add support on-demand sprite frame loading.

Passing the getUsedFrames argument will cause frames to be buffered
locally (and not added to the SheetBuilder) until they are explicitly
requested. This allows unused frames in sprite files to be skipped
instead of wasting space in GPU memory.
This commit is contained in:
Paul Chote
2018-04-30 18:40:16 +00:00
committed by abcdefg30
parent 94dd83bc13
commit d9fd0f272c
2 changed files with 56 additions and 19 deletions

View File

@@ -47,7 +47,7 @@ namespace OpenRA.Mods.Common.UtilityCommands
var palette = new ImmutablePalette(args[2], shadowIndex);
var frames = SpriteLoader.GetFrames(File.OpenRead(src), modData.SpriteLoaders);
var frames = FrameLoader.GetFrames(File.OpenRead(src), modData.SpriteLoaders);
var usePadding = !args.Contains("--nopadding");
var count = 0;