Move rules and SSB init out of world
This commit is contained in:
@@ -140,12 +140,17 @@ namespace OpenRA
|
|||||||
viewport = new Viewport(clientSize, map.TopLeft, map.BottomRight, Renderer);
|
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.
|
world = null; // trying to access the old world will NRE, rather than silently doing it wrong.
|
||||||
Timer.Time("viewport: {0}");
|
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);
|
world = new World(Manifest, map);
|
||||||
Timer.Time("world: {0}");
|
Timer.Time("world: {0}");
|
||||||
|
|
||||||
SequenceProvider.Initialize(Manifest.Sequences);
|
|
||||||
Timer.Time("ChromeProv, SeqProv: {0}");
|
|
||||||
|
|
||||||
Timer.Time("----end LoadMap");
|
Timer.Time("----end LoadMap");
|
||||||
Debug("Map change {0} -> {1}".F(Game.mapName, mapName));
|
Debug("Map change {0} -> {1}".F(Game.mapName, mapName));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -80,11 +80,7 @@ namespace OpenRA
|
|||||||
Timer.Time( "----World.ctor" );
|
Timer.Time( "----World.ctor" );
|
||||||
Map = map;
|
Map = map;
|
||||||
|
|
||||||
Rules.LoadRules(manifest,Map);
|
|
||||||
Timer.Time( "load rules: {0}" );
|
|
||||||
|
|
||||||
TileSet = Rules.TileSets[Map.Tileset];
|
TileSet = Rules.TileSets[Map.Tileset];
|
||||||
SpriteSheetBuilder.Initialize( TileSet );
|
|
||||||
TileSet.LoadTiles();
|
TileSet.LoadTiles();
|
||||||
Timer.Time( "Tileset: {0}" );
|
Timer.Time( "Tileset: {0}" );
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user