1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-15 14:42:56 +08:00

Minor fixes

This commit is contained in:
Drew DeVault 2016-10-12 13:26:09 -04:00 committed by Dean Herbert
parent 10b5e2a89d
commit dd86e75ea7
2 changed files with 15 additions and 12 deletions

View File

@ -29,10 +29,10 @@
<ItemGroup>
<Reference Include="System" />
<Reference Include="nunit.framework">
<HintPath>..\packages\NUnit.2.6.4\lib\nunit.framework.dll</HintPath>
<HintPath>$(SolutionDir)\packages\NUnit.2.6.4\lib\nunit.framework.dll</HintPath>
</Reference>
<Reference Include="OpenTK">
<HintPath>..\packages\ppy.OpenTK.1.1.2225.3\lib\net20\OpenTK.dll</HintPath>
<HintPath>$(SolutionDir)\packages\ppy.OpenTK.1.1.2225.3\lib\net20\OpenTK.dll</HintPath>
</Reference>
<Reference Include="System.Drawing" />
<Reference Include="System.Xml" />
@ -66,4 +66,4 @@
<EmbeddedResource Include="Resources\Soleily - Renatus %28Gamu%29 [Insane].osu" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
</Project>
</Project>

View File

@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using OpenTK.Graphics;
using osu.Game.Beatmaps.Events;
@ -55,7 +56,7 @@ namespace osu.Game.Beatmaps.Formats
beatmap.SampleSet = (SampleSet)Enum.Parse(typeof(SampleSet), val);
break;
case "StackLeniency":
beatmap.StackLeniency = float.Parse(val);
beatmap.StackLeniency = float.Parse(val, NumberFormatInfo.InvariantInfo);
break;
case "Mode":
beatmap.Mode = (PlayMode)int.Parse(val);
@ -80,7 +81,7 @@ namespace osu.Game.Beatmaps.Formats
beatmap.StoredBookmarks = val;
break;
case "DistanceSpacing":
beatmap.DistanceSpacing = double.Parse(val);
beatmap.DistanceSpacing = double.Parse(val, NumberFormatInfo.InvariantInfo);
break;
case "BeatDivisor":
beatmap.BeatDivisor = int.Parse(val);
@ -89,7 +90,7 @@ namespace osu.Game.Beatmaps.Formats
beatmap.GridSize = int.Parse(val);
break;
case "TimelineZoom":
beatmap.TimelineZoom = double.Parse(val);
beatmap.TimelineZoom = double.Parse(val, NumberFormatInfo.InvariantInfo);
break;
}
}
@ -137,22 +138,22 @@ namespace osu.Game.Beatmaps.Formats
switch (key)
{
case "HPDrainRate":
beatmap.BaseDifficulty.DrainRate = float.Parse(val);
beatmap.BaseDifficulty.DrainRate = float.Parse(val, NumberFormatInfo.InvariantInfo);
break;
case "CircleSize":
beatmap.BaseDifficulty.CircleSize = float.Parse(val);
beatmap.BaseDifficulty.CircleSize = float.Parse(val, NumberFormatInfo.InvariantInfo);
break;
case "OverallDifficulty":
beatmap.BaseDifficulty.OverallDifficulty = float.Parse(val);
beatmap.BaseDifficulty.OverallDifficulty = float.Parse(val, NumberFormatInfo.InvariantInfo);
break;
case "ApproachRate":
beatmap.BaseDifficulty.ApproachRate = float.Parse(val);
beatmap.BaseDifficulty.ApproachRate = float.Parse(val, NumberFormatInfo.InvariantInfo);
break;
case "SliderMultiplier":
beatmap.BaseDifficulty.SliderMultiplier = float.Parse(val);
beatmap.BaseDifficulty.SliderMultiplier = float.Parse(val, NumberFormatInfo.InvariantInfo);
break;
case "SliderTickRate":
beatmap.BaseDifficulty.SliderTickRate = float.Parse(val);
beatmap.BaseDifficulty.SliderTickRate = float.Parse(val, NumberFormatInfo.InvariantInfo);
break;
}
}
@ -161,6 +162,8 @@ namespace osu.Game.Beatmaps.Formats
{
if (val.StartsWith("//"))
return;
if (val.StartsWith(" "))
return; // TODO
string[] split = val.Split(',');
EventType type;
int _type;