From b2f4bb8314cef00531549a8b9a58b10e646c2053 Mon Sep 17 00:00:00 2001 From: Relintai Date: Thu, 25 May 2023 21:54:24 +0200 Subject: [PATCH] More cleanups. --- SCsub | 9 ++-- gdnative.h | 2 +- gdnative/aabb.cpp | 2 +- gdnative/array.cpp | 2 +- gdnative/basis.cpp | 2 +- gdnative/color.cpp | 2 +- gdnative/dictionary.cpp | 2 +- gdnative/gdnative.cpp | 2 +- gdnative/node_path.cpp | 2 +- gdnative/plane.cpp | 2 +- gdnative/pool_arrays.cpp | 2 +- gdnative/quat.cpp | 2 +- gdnative/rect2.cpp | 2 +- gdnative/rid.cpp | 2 +- gdnative/string.cpp | 2 +- gdnative/string_name.cpp | 2 +- gdnative/transform.cpp | 2 +- gdnative/transform2d.cpp | 2 +- gdnative/variant.cpp | 2 +- gdnative/vector2.cpp | 2 +- gdnative/vector3.cpp | 2 +- gdnative_api.json | 6 +-- gdnative_builders.py | 4 +- include/android/godot_android.h | 2 +- include/{gdnative => gdn}/aabb.h | 6 +-- include/{gdnative => gdn}/array.h | 6 +-- include/{gdnative => gdn}/basis.h | 6 +-- include/{gdnative => gdn}/color.h | 4 +- include/{gdnative => gdn}/dictionary.h | 6 +-- include/{gdnative => gdn}/gdnative.h | 36 +++++++------- include/{gdnative => gdn}/node_path.h | 4 +- include/{gdnative => gdn}/plane.h | 4 +- include/{gdnative => gdn}/pool_arrays.h | 10 ++-- include/{gdnative => gdn}/quaternion.h | 4 +- include/{gdnative => gdn}/rect2.h | 4 +- include/{gdnative => gdn}/rid.h | 2 +- include/{gdnative => gdn}/string.h | 6 +-- include/{gdnative => gdn}/string_name.h | 2 +- include/{gdnative => gdn}/transform.h | 8 +-- include/{gdnative => gdn}/transform2d.h | 6 +-- include/{gdnative => gdn}/variant.h | 36 +++++++------- include/{gdnative => gdn}/vector2.h | 2 +- include/{gdnative => gdn}/vector3.h | 4 +- include/nativescript/godot_nativescript.h | 2 +- include/net/godot_net.h | 2 +- include/pluginscript/godot_pluginscript.h | 2 +- include/videodecoder/godot_videodecoder.h | 2 +- net/multiplayer_peer_gdnative.h | 4 +- net/packet_peer_gdnative.h | 4 +- net/webrtc_gdnative.cpp | 60 ----------------------- videodecoder/SCsub | 4 +- 51 files changed, 121 insertions(+), 176 deletions(-) rename include/{gdnative => gdn}/aabb.h (98%) rename include/{gdnative => gdn}/array.h (98%) rename include/{gdnative => gdn}/basis.h (98%) rename include/{gdnative => gdn}/color.h (98%) rename include/{gdnative => gdn}/dictionary.h (98%) rename include/{gdnative => gdn}/gdnative.h (94%) rename include/{gdnative => gdn}/node_path.h (98%) rename include/{gdnative => gdn}/plane.h (98%) rename include/{gdnative => gdn}/pool_arrays.h (99%) rename include/{gdnative => gdn}/quaternion.h (98%) rename include/{gdnative => gdn}/rect2.h (98%) rename include/{gdnative => gdn}/rid.h (99%) rename include/{gdnative => gdn}/string.h (99%) rename include/{gdnative => gdn}/string_name.h (99%) rename include/{gdnative => gdn}/transform.h (97%) rename include/{gdnative => gdn}/transform2d.h (98%) rename include/{gdnative => gdn}/variant.h (95%) rename include/{gdnative => gdn}/vector2.h (99%) rename include/{gdnative => gdn}/vector3.h (99%) delete mode 100644 net/webrtc_gdnative.cpp diff --git a/SCsub b/SCsub index 7e97069..1b2ecfc 100644 --- a/SCsub +++ b/SCsub @@ -1,9 +1,14 @@ #!/usr/bin/env python +import os + Import("env") Import("env_modules") env_gdnative = env_modules.Clone() + +env_gdnative.Prepend(CPPPATH=[os.path.normpath(os.path.abspath("./include/"))]) + env_gdnative.add_source_files(env.modules_sources, "gdnative.cpp") env_gdnative.add_source_files(env.modules_sources, "register_types.cpp") env_gdnative.add_source_files(env.modules_sources, "android/*.cpp") @@ -12,8 +17,6 @@ env_gdnative.add_source_files(env.modules_sources, "nativescript/*.cpp") env_gdnative.add_source_files(env.modules_sources, "gdnative_library_singleton_editor.cpp") env_gdnative.add_source_files(env.modules_sources, "gdnative_library_editor_plugin.cpp") -env_gdnative.Prepend(CPPPATH=["./include/"]) - Export("env_gdnative") SConscript("net/SCsub") @@ -43,7 +46,7 @@ if get_cmdline_bool("gdnative_wrapper", False): ) gd_wrapper_env = env.Clone() - gd_wrapper_env.Prepend(CPPPATH=["#modules/gdnative/include/"]) + gd_wrapper_env.Prepend(CPPPATH=[os.path.normpath(os.path.abspath("./include/"))]) if gd_wrapper_env["use_lto"]: if not env.msvc: diff --git a/gdnative.h b/gdnative.h index f272049..1aa892f 100644 --- a/gdnative.h +++ b/gdnative.h @@ -36,7 +36,7 @@ #include "core/os/thread_safe.h" #include "core/object/resource.h" -#include "include/gdnative/gdnative.h" +#include "include/gdn/gdnative.h" #include "include/gdnative_api_struct.gen.h" #include "core/io/config_file.h" diff --git a/gdnative/aabb.cpp b/gdnative/aabb.cpp index ace1ff4..bbde2d3 100644 --- a/gdnative/aabb.cpp +++ b/gdnative/aabb.cpp @@ -28,7 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#include "gdnative/aabb.h" +#include "gdn/aabb.h" #include "core/math/aabb.h" #include "core/variant/variant.h" diff --git a/gdnative/array.cpp b/gdnative/array.cpp index 1c68bb9..0d0ac86 100644 --- a/gdnative/array.cpp +++ b/gdnative/array.cpp @@ -28,7 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#include "gdnative/array.h" +#include "gdn/array.h" #include "core/variant/array.h" #include "core/os/memory.h" diff --git a/gdnative/basis.cpp b/gdnative/basis.cpp index 1a4b473..c63253e 100644 --- a/gdnative/basis.cpp +++ b/gdnative/basis.cpp @@ -28,7 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#include "gdnative/basis.h" +#include "gdn/basis.h" #include "core/math/basis.h" #include "core/variant/variant.h" diff --git a/gdnative/color.cpp b/gdnative/color.cpp index ed884de..4cc9e92 100644 --- a/gdnative/color.cpp +++ b/gdnative/color.cpp @@ -28,7 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#include "gdnative/color.h" +#include "gdn/color.h" #include "core/math/color.h" #include "core/variant/variant.h" diff --git a/gdnative/dictionary.cpp b/gdnative/dictionary.cpp index 69eebde..0b1a629 100644 --- a/gdnative/dictionary.cpp +++ b/gdnative/dictionary.cpp @@ -28,7 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#include "gdnative/dictionary.h" +#include "gdn/dictionary.h" #include "core/variant/variant.h" // core/variant.h before to avoid compile errors with MSVC diff --git a/gdnative/gdnative.cpp b/gdnative/gdnative.cpp index dcf9705..9963cdd 100644 --- a/gdnative/gdnative.cpp +++ b/gdnative/gdnative.cpp @@ -28,7 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#include "gdnative/gdnative.h" +#include "gdn/gdnative.h" #include "core/object/class_db.h" #include "core/config/engine.h" diff --git a/gdnative/node_path.cpp b/gdnative/node_path.cpp index 8345e20..b81ba65 100644 --- a/gdnative/node_path.cpp +++ b/gdnative/node_path.cpp @@ -28,7 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#include "gdnative/node_path.h" +#include "gdn/node_path.h" #include "core/string/node_path.h" #include "core/variant/variant.h" diff --git a/gdnative/plane.cpp b/gdnative/plane.cpp index 83d003b..36e3b7c 100644 --- a/gdnative/plane.cpp +++ b/gdnative/plane.cpp @@ -28,7 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#include "gdnative/plane.h" +#include "gdn/plane.h" #include "core/math/plane.h" #include "core/variant/variant.h" diff --git a/gdnative/pool_arrays.cpp b/gdnative/pool_arrays.cpp index df4ba7a..daf4dec 100644 --- a/gdnative/pool_arrays.cpp +++ b/gdnative/pool_arrays.cpp @@ -28,7 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#include "gdnative/pool_arrays.h" +#include "gdn/pool_arrays.h" #include "core/variant/array.h" #include "core/containers/pool_vector.h" diff --git a/gdnative/quat.cpp b/gdnative/quat.cpp index 2b938c9..368146d 100644 --- a/gdnative/quat.cpp +++ b/gdnative/quat.cpp @@ -28,7 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#include "gdnative/quaternion.h" +#include "gdn/quaternion.h" #include "core/math/quaternion.h" #include "core/variant/variant.h" diff --git a/gdnative/rect2.cpp b/gdnative/rect2.cpp index 0efca3d..84eda39 100644 --- a/gdnative/rect2.cpp +++ b/gdnative/rect2.cpp @@ -28,7 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#include "gdnative/rect2.h" +#include "gdn/rect2.h" #include "core/math/transform_2d.h" #include "core/variant/variant.h" diff --git a/gdnative/rid.cpp b/gdnative/rid.cpp index c17f7c4..71a48aa 100644 --- a/gdnative/rid.cpp +++ b/gdnative/rid.cpp @@ -28,7 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#include "gdnative/rid.h" +#include "gdn/rid.h" #include "core/object/resource.h" #include "core/containers/rid.h" diff --git a/gdnative/string.cpp b/gdnative/string.cpp index a031073..2db7e6e 100644 --- a/gdnative/string.cpp +++ b/gdnative/string.cpp @@ -28,7 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#include "gdnative/string.h" +#include "gdn/string.h" #include "core/string/string_name.h" #include "core/string/ustring.h" diff --git a/gdnative/string_name.cpp b/gdnative/string_name.cpp index 9ce53b7..1b0b71b 100644 --- a/gdnative/string_name.cpp +++ b/gdnative/string_name.cpp @@ -28,7 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#include "gdnative/string_name.h" +#include "gdn/string_name.h" #include "core/string/string_name.h" #include "core/string/ustring.h" diff --git a/gdnative/transform.cpp b/gdnative/transform.cpp index 8b29686..b4ac3f8 100644 --- a/gdnative/transform.cpp +++ b/gdnative/transform.cpp @@ -28,7 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#include "gdnative/transform.h" +#include "gdn/transform.h" #include "core/math/transform.h" #include "core/variant/variant.h" diff --git a/gdnative/transform2d.cpp b/gdnative/transform2d.cpp index af94149..ceffa15 100644 --- a/gdnative/transform2d.cpp +++ b/gdnative/transform2d.cpp @@ -28,7 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#include "gdnative/transform2d.h" +#include "gdn/transform2d.h" #include "core/math/transform_2d.h" #include "core/variant/variant.h" diff --git a/gdnative/variant.cpp b/gdnative/variant.cpp index f703f0f..4b03b4a 100644 --- a/gdnative/variant.cpp +++ b/gdnative/variant.cpp @@ -28,7 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#include "gdnative/variant.h" +#include "gdn/variant.h" #include "core/object/reference.h" #include "core/variant/variant.h" diff --git a/gdnative/vector2.cpp b/gdnative/vector2.cpp index f50780a..89d0f82 100644 --- a/gdnative/vector2.cpp +++ b/gdnative/vector2.cpp @@ -28,7 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#include "gdnative/vector2.h" +#include "gdn/vector2.h" #include "core/math/vector2.h" #include "core/variant/variant.h" diff --git a/gdnative/vector3.cpp b/gdnative/vector3.cpp index 461e254..53895af 100644 --- a/gdnative/vector3.cpp +++ b/gdnative/vector3.cpp @@ -28,7 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#include "gdnative/vector3.h" +#include "gdn/vector3.h" #include "core/variant/variant.h" #include "core/containers/vector.h" diff --git a/gdnative_api.json b/gdnative_api.json index 0a49c76..8aca6e6 100644 --- a/gdnative_api.json +++ b/gdnative_api.json @@ -5076,7 +5076,7 @@ }, { "name": "godot_string_operator_index", - "return_type": "const wchar_t *", + "return_type": "const char32_t *", "arguments": [ ["godot_string *", "p_self"], ["const godot_int", "p_idx"] @@ -5084,7 +5084,7 @@ }, { "name": "godot_string_operator_index_const", - "return_type": "wchar_t", + "return_type": "char32_t", "arguments": [ ["const godot_string *", "p_self"], ["const godot_int", "p_idx"] @@ -5092,7 +5092,7 @@ }, { "name": "godot_string_wide_str", - "return_type": "const wchar_t *", + "return_type": "const char32_t *", "arguments": [ ["const godot_string *", "p_self"] ] diff --git a/gdnative_builders.py b/gdnative_builders.py index 55c3eaf..ae337b8 100644 --- a/gdnative_builders.py +++ b/gdnative_builders.py @@ -42,7 +42,7 @@ def _build_gdnative_api_struct_header(api): "#ifndef GODOT_GDNATIVE_API_STRUCT_H", "#define GODOT_GDNATIVE_API_STRUCT_H", "", - "#include ", + "#include ", "#include ", "#include ", "#include ", @@ -282,7 +282,7 @@ def _build_gdnative_wrapper_code(api): out = [ "/* THIS FILE IS GENERATED DO NOT EDIT */", "", - "#include ", + "#include ", "#include ", "#include ", "#include ", diff --git a/include/android/godot_android.h b/include/android/godot_android.h index c018f39..a5eb286 100644 --- a/include/android/godot_android.h +++ b/include/android/godot_android.h @@ -31,7 +31,7 @@ #ifndef GODOT_ANDROID_H #define GODOT_ANDROID_H -#include +#include #ifdef __ANDROID__ #include diff --git a/include/gdnative/aabb.h b/include/gdn/aabb.h similarity index 98% rename from include/gdnative/aabb.h rename to include/gdn/aabb.h index 7c77b15..91ffaf1 100644 --- a/include/gdnative/aabb.h +++ b/include/gdn/aabb.h @@ -51,9 +51,9 @@ typedef struct { } #endif -#include -#include -#include +#include +#include +#include #ifdef __cplusplus extern "C" { diff --git a/include/gdnative/array.h b/include/gdn/array.h similarity index 98% rename from include/gdnative/array.h rename to include/gdn/array.h index b25cb2a..052911c 100644 --- a/include/gdnative/array.h +++ b/include/gdn/array.h @@ -51,10 +51,10 @@ typedef struct { } #endif -#include -#include +#include +#include -#include +#include #ifdef __cplusplus extern "C" { diff --git a/include/gdnative/basis.h b/include/gdn/basis.h similarity index 98% rename from include/gdnative/basis.h rename to include/gdn/basis.h index 996f0e6..1055988 100644 --- a/include/gdnative/basis.h +++ b/include/gdn/basis.h @@ -51,9 +51,9 @@ typedef struct { } #endif -#include -#include -#include +#include +#include +#include #ifdef __cplusplus extern "C" { diff --git a/include/gdnative/color.h b/include/gdn/color.h similarity index 98% rename from include/gdnative/color.h rename to include/gdn/color.h index aff6d81..11ca075 100644 --- a/include/gdnative/color.h +++ b/include/gdn/color.h @@ -51,8 +51,8 @@ typedef struct { } #endif -#include -#include +#include +#include #ifdef __cplusplus extern "C" { diff --git a/include/gdnative/dictionary.h b/include/gdn/dictionary.h similarity index 98% rename from include/gdnative/dictionary.h rename to include/gdn/dictionary.h index 18a7a7b..4b213c5 100644 --- a/include/gdnative/dictionary.h +++ b/include/gdn/dictionary.h @@ -51,9 +51,9 @@ typedef struct { } #endif -#include -#include -#include +#include +#include +#include #ifdef __cplusplus extern "C" { diff --git a/include/gdnative/gdnative.h b/include/gdn/gdnative.h similarity index 94% rename from include/gdnative/gdnative.h rename to include/gdn/gdnative.h index 220686c..fd4121e 100644 --- a/include/gdnative/gdnative.h +++ b/include/gdn/gdnative.h @@ -142,76 +142,76 @@ typedef void godot_object; /////// String -#include +#include /////// String name -#include +#include ////// Vector2 -#include +#include ////// Rect2 -#include +#include ////// Vector3 -#include +#include ////// Transform2D -#include +#include /////// Plane -#include +#include /////// Quaternion -#include +#include /////// AABB -#include +#include /////// Basis -#include +#include /////// Transform -#include +#include /////// Color -#include +#include /////// NodePath -#include +#include /////// RID -#include +#include /////// Dictionary -#include +#include /////// Array -#include +#include // single API file for Pool*Array -#include +#include void GDAPI godot_object_destroy(godot_object *p_o); ////// Variant -#include +#include ////// Singleton API diff --git a/include/gdnative/node_path.h b/include/gdn/node_path.h similarity index 98% rename from include/gdnative/node_path.h rename to include/gdn/node_path.h index 9d9f679..b65ec7c 100644 --- a/include/gdnative/node_path.h +++ b/include/gdn/node_path.h @@ -51,8 +51,8 @@ typedef struct { } #endif -#include -#include +#include +#include #ifdef __cplusplus extern "C" { diff --git a/include/gdnative/plane.h b/include/gdn/plane.h similarity index 98% rename from include/gdnative/plane.h rename to include/gdn/plane.h index b66c87b..b2ee261 100644 --- a/include/gdnative/plane.h +++ b/include/gdn/plane.h @@ -51,8 +51,8 @@ typedef struct { } #endif -#include -#include +#include +#include #ifdef __cplusplus extern "C" { diff --git a/include/gdnative/pool_arrays.h b/include/gdn/pool_arrays.h similarity index 99% rename from include/gdnative/pool_arrays.h rename to include/gdn/pool_arrays.h index 32c539a..2cccb85 100644 --- a/include/gdnative/pool_arrays.h +++ b/include/gdn/pool_arrays.h @@ -151,12 +151,12 @@ typedef struct { } #endif -#include -#include -#include -#include +#include +#include +#include +#include -#include +#include #ifdef __cplusplus extern "C" { diff --git a/include/gdnative/quaternion.h b/include/gdn/quaternion.h similarity index 98% rename from include/gdnative/quaternion.h rename to include/gdn/quaternion.h index 93aab5a..621bbc0 100644 --- a/include/gdnative/quaternion.h +++ b/include/gdn/quaternion.h @@ -51,8 +51,8 @@ typedef struct { } #endif -#include -#include +#include +#include #ifdef __cplusplus extern "C" { diff --git a/include/gdnative/rect2.h b/include/gdn/rect2.h similarity index 98% rename from include/gdnative/rect2.h rename to include/gdn/rect2.h index 14fbf55..c6f9e27 100644 --- a/include/gdnative/rect2.h +++ b/include/gdn/rect2.h @@ -49,8 +49,8 @@ typedef struct godot_rect2 { } #endif -#include -#include +#include +#include #ifdef __cplusplus extern "C" { diff --git a/include/gdnative/rid.h b/include/gdn/rid.h similarity index 99% rename from include/gdnative/rid.h rename to include/gdn/rid.h index fedc4c1..9232ed3 100644 --- a/include/gdnative/rid.h +++ b/include/gdn/rid.h @@ -51,7 +51,7 @@ typedef struct { } #endif -#include +#include #ifdef __cplusplus extern "C" { diff --git a/include/gdnative/string.h b/include/gdn/string.h similarity index 99% rename from include/gdnative/string.h rename to include/gdn/string.h index db74b97..4806269 100644 --- a/include/gdnative/string.h +++ b/include/gdn/string.h @@ -64,9 +64,9 @@ typedef struct { } #endif -#include -#include -#include +#include +#include +#include #ifdef __cplusplus extern "C" { diff --git a/include/gdnative/string_name.h b/include/gdn/string_name.h similarity index 99% rename from include/gdnative/string_name.h rename to include/gdn/string_name.h index e8d7d06..8503cdb 100644 --- a/include/gdnative/string_name.h +++ b/include/gdn/string_name.h @@ -52,7 +52,7 @@ typedef struct { } #endif -#include +#include #ifdef __cplusplus extern "C" { diff --git a/include/gdnative/transform.h b/include/gdn/transform.h similarity index 97% rename from include/gdnative/transform.h rename to include/gdn/transform.h index b9392bd..a9482b6 100644 --- a/include/gdnative/transform.h +++ b/include/gdn/transform.h @@ -51,10 +51,10 @@ typedef struct { } #endif -#include -#include -#include -#include +#include +#include +#include +#include #ifdef __cplusplus extern "C" { diff --git a/include/gdnative/transform2d.h b/include/gdn/transform2d.h similarity index 98% rename from include/gdnative/transform2d.h rename to include/gdn/transform2d.h index 4b997fb..ff18386 100644 --- a/include/gdnative/transform2d.h +++ b/include/gdn/transform2d.h @@ -51,9 +51,9 @@ typedef struct { } #endif -#include -#include -#include +#include +#include +#include #ifdef __cplusplus extern "C" { diff --git a/include/gdnative/variant.h b/include/gdn/variant.h similarity index 95% rename from include/gdnative/variant.h rename to include/gdn/variant.h index 780dbce..b698fa6 100644 --- a/include/gdnative/variant.h +++ b/include/gdn/variant.h @@ -144,25 +144,25 @@ typedef enum godot_variant_operator { } #endif -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include -#include +#include #ifdef __cplusplus extern "C" { diff --git a/include/gdnative/vector2.h b/include/gdn/vector2.h similarity index 99% rename from include/gdnative/vector2.h rename to include/gdn/vector2.h index 7853f2e..34612fa 100644 --- a/include/gdnative/vector2.h +++ b/include/gdn/vector2.h @@ -51,7 +51,7 @@ typedef struct { } #endif -#include +#include #ifdef __cplusplus extern "C" { diff --git a/include/gdnative/vector3.h b/include/gdn/vector3.h similarity index 99% rename from include/gdnative/vector3.h rename to include/gdn/vector3.h index a66d7cf..bcf207f 100644 --- a/include/gdnative/vector3.h +++ b/include/gdn/vector3.h @@ -51,8 +51,8 @@ typedef struct { } #endif -#include -#include +#include +#include #ifdef __cplusplus extern "C" { diff --git a/include/nativescript/godot_nativescript.h b/include/nativescript/godot_nativescript.h index 29aac06..6cf5130 100644 --- a/include/nativescript/godot_nativescript.h +++ b/include/nativescript/godot_nativescript.h @@ -31,7 +31,7 @@ #ifndef GODOT_NATIVESCRIPT_H #define GODOT_NATIVESCRIPT_H -#include +#include #ifdef __cplusplus extern "C" { diff --git a/include/net/godot_net.h b/include/net/godot_net.h index 9adabf4..9ade1d7 100644 --- a/include/net/godot_net.h +++ b/include/net/godot_net.h @@ -31,7 +31,7 @@ #ifndef GODOT_NET_H #define GODOT_NET_H -#include +#include #ifdef __cplusplus extern "C" { diff --git a/include/pluginscript/godot_pluginscript.h b/include/pluginscript/godot_pluginscript.h index dba274f..d2bbdf9 100644 --- a/include/pluginscript/godot_pluginscript.h +++ b/include/pluginscript/godot_pluginscript.h @@ -31,7 +31,7 @@ #ifndef GODOT_PLUGINSCRIPT_H #define GODOT_PLUGINSCRIPT_H -#include +#include #include #ifdef __cplusplus diff --git a/include/videodecoder/godot_videodecoder.h b/include/videodecoder/godot_videodecoder.h index 1dbb3d0..73c7355 100644 --- a/include/videodecoder/godot_videodecoder.h +++ b/include/videodecoder/godot_videodecoder.h @@ -31,7 +31,7 @@ #ifndef GODOT_VIDEODECODER_H #define GODOT_VIDEODECODER_H -#include +#include #ifdef __cplusplus extern "C" { diff --git a/net/multiplayer_peer_gdnative.h b/net/multiplayer_peer_gdnative.h index 7cb7bc9..30f5dba 100644 --- a/net/multiplayer_peer_gdnative.h +++ b/net/multiplayer_peer_gdnative.h @@ -33,8 +33,8 @@ #include "core/io/networked_multiplayer_peer.h" -#include "../include/gdnative/gdnative.h" -#include "../include/net/godot_net.h" +#include "gdn/gdnative.h" +#include "net/godot_net.h" class MultiplayerPeerGDNative : public NetworkedMultiplayerPeer { GDCLASS(MultiplayerPeerGDNative, NetworkedMultiplayerPeer); diff --git a/net/packet_peer_gdnative.h b/net/packet_peer_gdnative.h index fa2a0be..8f8f1cd 100644 --- a/net/packet_peer_gdnative.h +++ b/net/packet_peer_gdnative.h @@ -33,8 +33,8 @@ #include "core/io/packet_peer.h" -#include "../include/gdnative/gdnative.h" -#include "../include/net/godot_net.h" +#include "gdn/gdnative.h" +#include "net/godot_net.h" class PacketPeerGDNative : public PacketPeer { GDCLASS(PacketPeerGDNative, PacketPeer); diff --git a/net/webrtc_gdnative.cpp b/net/webrtc_gdnative.cpp deleted file mode 100644 index debd08f..0000000 --- a/net/webrtc_gdnative.cpp +++ /dev/null @@ -1,60 +0,0 @@ -/**************************************************************************/ -/* webrtc_gdnative.cpp */ -/**************************************************************************/ -/* This file is part of: */ -/* GODOT ENGINE */ -/* https://godotengine.org */ -/**************************************************************************/ -/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ -/* */ -/* Permission is hereby granted, free of charge, to any person obtaining */ -/* a copy of this software and associated documentation files (the */ -/* "Software"), to deal in the Software without restriction, including */ -/* without limitation the rights to use, copy, modify, merge, publish, */ -/* distribute, sublicense, and/or sell copies of the Software, and to */ -/* permit persons to whom the Software is furnished to do so, subject to */ -/* the following conditions: */ -/* */ -/* The above copyright notice and this permission notice shall be */ -/* included in all copies or substantial portions of the Software. */ -/* */ -/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ -/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ -/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */ -/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ -/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ -/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ -/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -/**************************************************************************/ - -#include "../gdnative.h" -#include "../include/net/godot_net.h" - -#ifdef WEBRTC_GDNATIVE_ENABLED -#include "webrtc/webrtc_data_channel_gdnative.h" -#include "webrtc/webrtc_peer_connection_gdnative.h" -#endif - -extern "C" { - -void GDAPI godot_net_bind_webrtc_peer_connection(godot_object *p_obj, const godot_net_webrtc_peer_connection *p_impl) { -#ifdef WEBRTC_GDNATIVE_ENABLED - ((WebRTCPeerConnectionGDNative *)p_obj)->set_native_webrtc_peer_connection(p_impl); -#endif -} - -void GDAPI godot_net_bind_webrtc_data_channel(godot_object *p_obj, const godot_net_webrtc_data_channel *p_impl) { -#ifdef WEBRTC_GDNATIVE_ENABLED - ((WebRTCDataChannelGDNative *)p_obj)->set_native_webrtc_data_channel(p_impl); -#endif -} - -godot_error GDAPI godot_net_set_webrtc_library(const godot_net_webrtc_library *p_lib) { -#ifdef WEBRTC_GDNATIVE_ENABLED - return (godot_error)WebRTCPeerConnectionGDNative::set_default_library(p_lib); -#else - return (godot_error)ERR_UNAVAILABLE; -#endif -} -} diff --git a/videodecoder/SCsub b/videodecoder/SCsub index 5948b9a..92eeda7 100644 --- a/videodecoder/SCsub +++ b/videodecoder/SCsub @@ -1,9 +1,11 @@ #!/usr/bin/env python +import os + Import("env") Import("env_modules") env_vsdecoder_gdnative = env_modules.Clone() -env_vsdecoder_gdnative.Prepend(CPPPATH=["#modules/gdnative/include/"]) +env_vsdecoder_gdnative.Prepend(CPPPATH=[os.path.normpath(os.path.abspath("../include/"))]) env_vsdecoder_gdnative.add_source_files(env.modules_sources, "*.cpp")