Move rules and SSB init out of world

This commit is contained in:
Paul Chote
2010-08-19 00:09:48 +12:00
parent 08ffe1d44d
commit 1afcd2b98a
2 changed files with 8 additions and 7 deletions

View File

@@ -140,12 +140,17 @@ namespace OpenRA
viewport = new Viewport(clientSize, map.TopLeft, map.BottomRight, Renderer);
world = null; // trying to access the old world will NRE, rather than silently doing it wrong.
Timer.Time("viewport: {0}");
Rules.LoadRules(Manifest,map);
Timer.Time( "load rules: {0}" );
SpriteSheetBuilder.Initialize( Rules.TileSets[map.Tileset] );
SequenceProvider.Initialize(Manifest.Sequences);
Timer.Time("SeqProv: {0}");
world = new World(Manifest, map);
Timer.Time("world: {0}");
SequenceProvider.Initialize(Manifest.Sequences);
Timer.Time("ChromeProv, SeqProv: {0}");
Timer.Time("----end LoadMap");
Debug("Map change {0} -> {1}".F(Game.mapName, mapName));
}