Skip to content

Commit

Permalink
Merge pull request #17 from Sadler2/master
Browse files Browse the repository at this point in the history
Non-english locale support, symbol count bug fix
  • Loading branch information
skairunner authored Dec 27, 2020
2 parents 87c0244 + 5ee3d3c commit 6823176
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
4 changes: 4 additions & 0 deletions kanimal-cli/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,10 @@ private static void Convert(string inputFormat, string outputFormat, List<string

private static void Main(string[] args)
{
System.Globalization.CultureInfo customCulture = (System.Globalization.CultureInfo)System.Threading.Thread.CurrentThread.CurrentCulture.Clone();
customCulture.NumberFormat.NumberDecimalSeparator = ".";

System.Threading.Thread.CurrentThread.CurrentCulture = customCulture;
Parser.Default
.ParseArguments<KanimToScmlOptions, ScmlToKanimOptions, GenericOptions, DumpOptions, BatchConvertOptions
>(args)
Expand Down
7 changes: 4 additions & 3 deletions kanimal/Writer/KanimWriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,14 @@ public void WriteBuild(Stream output)
writer.Write("BILD".ToCharArray());
writer.Write(10); // build version
Logger.Debug("version=10");
writer.Write(BuildData.SymbolCount);
Logger.Debug($"symbols={BuildData.SymbolCount}");
writer.Write(BuildData.Symbols.Count);
Logger.Debug($"symbols={BuildData.Symbols.Count}");
writer.Write(BuildData.FrameCount);
Logger.Debug($"frames={BuildData.FrameCount}");
writer.WritePString(BuildData.Name);
Logger.Debug($"name={BuildData.Name}");
for (var i = 0; i < BuildData.SymbolCount; i++)

for (var i = 0; i < BuildData.Symbols.Count; i++)
{
var symbol = BuildData.Symbols[i];
Logger.Debug(
Expand Down

0 comments on commit 6823176

Please sign in to comment.