New fonts, loading progress doesn't stay stuck at 70% during SoundPlayer initialization
This commit is contained in:
@@ -8,7 +8,7 @@ with.
|
|||||||
<XnaContent xmlns:Graphics="Microsoft.Xna.Framework.Content.Pipeline.Graphics">
|
<XnaContent xmlns:Graphics="Microsoft.Xna.Framework.Content.Pipeline.Graphics">
|
||||||
<Asset Type="Graphics:FontDescription">
|
<Asset Type="Graphics:FontDescription">
|
||||||
|
|
||||||
<FontName>Verdana</FontName>
|
<FontName>Code Pro Bold</FontName>
|
||||||
|
|
||||||
<Size>16</Size>
|
<Size>16</Size>
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
@@ -8,9 +8,9 @@ with.
|
|||||||
<XnaContent xmlns:Graphics="Microsoft.Xna.Framework.Content.Pipeline.Graphics">
|
<XnaContent xmlns:Graphics="Microsoft.Xna.Framework.Content.Pipeline.Graphics">
|
||||||
<Asset Type="Graphics:FontDescription">
|
<Asset Type="Graphics:FontDescription">
|
||||||
|
|
||||||
<FontName>Verdana</FontName>
|
<FontName>Exo Light</FontName>
|
||||||
|
|
||||||
<Size>7</Size>
|
<Size>9</Size>
|
||||||
|
|
||||||
<Spacing>0</Spacing>
|
<Spacing>0</Spacing>
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
@@ -11,13 +11,13 @@ with.
|
|||||||
<!--
|
<!--
|
||||||
Modify this string to change the font that will be imported.
|
Modify this string to change the font that will be imported.
|
||||||
-->
|
-->
|
||||||
<FontName>Verdana</FontName>
|
<FontName>Exo Medium</FontName>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
Size is a float value, measured in points. Modify this value to change
|
Size is a float value, measured in points. Modify this value to change
|
||||||
the size of the font.
|
the size of the font.
|
||||||
-->
|
-->
|
||||||
<Size>12</Size>
|
<Size>10</Size>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
Spacing is a float value, measured in pixels. Modify this value to change
|
Spacing is a float value, measured in pixels. Modify this value to change
|
||||||
|
|||||||
Binary file not shown.
@@ -238,7 +238,9 @@ namespace Barotrauma
|
|||||||
while (!SoundPlayer.Initialized)
|
while (!SoundPlayer.Initialized)
|
||||||
{
|
{
|
||||||
i++;
|
i++;
|
||||||
TitleScreen.LoadState = Math.Min((float)TitleScreen.LoadState + 0.5f*i, 70.0f);
|
TitleScreen.LoadState = SoundPlayer.SoundCount == 0 ?
|
||||||
|
30.0f :
|
||||||
|
Math.Min(30.0f + 40.0f * i / Math.Max(SoundPlayer.SoundCount, 1), 70.0f);
|
||||||
yield return CoroutineStatus.Running;
|
yield return CoroutineStatus.Running;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -90,11 +90,18 @@ namespace Barotrauma
|
|||||||
get;
|
get;
|
||||||
set;
|
set;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static int SoundCount;
|
||||||
|
|
||||||
public static IEnumerable<object> Init()
|
public static IEnumerable<object> Init()
|
||||||
{
|
{
|
||||||
OverrideMusicType = null;
|
OverrideMusicType = null;
|
||||||
|
|
||||||
|
XDocument doc = ToolBox.TryLoadXml("Content/Sounds/sounds.xml");
|
||||||
|
if (doc == null) yield return CoroutineStatus.Failure;
|
||||||
|
|
||||||
|
SoundCount = 16 + doc.Root.Elements().Count();
|
||||||
|
|
||||||
startDrone = Sound.Load("Content/Sounds/startDrone.ogg", false);
|
startDrone = Sound.Load("Content/Sounds/startDrone.ogg", false);
|
||||||
startDrone.Play();
|
startDrone.Play();
|
||||||
|
|
||||||
@@ -116,12 +123,7 @@ namespace Barotrauma
|
|||||||
SplashSounds[i] = Sound.Load("Content/Sounds/Water/Splash"+(i)+".ogg", false);
|
SplashSounds[i] = Sound.Load("Content/Sounds/Water/Splash"+(i)+".ogg", false);
|
||||||
yield return CoroutineStatus.Running;
|
yield return CoroutineStatus.Running;
|
||||||
}
|
}
|
||||||
|
|
||||||
XDocument doc = ToolBox.TryLoadXml("Content/Sounds/sounds.xml");
|
|
||||||
if (doc == null) yield return CoroutineStatus.Failure;
|
|
||||||
|
|
||||||
yield return CoroutineStatus.Running;
|
|
||||||
|
|
||||||
var xMusic = doc.Root.Elements("music").ToList();
|
var xMusic = doc.Root.Elements("music").ToList();
|
||||||
|
|
||||||
if (xMusic.Any())
|
if (xMusic.Any())
|
||||||
@@ -178,8 +180,7 @@ namespace Barotrauma
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
miscSounds = miscSoundList.ToLookup(kvp => kvp.Key, kvp => kvp.Value);
|
miscSounds = miscSoundList.ToLookup(kvp => kvp.Key, kvp => kvp.Value);
|
||||||
|
|
||||||
|
|
||||||
Initialized = true;
|
Initialized = true;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user