diff options
| author | Karroffel <therzog@mail.de> | 2017-07-24 14:23:09 +0200 |
|---|---|---|
| committer | Karroffel <therzog@mail.de> | 2017-07-24 17:08:52 +0200 |
| commit | c27af379b82bae4a3c2b0bc661b9e9e624cbdb51 (patch) | |
| tree | 46e4006bc9cf642b13641d00d90ded085be47812 /src | |
| parent | 2195f2e9a806726b3683ab2aee7699422951d4e5 (diff) | |
| download | redot-cpp-c27af379b82bae4a3c2b0bc661b9e9e624cbdb51.tar.gz | |
updated to use the new NativeScript and GDNative interface
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/Array.cpp | 2 | ||||
| -rw-r--r-- | src/core/Color.cpp | 2 | ||||
| -rw-r--r-- | src/core/Dictionary.cpp | 1 | ||||
| -rw-r--r-- | src/core/GodotGlobal.cpp | 23 | ||||
| -rw-r--r-- | src/core/NodePath.cpp | 2 | ||||
| -rw-r--r-- | src/core/PoolArrays.cpp | 2 | ||||
| -rw-r--r-- | src/core/RID.cpp | 2 | ||||
| -rw-r--r-- | src/core/String.cpp | 2 | ||||
| -rw-r--r-- | src/core/Variant.cpp | 2 | ||||
| -rw-r--r-- | src/core/Vector2.cpp | 2 |
10 files changed, 29 insertions, 11 deletions
diff --git a/src/core/Array.cpp b/src/core/Array.cpp index bb388c4..5ba66b2 100644 --- a/src/core/Array.cpp +++ b/src/core/Array.cpp @@ -2,8 +2,6 @@ #include <cstdlib> -#include <godot/godot_array.h> - #include "Variant.hpp" namespace godot { diff --git a/src/core/Color.cpp b/src/core/Color.cpp index 985e04e..a41615e 100644 --- a/src/core/Color.cpp +++ b/src/core/Color.cpp @@ -1,6 +1,6 @@ #include "Color.hpp" -#include <godot/godot_color.h> +#include <godot/color.h> #include <cmath> diff --git a/src/core/Dictionary.cpp b/src/core/Dictionary.cpp index 8ea2d17..61383e7 100644 --- a/src/core/Dictionary.cpp +++ b/src/core/Dictionary.cpp @@ -4,7 +4,6 @@ #include "Array.hpp" -#include <godot/godot_dictionary.h> namespace godot { diff --git a/src/core/GodotGlobal.cpp b/src/core/GodotGlobal.cpp index cd910ff..96a5fa6 100644 --- a/src/core/GodotGlobal.cpp +++ b/src/core/GodotGlobal.cpp @@ -2,10 +2,12 @@ #include "String.hpp" -#include <godot.h> +#include <godot/gdnative.h> namespace godot { +void *_RegisterState::nativescript_handle; + void Godot::print(const String& message) { godot_print((godot_string *) &message); @@ -22,3 +24,22 @@ void Godot::print_error(const String& description, const String& function, const } }; + +void gdnative_init(godot_gdnative_init_options *options); +extern "C" void GDN_EXPORT godot_gdnative_init(godot_gdnative_init_options *options) +{ + gdnative_init(options); +} + +void gdnative_terminate(godot_gdnative_terminate_options *options); +extern "C" void GDN_EXPORT godot_gdnative_terminate(godot_gdnative_terminate_options *options) +{ + gdnative_terminate(options); +} + +void nativescript_init(); +extern "C" void GDN_EXPORT godot_nativescript_init(void *handle) +{ + godot::_RegisterState::nativescript_handle = handle; + nativescript_init(); +} diff --git a/src/core/NodePath.cpp b/src/core/NodePath.cpp index 08ec27a..98c40c9 100644 --- a/src/core/NodePath.cpp +++ b/src/core/NodePath.cpp @@ -2,7 +2,7 @@ #include "String.hpp" -#include <godot/godot_node_path.h> +#include <godot/node_path.h> namespace godot { diff --git a/src/core/PoolArrays.cpp b/src/core/PoolArrays.cpp index 3e77814..e33ce0e 100644 --- a/src/core/PoolArrays.cpp +++ b/src/core/PoolArrays.cpp @@ -7,7 +7,7 @@ #include "Vector2.hpp" #include "Vector3.hpp" -#include <godot/godot_pool_arrays.h> +#include <godot/pool_arrays.h> namespace godot { diff --git a/src/core/RID.cpp b/src/core/RID.cpp index 1431a8a..75419ba 100644 --- a/src/core/RID.cpp +++ b/src/core/RID.cpp @@ -1,6 +1,6 @@ #include "RID.hpp" -#include <godot/godot_rid.h> +#include <godot/rid.h> namespace godot { diff --git a/src/core/String.cpp b/src/core/String.cpp index 84c8ee8..846241e 100644 --- a/src/core/String.cpp +++ b/src/core/String.cpp @@ -2,7 +2,7 @@ #include "NodePath.hpp" -#include <godot/godot_string.h> +#include <godot/string.h> #include <string.h> diff --git a/src/core/Variant.cpp b/src/core/Variant.cpp index 1c6eef2..fa72b66 100644 --- a/src/core/Variant.cpp +++ b/src/core/Variant.cpp @@ -1,6 +1,6 @@ #include "Variant.hpp" -#include <godot/godot_variant.h> +#include <godot/variant.h> #include "Defs.hpp" diff --git a/src/core/Vector2.cpp b/src/core/Vector2.cpp index d17f828..46f1125 100644 --- a/src/core/Vector2.cpp +++ b/src/core/Vector2.cpp @@ -2,7 +2,7 @@ #include <cmath> -#include <godot/godot_vector2.h> +#include <godot/vector2.h> #include "String.hpp" |
