diff options
| author | Rémi Verschelde | 2016-11-01 00:24:30 +0100 |
|---|---|---|
| committer | Rémi Verschelde | 2016-11-01 00:35:16 +0100 |
| commit | f34151ff0f91e8f0df8eaf829334b2205eb7da3c (patch) | |
| tree | 2d074bb474b4b093c849ad2f6317dcc4ae5784f5 /tools/scripts | |
| parent | 817dd7ccbb166b27c93706dffc5c0c0d59fd87f8 (diff) | |
| download | godot-f34151ff0f91e8f0df8eaf829334b2205eb7da3c.tar.gz godot-f34151ff0f91e8f0df8eaf829334b2205eb7da3c.tar.zst godot-f34151ff0f91e8f0df8eaf829334b2205eb7da3c.zip | |
Diffstat (limited to 'tools/scripts')
| -rwxr-xr-x | tools/scripts/file-hex-array.py | 3 | ||||
| -rw-r--r-- | tools/scripts/make_glwrapper.py | 10 |
2 files changed, 7 insertions, 6 deletions
diff --git a/tools/scripts/file-hex-array.py b/tools/scripts/file-hex-array.py index da95c9505..a6cdfe541 100755 --- a/tools/scripts/file-hex-array.py +++ b/tools/scripts/file-hex-array.py @@ -9,7 +9,8 @@ def tof(filepath): content = content.replace("0x", "") content = content.split(',') for i in range(len(content)): - if len(content[i]) == 1: content[i] = "0" + content[i] + if len(content[i]) == 1: + content[i] = "0" + content[i] content = "".join(content) with open(filepath + ".file", 'wb') as f: content = f.write(content.decode("hex")) diff --git a/tools/scripts/make_glwrapper.py b/tools/scripts/make_glwrapper.py index bae0eeead..5694d2327 100644 --- a/tools/scripts/make_glwrapper.py +++ b/tools/scripts/make_glwrapper.py @@ -61,7 +61,7 @@ for x in (range(len(sys.argv) - 1)): if (glpos == -1): continue - ret = line[:glpos].strip(); + ret = line[:glpos].strip() line = line[glpos:].strip() namepos = line.find("(") @@ -127,14 +127,14 @@ header_code = """\ f.write("#include <stddef.h>\n\n\n") -f.write(header_code); +f.write(header_code) f.write("#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n\n") f.write("#if defined(_WIN32) && !defined(__CYGWIN__)\n") f.write("#define GLWRP_APIENTRY __stdcall\n") -f.write("#else\n"); +f.write("#else\n") f.write("#define GLWRP_APIENTRY \n") -f.write("#endif\n\n"); +f.write("#endif\n\n") for x in types: f.write(x + "\n") @@ -150,7 +150,7 @@ for x in functions: f.write("#define " + x["name"] + " __wrapper_" + x["name"] + "\n") f.write("\n\n") -f.write("typedef void (*GLWrapperFuncPtr)(void);\n\n"); +f.write("typedef void (*GLWrapperFuncPtr)(void);\n\n") f.write("void glWrapperInit( GLWrapperFuncPtr (*wrapperFunc)(const char*) );\n") f.write("#ifdef __cplusplus\n}\n#endif\n") |
