* JSON parser: Use array for function params (#2255) * Parser: follow C convention of type before name
This commit is contained in:
parent
2116a98745
commit
2e3cfdcc2f
5 changed files with 6955 additions and 3720 deletions
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -542,7 +542,7 @@
|
||||||
<Value name="NPATCH_THREE_PATCH_HORIZONTAL" integer="2" desc="Npatch layout: 3x1 tiles" />
|
<Value name="NPATCH_THREE_PATCH_HORIZONTAL" integer="2" desc="Npatch layout: 3x1 tiles" />
|
||||||
</Enum>
|
</Enum>
|
||||||
</Enums>
|
</Enums>
|
||||||
<Functions count="489">
|
<Functions count="491">
|
||||||
<Function name="InitWindow" retType="void" paramCount="3" desc="Initialize window and OpenGL context">
|
<Function name="InitWindow" retType="void" paramCount="3" desc="Initialize window and OpenGL context">
|
||||||
<Param type="int" name="width" desc="" />
|
<Param type="int" name="width" desc="" />
|
||||||
<Param type="int" name="height" desc="" />
|
<Param type="int" name="height" desc="" />
|
||||||
|
@ -569,7 +569,7 @@
|
||||||
<Function name="IsWindowState" retType="bool" paramCount="1" desc="Check if one specific window flag is enabled">
|
<Function name="IsWindowState" retType="bool" paramCount="1" desc="Check if one specific window flag is enabled">
|
||||||
<Param type="unsigned int" name="flag" desc="" />
|
<Param type="unsigned int" name="flag" desc="" />
|
||||||
</Function>
|
</Function>
|
||||||
<Function name="SetWindowState" retType="void" paramCount="1" desc="Set window configuration state using flags">
|
<Function name="SetWindowState" retType="void" paramCount="1" desc="Set window configuration state using flags (only PLATFORM_DESKTOP)">
|
||||||
<Param type="unsigned int" name="flags" desc="" />
|
<Param type="unsigned int" name="flags" desc="" />
|
||||||
</Function>
|
</Function>
|
||||||
<Function name="ClearWindowState" retType="void" paramCount="1" desc="Clear window configuration state flags">
|
<Function name="ClearWindowState" retType="void" paramCount="1" desc="Clear window configuration state flags">
|
||||||
|
@ -604,6 +604,9 @@
|
||||||
<Param type="int" name="width" desc="" />
|
<Param type="int" name="width" desc="" />
|
||||||
<Param type="int" name="height" desc="" />
|
<Param type="int" name="height" desc="" />
|
||||||
</Function>
|
</Function>
|
||||||
|
<Function name="SetWindowOpacity" retType="void" paramCount="1" desc="Set window opacity [0.0f..1.0f] (only PLATFORM_DESKTOP)">
|
||||||
|
<Param type="float" name="opacity" desc="" />
|
||||||
|
</Function>
|
||||||
<Function name="GetWindowHandle" retType="void *" paramCount="0" desc="Get native window handle">
|
<Function name="GetWindowHandle" retType="void *" paramCount="0" desc="Get native window handle">
|
||||||
</Function>
|
</Function>
|
||||||
<Function name="GetScreenWidth" retType="int" paramCount="0" desc="Get current screen width">
|
<Function name="GetScreenWidth" retType="int" paramCount="0" desc="Get current screen width">
|
||||||
|
@ -1831,7 +1834,7 @@
|
||||||
<Function name="LoadFont" retType="Font" paramCount="1" desc="Load font from file into GPU memory (VRAM)">
|
<Function name="LoadFont" retType="Font" paramCount="1" desc="Load font from file into GPU memory (VRAM)">
|
||||||
<Param type="const char *" name="fileName" desc="" />
|
<Param type="const char *" name="fileName" desc="" />
|
||||||
</Function>
|
</Function>
|
||||||
<Function name="LoadFontEx" retType="Font" paramCount="4" desc="Load font from file with extended parameters">
|
<Function name="LoadFontEx" retType="Font" paramCount="4" desc="Load font from file with extended parameters, use NULL for fontChars and 0 for glyphCount to load the default character set">
|
||||||
<Param type="const char *" name="fileName" desc="" />
|
<Param type="const char *" name="fileName" desc="" />
|
||||||
<Param type="int" name="fontSize" desc="" />
|
<Param type="int" name="fontSize" desc="" />
|
||||||
<Param type="int *" name="fontChars" desc="" />
|
<Param type="int *" name="fontChars" desc="" />
|
||||||
|
@ -1870,9 +1873,13 @@
|
||||||
<Param type="GlyphInfo *" name="chars" desc="" />
|
<Param type="GlyphInfo *" name="chars" desc="" />
|
||||||
<Param type="int" name="glyphCount" desc="" />
|
<Param type="int" name="glyphCount" desc="" />
|
||||||
</Function>
|
</Function>
|
||||||
<Function name="UnloadFont" retType="void" paramCount="1" desc="Unload Font from GPU memory (VRAM)">
|
<Function name="UnloadFont" retType="void" paramCount="1" desc="Unload font from GPU memory (VRAM)">
|
||||||
<Param type="Font" name="font" desc="" />
|
<Param type="Font" name="font" desc="" />
|
||||||
</Function>
|
</Function>
|
||||||
|
<Function name="ExportFontAsCode" retType="bool" paramCount="2" desc="Export font as code file, returns true on success">
|
||||||
|
<Param type="Font" name="font" desc="" />
|
||||||
|
<Param type="const char *" name="fileName" desc="" />
|
||||||
|
</Function>
|
||||||
<Function name="DrawFPS" retType="void" paramCount="2" desc="Draw current FPS">
|
<Function name="DrawFPS" retType="void" paramCount="2" desc="Draw current FPS">
|
||||||
<Param type="int" name="posX" desc="" />
|
<Param type="int" name="posX" desc="" />
|
||||||
<Param type="int" name="posY" desc="" />
|
<Param type="int" name="posY" desc="" />
|
||||||
|
|
|
@ -867,8 +867,8 @@ static void ExportParsedData(const char *fileName, int format)
|
||||||
for (int f = 0; f < structs[i].fieldCount; f++)
|
for (int f = 0; f < structs[i].fieldCount; f++)
|
||||||
{
|
{
|
||||||
fprintf(outFile, " {\n");
|
fprintf(outFile, " {\n");
|
||||||
fprintf(outFile, " name = \"%s\",\n", structs[i].fieldName[f]);
|
|
||||||
fprintf(outFile, " type = \"%s\",\n", structs[i].fieldType[f]);
|
fprintf(outFile, " type = \"%s\",\n", structs[i].fieldType[f]);
|
||||||
|
fprintf(outFile, " name = \"%s\",\n", structs[i].fieldName[f]);
|
||||||
fprintf(outFile, " description = \"%s\"\n", EscapeBackslashes(structs[i].fieldDesc[f] + 3));
|
fprintf(outFile, " description = \"%s\"\n", EscapeBackslashes(structs[i].fieldDesc[f] + 3));
|
||||||
fprintf(outFile, " }");
|
fprintf(outFile, " }");
|
||||||
if (f < structs[i].fieldCount - 1) fprintf(outFile, ",\n");
|
if (f < structs[i].fieldCount - 1) fprintf(outFile, ",\n");
|
||||||
|
@ -921,7 +921,7 @@ static void ExportParsedData(const char *fileName, int format)
|
||||||
fprintf(outFile, ",\n params = {\n");
|
fprintf(outFile, ",\n params = {\n");
|
||||||
for (int p = 0; p < funcs[i].paramCount; p++)
|
for (int p = 0; p < funcs[i].paramCount; p++)
|
||||||
{
|
{
|
||||||
fprintf(outFile, " {name = \"%s\", type = \"%s\"}", funcs[i].paramName[p], funcs[i].paramType[p]);
|
fprintf(outFile, " {type = \"%s\", name = \"%s\"}", funcs[i].paramType[p], funcs[i].paramName[p]);
|
||||||
if (p < funcs[i].paramCount - 1) fprintf(outFile, ",\n");
|
if (p < funcs[i].paramCount - 1) fprintf(outFile, ",\n");
|
||||||
else fprintf(outFile, "\n");
|
else fprintf(outFile, "\n");
|
||||||
}
|
}
|
||||||
|
@ -950,8 +950,8 @@ static void ExportParsedData(const char *fileName, int format)
|
||||||
for (int f = 0; f < structs[i].fieldCount; f++)
|
for (int f = 0; f < structs[i].fieldCount; f++)
|
||||||
{
|
{
|
||||||
fprintf(outFile, " {\n");
|
fprintf(outFile, " {\n");
|
||||||
fprintf(outFile, " \"name\": \"%s\",\n", structs[i].fieldName[f]);
|
|
||||||
fprintf(outFile, " \"type\": \"%s\",\n", structs[i].fieldType[f]);
|
fprintf(outFile, " \"type\": \"%s\",\n", structs[i].fieldType[f]);
|
||||||
|
fprintf(outFile, " \"name\": \"%s\",\n", structs[i].fieldName[f]);
|
||||||
fprintf(outFile, " \"description\": \"%s\"\n", EscapeBackslashes(structs[i].fieldDesc[f] + 3));
|
fprintf(outFile, " \"description\": \"%s\"\n", EscapeBackslashes(structs[i].fieldDesc[f] + 3));
|
||||||
fprintf(outFile, " }");
|
fprintf(outFile, " }");
|
||||||
if (f < structs[i].fieldCount - 1) fprintf(outFile, ",\n");
|
if (f < structs[i].fieldCount - 1) fprintf(outFile, ",\n");
|
||||||
|
@ -1001,14 +1001,17 @@ static void ExportParsedData(const char *fileName, int format)
|
||||||
if (funcs[i].paramCount == 0) fprintf(outFile, "\n");
|
if (funcs[i].paramCount == 0) fprintf(outFile, "\n");
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
fprintf(outFile, ",\n \"params\": {\n");
|
fprintf(outFile, ",\n \"params\": [\n");
|
||||||
for (int p = 0; p < funcs[i].paramCount; p++)
|
for (int p = 0; p < funcs[i].paramCount; p++)
|
||||||
{
|
{
|
||||||
fprintf(outFile, " \"%s\": \"%s\"", funcs[i].paramName[p], funcs[i].paramType[p]);
|
fprintf(outFile, " {\n");
|
||||||
|
fprintf(outFile, " \"type\": \"%s\",\n", funcs[i].paramType[p]);
|
||||||
|
fprintf(outFile, " \"name\": \"%s\"\n", funcs[i].paramName[p]);
|
||||||
|
fprintf(outFile, " }");
|
||||||
if (p < funcs[i].paramCount - 1) fprintf(outFile, ",\n");
|
if (p < funcs[i].paramCount - 1) fprintf(outFile, ",\n");
|
||||||
else fprintf(outFile, "\n");
|
else fprintf(outFile, "\n");
|
||||||
}
|
}
|
||||||
fprintf(outFile, " }\n");
|
fprintf(outFile, " ]\n");
|
||||||
}
|
}
|
||||||
fprintf(outFile, " }");
|
fprintf(outFile, " }");
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue