Cleanup.
This commit is contained in:
@@ -85,7 +85,14 @@ namespace Cryville.Crtr {
|
|||||||
|
|
||||||
texHandler = new DownloadHandlerTexture();
|
texHandler = new DownloadHandlerTexture();
|
||||||
#if BUILD
|
#if BUILD
|
||||||
|
try {
|
||||||
Play();
|
Play();
|
||||||
|
}
|
||||||
|
catch (Exception ex) {
|
||||||
|
Game.LogException("Load/WorkerThread", "An error occured while loading the data", ex);
|
||||||
|
Popup.CreateException(ex);
|
||||||
|
ReturnToMenu();
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Camera.main.RenderToCubemap();
|
// Camera.main.RenderToCubemap();
|
||||||
@@ -160,25 +167,18 @@ namespace Cryville.Crtr {
|
|||||||
var tex = texHandler.texture;
|
var tex = texHandler.texture;
|
||||||
tex.wrapMode = TextureWrapMode.Clamp;
|
tex.wrapMode = TextureWrapMode.Clamp;
|
||||||
texs.Add(name, tex);
|
texs.Add(name, tex);
|
||||||
Logger.Log("main", 0, "Load/MainThread", "Loaded texture {0} ({1} bytes)", name, texLoader.downloadedBytes);
|
|
||||||
texLoader.Dispose();
|
texLoader.Dispose();
|
||||||
texHandler.Dispose();
|
texHandler.Dispose();
|
||||||
texLoader = null;
|
texLoader = null;
|
||||||
}
|
}
|
||||||
else if (texLoader.downloadProgress != 0) {
|
|
||||||
Logger.Log("main", 0, "Load/MainThread", "Loading texture {0} {1:P0}", name, texLoader.downloadProgress);
|
|
||||||
}
|
|
||||||
#else
|
#else
|
||||||
if (texLoader.isDone) {
|
if (texLoader.isDone) {
|
||||||
var tex = texLoader.texture;
|
var tex = texLoader.texture;
|
||||||
|
tex.wrapMode = TextureWrapMode.Clamp;
|
||||||
texs.Add(name, tex);
|
texs.Add(name, tex);
|
||||||
Logger.Log("main", 0, "Load/MainThread", "Loaded texture {0} ({1} bytes)", name, texLoader.bytesDownloaded);
|
|
||||||
texLoader.Dispose();
|
texLoader.Dispose();
|
||||||
texLoader = null;
|
texLoader = null;
|
||||||
}
|
}
|
||||||
else if (texLoader.progress != 0) {
|
|
||||||
Logger.Log("main", 0, "Load/MainThread", "Loading texture {0} {1:P0}", name, texLoader.progress);
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
if (texLoader == null)
|
if (texLoader == null)
|
||||||
@@ -336,6 +336,7 @@ namespace Cryville.Crtr {
|
|||||||
FileInfo rulesetFile = new FileInfo(
|
FileInfo rulesetFile = new FileInfo(
|
||||||
Game.GameDataPath + "/rulesets/" + Settings.Default.LoadRuleset
|
Game.GameDataPath + "/rulesets/" + Settings.Default.LoadRuleset
|
||||||
);
|
);
|
||||||
|
if (!rulesetFile.Exists) throw new FileNotFoundException("Ruleset for the chart not found\nMake sure you have imported the ruleset");
|
||||||
FileInfo rulesetConfigFile = new FileInfo(
|
FileInfo rulesetConfigFile = new FileInfo(
|
||||||
Game.GameDataPath + "/config/rulesets/" + Settings.Default.LoadRulesetConfig
|
Game.GameDataPath + "/config/rulesets/" + Settings.Default.LoadRulesetConfig
|
||||||
);
|
);
|
||||||
@@ -348,6 +349,7 @@ namespace Cryville.Crtr {
|
|||||||
FileInfo skinFile = new FileInfo(
|
FileInfo skinFile = new FileInfo(
|
||||||
string.Format("{0}/skins/{1}/{2}/.umgs", Game.GameDataPath, rulesetFile.Directory.Name, _rscfg.generic.Skin)
|
string.Format("{0}/skins/{1}/{2}/.umgs", Game.GameDataPath, rulesetFile.Directory.Name, _rscfg.generic.Skin)
|
||||||
);
|
);
|
||||||
|
if (!skinFile.Exists) throw new FileNotFoundException("Skin not found\nPlease specify an available skin in the config");
|
||||||
loadThread = new Thread(new ParameterizedThreadStart(Load));
|
loadThread = new Thread(new ParameterizedThreadStart(Load));
|
||||||
loadThread.Start(new LoadInfo() {
|
loadThread.Start(new LoadInfo() {
|
||||||
chartFile = chartFile,
|
chartFile = chartFile,
|
||||||
|
@@ -112,7 +112,7 @@ namespace Cryville.Crtr {
|
|||||||
[LogarithmicScale][Step(0.5f)][Precision(1e-1)]
|
[LogarithmicScale][Step(0.5f)][Precision(1e-1)]
|
||||||
public float RenderDistance {
|
public float RenderDistance {
|
||||||
get {
|
get {
|
||||||
return PlayerPrefs.GetFloat("RenderDistance", 6);
|
return PlayerPrefs.GetFloat("RenderDistance", 4);
|
||||||
}
|
}
|
||||||
set {
|
set {
|
||||||
PlayerPrefs.SetFloat("RenderDistance", value);
|
PlayerPrefs.SetFloat("RenderDistance", value);
|
||||||
|
Reference in New Issue
Block a user