moving another filelist out to where we want it

This commit is contained in:
Chris Forbes
2010-01-20 20:31:58 +13:00
parent 359e833366
commit 06b9c0dcf5
2 changed files with 8 additions and 5 deletions

View File

@@ -75,7 +75,11 @@ namespace OpenRa
players[i] = new Player(i, LobbyInfo.Clients.FirstOrDefault(a => a.Index == i)); players[i] = new Player(i, LobbyInfo.Clients.FirstOrDefault(a => a.Index == i));
} }
SequenceProvider.Initialize(usingAftermath); var sequenceFiles = usingAftermath
? new[] { "sequences.xml", "sequences-aftermath.xml" }
: new[] { "sequences.xml" };
SequenceProvider.Initialize(sequenceFiles);
viewport = new Viewport(clientSize, Game.world.Map.Offset, Game.world.Map.Offset + Game.world.Map.Size, renderer); viewport = new Viewport(clientSize, Game.world.Map.Offset, Game.world.Map.Offset + Game.world.Map.Size, renderer);
skipMakeAnims = true; skipMakeAnims = true;

View File

@@ -11,14 +11,13 @@ namespace OpenRa.Graphics
static Dictionary<string, Dictionary<string, Sequence>> units; static Dictionary<string, Dictionary<string, Sequence>> units;
static Dictionary<string, CursorSequence> cursors; static Dictionary<string, CursorSequence> cursors;
public static void Initialize(bool useAftermath) public static void Initialize(params string[] sequenceFiles)
{ {
units = new Dictionary<string, Dictionary<string, Sequence>>(); units = new Dictionary<string, Dictionary<string, Sequence>>();
cursors = new Dictionary<string, CursorSequence>(); cursors = new Dictionary<string, CursorSequence>();
LoadSequenceSource("sequences.xml"); foreach (var f in sequenceFiles)
if (useAftermath) LoadSequenceSource(f);
LoadSequenceSource("sequences-aftermath.xml");
} }
static void LoadSequenceSource(string filename) static void LoadSequenceSource(string filename)