summaryrefslogtreecommitdiff
path: root/servers/extensions
diff options
context:
space:
mode:
Diffstat (limited to 'servers/extensions')
-rw-r--r--servers/extensions/SCsub5
-rw-r--r--servers/extensions/make_wrappers.py93
-rw-r--r--servers/extensions/physics_server_3d_extension.h2
3 files changed, 1 insertions, 99 deletions
diff --git a/servers/extensions/SCsub b/servers/extensions/SCsub
index eac66ea283..ba73353f2a 100644
--- a/servers/extensions/SCsub
+++ b/servers/extensions/SCsub
@@ -2,11 +2,6 @@
Import("env")
-import make_wrappers
-from platform_methods import run_in_subprocess
-
-env.CommandNoCache(["ext_wrappers.gen.inc"], "make_wrappers.py", run_in_subprocess(make_wrappers.run))
-
env_object = env.Clone()
env_object.add_source_files(env.servers_sources, "*.cpp")
diff --git a/servers/extensions/make_wrappers.py b/servers/extensions/make_wrappers.py
deleted file mode 100644
index 862d313fba..0000000000
--- a/servers/extensions/make_wrappers.py
+++ /dev/null
@@ -1,93 +0,0 @@
-proto = """
-#define EXBIND$VER($RETTYPE m_name$ARG) \\
-GDVIRTUAL$VER($RETTYPE_##m_name$ARG)\\
-virtual $RETVAL m_name($FUNCARGS) $CONST override { \\
- $RETPRE\\
- GDVIRTUAL_REQUIRED_CALL(_##m_name$CALLARGS$RETREF);\\
- $RETPOST\\
-}
-"""
-
-
-def generate_version(argcount, const=False, returns=False):
- s = proto
- sproto = str(argcount)
- method_info = ""
- if returns:
- sproto += "R"
- s = s.replace("$RETTYPE", "m_ret, ")
- s = s.replace("$RETVAL", "m_ret")
- s = s.replace("$RETPRE", "m_ret ret; ZeroInitializer<m_ret>::initialize(ret);\\\n")
- s = s.replace("$RETPOST", "return ret;\\\n")
-
- else:
- s = s.replace("$RETTYPE", "")
- s = s.replace("$RETVAL", "void")
- s = s.replace("$RETPRE", "")
- s = s.replace("$RETPOST", "return;")
-
- if const:
- sproto += "C"
- s = s.replace("$CONST", "const")
- else:
- s = s.replace("$CONST", "")
-
- s = s.replace("$VER", sproto)
- argtext = ""
- funcargs = ""
- callargs = ""
-
- for i in range(argcount):
- if i > 0:
- funcargs += ", "
-
- argtext += ", m_type" + str(i + 1)
- funcargs += "m_type" + str(i + 1) + " arg" + str(i + 1)
- callargs += ", arg" + str(i + 1)
-
- if argcount:
- s = s.replace("$ARG", argtext)
- s = s.replace("$FUNCARGS", funcargs)
- s = s.replace("$CALLARGS", callargs)
- else:
- s = s.replace("$ARG", "")
- s = s.replace("$FUNCARGS", funcargs)
- s = s.replace("$CALLARGS", callargs)
-
- if returns:
- s = s.replace("$RETREF", ", ret")
- else:
- s = s.replace("$RETREF", "")
-
- return s
-
-
-def run(target, source, env):
-
- max_versions = 12
-
- txt = """
-#ifndef GDEXTENSION_WRAPPERS_GEN_H
-#define GDEXTENSION_WRAPPERS_GEN_H
-
-
-"""
-
- for i in range(max_versions + 1):
-
- txt += "/* " + str(i) + " Arguments */\n\n"
- txt += generate_version(i, False, False)
- txt += generate_version(i, False, True)
- txt += generate_version(i, True, False)
- txt += generate_version(i, True, True)
-
- txt += "#endif"
-
- with open(target[0], "w") as f:
- f.write(txt)
-
-
-if __name__ == "__main__":
- from platform_methods import subprocess_main
-
- subprocess_main(globals())
diff --git a/servers/extensions/physics_server_3d_extension.h b/servers/extensions/physics_server_3d_extension.h
index b40ab8a295..41a7746183 100644
--- a/servers/extensions/physics_server_3d_extension.h
+++ b/servers/extensions/physics_server_3d_extension.h
@@ -31,11 +31,11 @@
#ifndef PHYSICS_SERVER_3D_EXTENSION_H
#define PHYSICS_SERVER_3D_EXTENSION_H
+#include "core/extension/ext_wrappers.gen.inc"
#include "core/object/script_language.h"
#include "core/variant/native_ptr.h"
#include "core/variant/type_info.h"
#include "core/variant/typed_array.h"
-#include "servers/extensions/ext_wrappers.gen.inc"
#include "servers/physics_server_3d.h"
class PhysicsDirectBodyState3DExtension : public PhysicsDirectBodyState3D {