mirror of
https://github.com/Starpelly/raylib-beef.git
synced 2025-07-03 01:05:59 +02:00
Set current culture to invariant so decimal strings don't have commas.
This commit is contained in:
parent
ab712e871e
commit
7335f4b008
2 changed files with 4 additions and 188 deletions
|
@ -3,6 +3,7 @@ using System;
|
|||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Globalization;
|
||||
|
||||
namespace RaylibBeefGenerator
|
||||
{
|
||||
|
@ -22,6 +23,7 @@ namespace RaylibBeefGenerator
|
|||
{ "raylib.json", new ("Raylib", "Raylib") },
|
||||
{ "rlgl.json", new("Rlgl", "Rlgl") },
|
||||
{ "raymath.json", new("Raymath", "Raymath") }
|
||||
//{ "raygui.json", new("Raygui", "Raygui") }
|
||||
};
|
||||
|
||||
public struct FileDefinition
|
||||
|
@ -42,6 +44,7 @@ namespace RaylibBeefGenerator
|
|||
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture;
|
||||
Console.WriteLine($"Generating files at {OutputDir}");
|
||||
Console.WriteLine($"...");
|
||||
|
||||
|
@ -74,6 +77,7 @@ namespace RaylibBeefGenerator
|
|||
|
||||
if (!string.IsNullOrEmpty(define.Description)) AppendLine($"/// {define.Description}");
|
||||
var defineType = define.Type.ConvertTypes();
|
||||
|
||||
AppendLine($"public const {defineType} {define.Name.ConvertName()} = {define.Value.ToString()!.ParseValue(defineType)};");
|
||||
AppendLine("");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue