From 06b9c0dcf5af750dce9577bd8529149b47a3c553 Mon Sep 17 00:00:00 2001 From: Chris Forbes Date: Wed, 20 Jan 2010 20:31:58 +1300 Subject: [PATCH] moving another filelist out to where we want it --- OpenRa.Game/Game.cs | 6 +++++- OpenRa.Game/Graphics/SequenceProvider.cs | 7 +++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/OpenRa.Game/Game.cs b/OpenRa.Game/Game.cs index 177769af01..5abe4ea83b 100644 --- a/OpenRa.Game/Game.cs +++ b/OpenRa.Game/Game.cs @@ -75,7 +75,11 @@ namespace OpenRa 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); skipMakeAnims = true; diff --git a/OpenRa.Game/Graphics/SequenceProvider.cs b/OpenRa.Game/Graphics/SequenceProvider.cs index 059260d306..8baffbf286 100644 --- a/OpenRa.Game/Graphics/SequenceProvider.cs +++ b/OpenRa.Game/Graphics/SequenceProvider.cs @@ -11,14 +11,13 @@ namespace OpenRa.Graphics static Dictionary> units; static Dictionary cursors; - public static void Initialize(bool useAftermath) + public static void Initialize(params string[] sequenceFiles) { units = new Dictionary>(); cursors = new Dictionary(); - LoadSequenceSource("sequences.xml"); - if (useAftermath) - LoadSequenceSource("sequences-aftermath.xml"); + foreach (var f in sequenceFiles) + LoadSequenceSource(f); } static void LoadSequenceSource(string filename)