2
0
mirror of https://github.com/raylib-cs/raylib-cs synced 2025-09-09 03:01:41 -04:00

Review and cleanup

- General cleanup.
- Fixed missing functions from raymath.
- Nuget info part of project file.
This commit is contained in:
2018-10-20 13:16:58 +01:00
parent 4198ffb0bd
commit 7e5c985f85
17 changed files with 276 additions and 341 deletions

View File

@@ -3,7 +3,7 @@ using System.IO;
using System.Text;
using System.Text.RegularExpressions;
namespace Raylibcs
namespace Generator
{
static class Generator
{
@@ -36,10 +36,6 @@ namespace Raylibcs
{
//Console.WriteLine(match.Value);
}
// Console.WriteLine(matches.Count);
//return input;
//var match = Regex.IsMatch(input, pattern);
return Regex.Replace(input, pattern, replacement);
}
@@ -71,9 +67,6 @@ namespace Raylibcs
//output += text;
output += "\n}";
// convert syntax to c#
//output = template.Replace("{{ CONTENT }}", output);
output = output.Replace("(void)", "()");
output = output.Replace("const char *", "string ");
output = output.Replace("const char * ", "string");
@@ -99,12 +92,6 @@ namespace Raylibcs
// Design is close to raylib so only a few changes needed
public static void ProcessExample(string file, string folder, string path)
{
// fix #defines
// fix structs
// fix enums
// remove return 0 for main
// fix {} initialization(not all cases covered)
// load and setup
var fileName = Path.GetFileNameWithoutExtension(file);
var text = File.ReadAllText(file);