Style fixes
This commit is contained in:
@@ -248,9 +248,7 @@ namespace OpenRA
|
|||||||
|
|
||||||
Map map;
|
Map map;
|
||||||
using (new PerfTimer("PrepareMap"))
|
using (new PerfTimer("PrepareMap"))
|
||||||
{
|
|
||||||
map = modData.PrepareMap(mapUID);
|
map = modData.PrepareMap(mapUID);
|
||||||
}
|
|
||||||
using (new PerfTimer("NewWorld"))
|
using (new PerfTimer("NewWorld"))
|
||||||
{
|
{
|
||||||
orderManager.world = new World(modData.Manifest, map, orderManager, isShellmap);
|
orderManager.world = new World(modData.Manifest, map, orderManager, isShellmap);
|
||||||
@@ -258,9 +256,7 @@ namespace OpenRA
|
|||||||
}
|
}
|
||||||
worldRenderer = new WorldRenderer(orderManager.world);
|
worldRenderer = new WorldRenderer(orderManager.world);
|
||||||
using (new PerfTimer("LoadComplete"))
|
using (new PerfTimer("LoadComplete"))
|
||||||
{
|
|
||||||
orderManager.world.LoadComplete(worldRenderer);
|
orderManager.world.LoadComplete(worldRenderer);
|
||||||
}
|
|
||||||
|
|
||||||
if (orderManager.GameStarted)
|
if (orderManager.GameStarted)
|
||||||
return;
|
return;
|
||||||
@@ -396,9 +392,7 @@ namespace OpenRA
|
|||||||
Renderer.InitializeFonts(modData.Manifest);
|
Renderer.InitializeFonts(modData.Manifest);
|
||||||
modData.InitializeLoaders();
|
modData.InitializeLoaders();
|
||||||
using (new PerfTimer("LoadMaps"))
|
using (new PerfTimer("LoadMaps"))
|
||||||
{
|
|
||||||
modData.MapCache.LoadMaps();
|
modData.MapCache.LoadMaps();
|
||||||
}
|
|
||||||
|
|
||||||
PerfHistory.items["render"].hasNormalTick = false;
|
PerfHistory.items["render"].hasNormalTick = false;
|
||||||
PerfHistory.items["batches"].hasNormalTick = false;
|
PerfHistory.items["batches"].hasNormalTick = false;
|
||||||
@@ -449,12 +443,10 @@ namespace OpenRA
|
|||||||
|
|
||||||
public static void LoadShellMap()
|
public static void LoadShellMap()
|
||||||
{
|
{
|
||||||
string shellMap = ChooseShellmap();
|
var shellmap = ChooseShellmap();
|
||||||
|
|
||||||
using (new PerfTimer("StartGame"))
|
using (new PerfTimer("StartGame"))
|
||||||
{
|
StartGame(shellmap, true);
|
||||||
StartGame(shellMap, true);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static string ChooseShellmap()
|
static string ChooseShellmap()
|
||||||
|
|||||||
@@ -119,9 +119,7 @@ namespace OpenRA
|
|||||||
GlobalFileSystem.Mount(GlobalFileSystem.OpenPackage(map.Path, null, int.MaxValue));
|
GlobalFileSystem.Mount(GlobalFileSystem.OpenPackage(map.Path, null, int.MaxValue));
|
||||||
|
|
||||||
using (new Support.PerfTimer("LoadRules"))
|
using (new Support.PerfTimer("LoadRules"))
|
||||||
{
|
|
||||||
Rules.LoadRules(Manifest, map);
|
Rules.LoadRules(Manifest, map);
|
||||||
}
|
|
||||||
SpriteLoader = new SpriteLoader(Rules.TileSets[map.Tileset].Extensions, SheetBuilder);
|
SpriteLoader = new SpriteLoader(Rules.TileSets[map.Tileset].Extensions, SheetBuilder);
|
||||||
|
|
||||||
using (new Support.PerfTimer("SequenceProvider.Initialize"))
|
using (new Support.PerfTimer("SequenceProvider.Initialize"))
|
||||||
|
|||||||
@@ -61,22 +61,22 @@ namespace OpenRA.Support
|
|||||||
Log.Write("perf", FormatString, s, Math.Round(this.sw.Elapsed.TotalMilliseconds));
|
Log.Write("perf", FormatString, s, Math.Round(this.sw.Elapsed.TotalMilliseconds));
|
||||||
}
|
}
|
||||||
|
|
||||||
private static string GetHeader(string indentation, string label)
|
static string GetHeader(string indentation, string label)
|
||||||
{
|
{
|
||||||
return string.Concat(indentation, LimitLength(label, MaxIndentedLabel - indentation.Length));
|
return string.Concat(indentation, LimitLength(label, MaxIndentedLabel - indentation.Length));
|
||||||
}
|
}
|
||||||
|
|
||||||
private static string GetOneLiner(string indentation, string label)
|
static string GetOneLiner(string indentation, string label)
|
||||||
{
|
{
|
||||||
return string.Concat(indentation, SetLength(label, MaxIndentedLabel - indentation.Length));
|
return string.Concat(indentation, SetLength(label, MaxIndentedLabel - indentation.Length));
|
||||||
}
|
}
|
||||||
|
|
||||||
private static string GetFooter(string indentation)
|
static string GetFooter(string indentation)
|
||||||
{
|
{
|
||||||
return string.Concat(indentation, new string('-', MaxIndentedLabel - indentation.Length));
|
return string.Concat(indentation, new string('-', MaxIndentedLabel - indentation.Length));
|
||||||
}
|
}
|
||||||
|
|
||||||
private static string LimitLength(string s, int length, int minLength = 8)
|
static string LimitLength(string s, int length, int minLength = 8)
|
||||||
{
|
{
|
||||||
length = Math.Max(length, minLength);
|
length = Math.Max(length, minLength);
|
||||||
|
|
||||||
@@ -86,7 +86,7 @@ namespace OpenRA.Support
|
|||||||
return s.Substring(0, length);
|
return s.Substring(0, length);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static string SetLength(string s, int length, int minLength = 8)
|
static string SetLength(string s, int length, int minLength = 8)
|
||||||
{
|
{
|
||||||
length = Math.Max(length, minLength);
|
length = Math.Max(length, minLength);
|
||||||
|
|
||||||
@@ -99,7 +99,7 @@ namespace OpenRA.Support
|
|||||||
return s.Substring(0, length);
|
return s.Substring(0, length);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static string Indentation
|
static string Indentation
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -6,14 +6,12 @@
|
|||||||
* as published by the Free Software Foundation. For more information,
|
* as published by the Free Software Foundation. For more information,
|
||||||
* see COPYING.
|
* see COPYING.
|
||||||
*/
|
*/
|
||||||
using System.IO;
|
|
||||||
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.IO;
|
||||||
using OpenRA.FileSystem;
|
using OpenRA.FileSystem;
|
||||||
using OpenRA.Traits;
|
using OpenRA.Traits;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user