Ver Fonte

merged gdnative and nativescript module

Karroffel há 8 anos atrás
pai
commit
7878329e6f
50 ficheiros alterados com 119 adições e 164 exclusões
  1. 8 4
      modules/gdnative/SCsub
  2. 1 1
      modules/gdnative/gdnative.h
  3. 1 1
      modules/gdnative/gdnative/array.cpp
  4. 1 1
      modules/gdnative/gdnative/basis.cpp
  5. 1 1
      modules/gdnative/gdnative/color.cpp
  6. 1 1
      modules/gdnative/gdnative/dictionary.cpp
  7. 1 2
      modules/gdnative/gdnative/gdnative.cpp
  8. 1 1
      modules/gdnative/gdnative/node_path.cpp
  9. 1 1
      modules/gdnative/gdnative/plane.cpp
  10. 1 1
      modules/gdnative/gdnative/pool_arrays.cpp
  11. 1 1
      modules/gdnative/gdnative/quat.cpp
  12. 1 1
      modules/gdnative/gdnative/rect2.cpp
  13. 1 1
      modules/gdnative/gdnative/rect3.cpp
  14. 1 1
      modules/gdnative/gdnative/rid.cpp
  15. 1 1
      modules/gdnative/gdnative/string.cpp
  16. 1 1
      modules/gdnative/gdnative/transform.cpp
  17. 1 1
      modules/gdnative/gdnative/transform2d.cpp
  18. 1 1
      modules/gdnative/gdnative/variant.cpp
  19. 1 1
      modules/gdnative/gdnative/vector2.cpp
  20. 1 1
      modules/gdnative/gdnative/vector3.cpp
  21. 0 23
      modules/gdnative/godot/icon.png.import
  22. 3 3
      modules/gdnative/include/gdnative/array.h
  23. 3 3
      modules/gdnative/include/gdnative/basis.h
  24. 2 2
      modules/gdnative/include/gdnative/color.h
  25. 3 3
      modules/gdnative/include/gdnative/dictionary.h
  26. 17 43
      modules/gdnative/include/gdnative/gdnative.h
  27. 2 2
      modules/gdnative/include/gdnative/node_path.h
  28. 2 2
      modules/gdnative/include/gdnative/plane.h
  29. 5 5
      modules/gdnative/include/gdnative/pool_arrays.h
  30. 2 2
      modules/gdnative/include/gdnative/quat.h
  31. 2 2
      modules/gdnative/include/gdnative/rect2.h
  32. 3 3
      modules/gdnative/include/gdnative/rect3.h
  33. 1 1
      modules/gdnative/include/gdnative/rid.h
  34. 2 2
      modules/gdnative/include/gdnative/string.h
  35. 4 4
      modules/gdnative/include/gdnative/transform.h
  36. 3 3
      modules/gdnative/include/gdnative/transform2d.h
  37. 19 19
      modules/gdnative/include/gdnative/variant.h
  38. 1 1
      modules/gdnative/include/gdnative/vector2.h
  39. 2 2
      modules/gdnative/include/gdnative/vector3.h
  40. 1 1
      modules/gdnative/include/nativescript/godot_nativescript.h
  41. 0 0
      modules/gdnative/nativescript/SCsub
  42. 0 0
      modules/gdnative/nativescript/api_generator.cpp
  43. 0 0
      modules/gdnative/nativescript/api_generator.h
  44. 4 4
      modules/gdnative/nativescript/godot_nativescript.cpp
  45. 1 1
      modules/gdnative/nativescript/nativescript.cpp
  46. 1 1
      modules/gdnative/nativescript/nativescript.h
  47. 0 0
      modules/gdnative/nativescript/register_types.cpp
  48. 0 0
      modules/gdnative/nativescript/register_types.h
  49. 9 0
      modules/gdnative/register_types.cpp
  50. 0 8
      modules/nativescript/config.py

+ 8 - 4
modules/gdnative/SCsub

@@ -2,12 +2,16 @@
 
 Import('env')
 
-env.add_source_files(env.modules_sources, "*.cpp")
-env.add_source_files(env.modules_sources, "godot/*.cpp")
+gdn_env = env.Clone()
 
-env.Append(CPPFLAGS=['-DGDAPI_BUILT_IN'])
-env.Append(CPPPATH=['#modules/gdnative/'])
+gdn_env.add_source_files(env.modules_sources, "*.cpp")
+gdn_env.add_source_files(env.modules_sources, "gdnative/*.cpp")
+gdn_env.add_source_files(env.modules_sources, "nativescript/*.cpp")
+
+gdn_env.Append(CPPFLAGS=['-DGDAPI_BUILT_IN'])
+gdn_env.Append(CPPPATH=['#modules/gdnative/include/'])
 
 if "platform" in env and env["platform"] == "x11": # there has to be a better solution?
     env.Append(LINKFLAGS=["-rdynamic"])
+
 env.use_ptrcall = True

+ 1 - 1
modules/gdnative/gdnative.h

@@ -35,7 +35,7 @@
 #include "os/thread_safe.h"
 #include "resource.h"
 
-#include <godot/gdnative.h>
+#include "gdnative/gdnative.h"
 
 class GDNativeLibrary : public Resource {
 	GDCLASS(GDNativeLibrary, Resource)

+ 1 - 1
modules/gdnative/godot/array.cpp → modules/gdnative/gdnative/array.cpp

@@ -27,7 +27,7 @@
 /* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE     */
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
 /*************************************************************************/
-#include <godot/array.h>
+#include "gdnative/array.h"
 
 #include "core/array.h"
 #include "core/os/memory.h"

+ 1 - 1
modules/gdnative/godot/basis.cpp → modules/gdnative/gdnative/basis.cpp

@@ -27,7 +27,7 @@
 /* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE     */
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
 /*************************************************************************/
-#include <godot/basis.h>
+#include "gdnative/basis.h"
 
 #include "core/math/matrix3.h"
 #include "core/variant.h"

+ 1 - 1
modules/gdnative/godot/color.cpp → modules/gdnative/gdnative/color.cpp

@@ -27,7 +27,7 @@
 /* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE     */
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
 /*************************************************************************/
-#include <godot/color.h>
+#include "gdnative/color.h"
 
 #include "core/color.h"
 #include "core/variant.h"

+ 1 - 1
modules/gdnative/godot/dictionary.cpp → modules/gdnative/gdnative/dictionary.cpp

@@ -27,7 +27,7 @@
 /* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE     */
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
 /*************************************************************************/
-#include <godot/dictionary.h>
+#include "gdnative/dictionary.h"
 
 #include "core/variant.h"
 // core/variant.h before to avoid compile errors with MSVC

+ 1 - 2
modules/gdnative/godot/gdnative.cpp → modules/gdnative/gdnative/gdnative.cpp

@@ -27,11 +27,10 @@
 /* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE     */
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
 /*************************************************************************/
-#include <godot/gdnative.h>
+#include "gdnative/gdnative.h"
 
 #include "class_db.h"
 #include "error_macros.h"
-#include "gdnative.h"
 #include "global_constants.h"
 #include "os/os.h"
 #include "project_settings.h"

+ 1 - 1
modules/gdnative/godot/node_path.cpp → modules/gdnative/gdnative/node_path.cpp

@@ -27,7 +27,7 @@
 /* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE     */
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
 /*************************************************************************/
-#include <godot/node_path.h>
+#include "gdnative/node_path.h"
 
 #include "core/node_path.h"
 #include "core/variant.h"

+ 1 - 1
modules/gdnative/godot/plane.cpp → modules/gdnative/gdnative/plane.cpp

@@ -27,7 +27,7 @@
 /* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE     */
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
 /*************************************************************************/
-#include <godot/plane.h>
+#include "gdnative/plane.h"
 
 #include "core/math/plane.h"
 #include "core/variant.h"

+ 1 - 1
modules/gdnative/godot/pool_arrays.cpp → modules/gdnative/gdnative/pool_arrays.cpp

@@ -27,7 +27,7 @@
 /* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE     */
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
 /*************************************************************************/
-#include <godot/pool_arrays.h>
+#include "gdnative/pool_arrays.h"
 
 #include "array.h"
 #include "core/variant.h"

+ 1 - 1
modules/gdnative/godot/quat.cpp → modules/gdnative/gdnative/quat.cpp

@@ -27,7 +27,7 @@
 /* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE     */
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
 /*************************************************************************/
-#include <godot/quat.h>
+#include "gdnative/quat.h"
 
 #include "core/math/quat.h"
 #include "core/variant.h"

+ 1 - 1
modules/gdnative/godot/rect2.cpp → modules/gdnative/gdnative/rect2.cpp

@@ -27,7 +27,7 @@
 /* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE     */
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
 /*************************************************************************/
-#include <godot/rect2.h>
+#include "gdnative/rect2.h"
 
 #include "core/math/math_2d.h"
 #include "core/variant.h"

+ 1 - 1
modules/gdnative/godot/rect3.cpp → modules/gdnative/gdnative/rect3.cpp

@@ -27,7 +27,7 @@
 /* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE     */
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
 /*************************************************************************/
-#include <godot/rect3.h>
+#include "gdnative/rect3.h"
 
 #include "core/math/rect3.h"
 #include "core/variant.h"

+ 1 - 1
modules/gdnative/godot/rid.cpp → modules/gdnative/gdnative/rid.cpp

@@ -27,7 +27,7 @@
 /* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE     */
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
 /*************************************************************************/
-#include <godot/rid.h>
+#include "gdnative/rid.h"
 
 #include "core/resource.h"
 #include "core/rid.h"

+ 1 - 1
modules/gdnative/godot/string.cpp → modules/gdnative/gdnative/string.cpp

@@ -27,7 +27,7 @@
 /* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE     */
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
 /*************************************************************************/
-#include <godot/string.h>
+#include "gdnative/string.h"
 
 #include "core/variant.h"
 #include "string_db.h"

+ 1 - 1
modules/gdnative/godot/transform.cpp → modules/gdnative/gdnative/transform.cpp

@@ -27,7 +27,7 @@
 /* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE     */
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
 /*************************************************************************/
-#include <godot/transform.h>
+#include "gdnative/transform.h"
 
 #include "core/math/transform.h"
 #include "core/variant.h"

+ 1 - 1
modules/gdnative/godot/transform2d.cpp → modules/gdnative/gdnative/transform2d.cpp

@@ -27,7 +27,7 @@
 /* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE     */
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
 /*************************************************************************/
-#include <godot/transform2d.h>
+#include "gdnative/transform2d.h"
 
 #include "core/math/math_2d.h"
 #include "core/variant.h"

+ 1 - 1
modules/gdnative/godot/variant.cpp → modules/gdnative/gdnative/variant.cpp

@@ -27,7 +27,7 @@
 /* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE     */
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
 /*************************************************************************/
-#include <godot/variant.h>
+#include "gdnative/variant.h"
 
 #include "core/variant.h"
 

+ 1 - 1
modules/gdnative/godot/vector2.cpp → modules/gdnative/gdnative/vector2.cpp

@@ -27,7 +27,7 @@
 /* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE     */
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
 /*************************************************************************/
-#include <godot/vector2.h>
+#include "gdnative/vector2.h"
 
 #include "core/math/math_2d.h"
 #include "core/variant.h"

+ 1 - 1
modules/gdnative/godot/vector3.cpp → modules/gdnative/gdnative/vector3.cpp

@@ -27,7 +27,7 @@
 /* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE     */
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
 /*************************************************************************/
-#include <godot/vector3.h>
+#include "gdnative/vector3.h"
 
 #include "core/variant.h"
 #include "core/vector.h"

+ 0 - 23
modules/gdnative/godot/icon.png.import

@@ -1,23 +0,0 @@
-[remap]
-
-importer="texture"
-type="StreamTexture"
-path="res://.import/icon.png-aa47d037a37fb38b3b7e7828e4eec407.stex"
-
-[params]
-
-compress/mode=0
-compress/lossy_quality=0.7
-compress/hdr_mode=0
-compress/normal_map=0
-flags/repeat=0
-flags/filter=true
-flags/mipmaps=false
-flags/anisotropic=false
-flags/srgb=2
-process/fix_alpha_border=true
-process/premult_alpha=false
-process/HDR_as_SRGB=false
-stream=false
-size_limit=0
-detect_3d=true

+ 3 - 3
modules/gdnative/godot/array.h → modules/gdnative/include/gdnative/array.h

@@ -46,10 +46,10 @@ typedef struct {
 } godot_array;
 #endif
 
-#include <godot/pool_arrays.h>
-#include <godot/variant.h>
+#include <gdnative/pool_arrays.h>
+#include <gdnative/variant.h>
 
-#include <godot/gdnative.h>
+#include <gdnative/gdnative.h>
 
 void GDAPI godot_array_new(godot_array *r_dest);
 void GDAPI godot_array_new_copy(godot_array *r_dest, const godot_array *p_src);

+ 3 - 3
modules/gdnative/godot/basis.h → modules/gdnative/include/gdnative/basis.h

@@ -45,9 +45,9 @@ typedef struct {
 } godot_basis;
 #endif
 
-#include <godot/gdnative.h>
-#include <godot/quat.h>
-#include <godot/vector3.h>
+#include <gdnative/gdnative.h>
+#include <gdnative/quat.h>
+#include <gdnative/vector3.h>
 
 void GDAPI godot_basis_new_with_rows(godot_basis *r_dest, const godot_vector3 *p_x_axis, const godot_vector3 *p_y_axis, const godot_vector3 *p_z_axis);
 void GDAPI godot_basis_new_with_axis_and_angle(godot_basis *r_dest, const godot_vector3 *p_axis, const godot_real p_phi);

+ 2 - 2
modules/gdnative/godot/color.h → modules/gdnative/include/gdnative/color.h

@@ -45,8 +45,8 @@ typedef struct {
 } godot_color;
 #endif
 
-#include <godot/gdnative.h>
-#include <godot/string.h>
+#include <gdnative/gdnative.h>
+#include <gdnative/string.h>
 
 void GDAPI godot_color_new_rgba(godot_color *r_dest, const godot_real p_r, const godot_real p_g, const godot_real p_b, const godot_real p_a);
 void GDAPI godot_color_new_rgb(godot_color *r_dest, const godot_real p_r, const godot_real p_g, const godot_real p_b);

+ 3 - 3
modules/gdnative/godot/dictionary.h → modules/gdnative/include/gdnative/dictionary.h

@@ -45,9 +45,9 @@ typedef struct {
 } godot_dictionary;
 #endif
 
-#include <godot/array.h>
-#include <godot/gdnative.h>
-#include <godot/variant.h>
+#include <gdnative/array.h>
+#include <gdnative/gdnative.h>
+#include <gdnative/variant.h>
 
 void GDAPI godot_dictionary_new(godot_dictionary *r_dest);
 void GDAPI godot_dictionary_new_copy(godot_dictionary *r_dest, const godot_dictionary *p_src);

+ 17 - 43
modules/gdnative/godot/gdnative.h → modules/gdnative/include/gdnative/gdnative.h

@@ -146,100 +146,74 @@ typedef float godot_real;
 /////// Object (forward declared)
 typedef void godot_object;
 
-/////// Brute force forward declarations for the rest
-/*
-typedef struct godot_variant godot_variant;
-typedef struct godot_string godot_string;
-typedef struct godot_vector2 godot_vector2;
-typedef struct godot_rect2 godot_rect2;
-typedef struct godot_vector3 godot_vector3;
-typedef struct godot_transform2d godot_transform2d;
-typedef struct godot_plane godot_plane;
-typedef struct godot_quat godot_quat;
-typedef struct godot_rect3 godot_rect3;
-typedef struct godot_basis godot_basis;
-typedef struct godot_transform godot_transform;
-typedef struct godot_color godot_color;
-typedef struct godot_node_path godot_node_path;
-typedef struct godot_rid godot_rid;
-typedef struct godot_dictionary godot_dictionary;
-typedef struct godot_array godot_array;
-typedef struct godot_pool_byte_array godot_pool_byte_array;
-typedef struct godot_pool_int_array godot_pool_int_array;
-typedef struct godot_pool_real_array godot_pool_real_array;
-typedef struct godot_pool_string_array godot_pool_string_array;
-typedef struct godot_pool_vector2_array godot_pool_vector2_array;
-typedef struct godot_pool_vector3_array godot_pool_vector3_array;
-typedef struct godot_pool_color_array godot_pool_color_array;
-*/
 /////// String
 
-#include <godot/string.h>
+#include <gdnative/string.h>
 
 ////// Vector2
 
-#include <godot/vector2.h>
+#include <gdnative/vector2.h>
 
 ////// Rect2
 
-#include <godot/rect2.h>
+#include <gdnative/rect2.h>
 
 ////// Vector3
 
-#include <godot/vector3.h>
+#include <gdnative/vector3.h>
 
 ////// Transform2D
 
-#include <godot/transform2d.h>
+#include <gdnative/transform2d.h>
 
 /////// Plane
 
-#include <godot/plane.h>
+#include <gdnative/plane.h>
 
 /////// Quat
 
-#include <godot/quat.h>
+#include <gdnative/quat.h>
 
 /////// Rect3
 
-#include <godot/rect3.h>
+#include <gdnative/rect3.h>
 
 /////// Basis
 
-#include <godot/basis.h>
+#include <gdnative/basis.h>
 
 /////// Transform
 
-#include <godot/transform.h>
+#include <gdnative/transform.h>
 
 /////// Color
 
-#include <godot/color.h>
+#include <gdnative/color.h>
 
 /////// NodePath
 
-#include <godot/node_path.h>
+#include <gdnative/node_path.h>
 
 /////// RID
 
-#include <godot/rid.h>
+#include <gdnative/rid.h>
 
 /////// Dictionary
 
-#include <godot/dictionary.h>
+#include <gdnative/dictionary.h>
 
 /////// Array
 
-#include <godot/array.h>
+#include <gdnative/array.h>
 
 // single API file for Pool*Array
-#include <godot/pool_arrays.h>
+#include <gdnative/pool_arrays.h>
 
 void GDAPI godot_object_destroy(godot_object *p_o);
 
 ////// Variant
 
-#include <godot/variant.h>
+#include <gdnative/variant.h>
 
 ////// Singleton API
 

+ 2 - 2
modules/gdnative/godot/node_path.h → modules/gdnative/include/gdnative/node_path.h

@@ -45,8 +45,8 @@ typedef struct {
 } godot_node_path;
 #endif
 
-#include <godot/gdnative.h>
-#include <godot/string.h>
+#include <gdnative/gdnative.h>
+#include <gdnative/string.h>
 
 void GDAPI godot_node_path_new(godot_node_path *r_dest, const godot_string *p_from);
 void GDAPI godot_node_path_new_copy(godot_node_path *r_dest, const godot_node_path *p_src);

+ 2 - 2
modules/gdnative/godot/plane.h → modules/gdnative/include/gdnative/plane.h

@@ -45,8 +45,8 @@ typedef struct {
 } godot_plane;
 #endif
 
-#include <godot/gdnative.h>
-#include <godot/vector3.h>
+#include <gdnative/gdnative.h>
+#include <gdnative/vector3.h>
 
 void GDAPI godot_plane_new_with_reals(godot_plane *r_dest, const godot_real p_a, const godot_real p_b, const godot_real p_c, const godot_real p_d);
 void GDAPI godot_plane_new_with_vectors(godot_plane *r_dest, const godot_vector3 *p_v1, const godot_vector3 *p_v2, const godot_vector3 *p_v3);

+ 5 - 5
modules/gdnative/godot/pool_arrays.h → modules/gdnative/include/gdnative/pool_arrays.h

@@ -113,12 +113,12 @@ typedef struct {
 } godot_pool_color_array;
 #endif
 
-#include <godot/array.h>
-#include <godot/color.h>
-#include <godot/vector2.h>
-#include <godot/vector3.h>
+#include <gdnative/array.h>
+#include <gdnative/color.h>
+#include <gdnative/vector2.h>
+#include <gdnative/vector3.h>
 
-#include <godot/gdnative.h>
+#include <gdnative/gdnative.h>
 
 // byte
 

+ 2 - 2
modules/gdnative/godot/quat.h → modules/gdnative/include/gdnative/quat.h

@@ -45,8 +45,8 @@ typedef struct {
 } godot_quat;
 #endif
 
-#include <godot/gdnative.h>
-#include <godot/vector3.h>
+#include <gdnative/gdnative.h>
+#include <gdnative/vector3.h>
 
 void GDAPI godot_quat_new(godot_quat *r_dest, const godot_real p_x, const godot_real p_y, const godot_real p_z, const godot_real p_w);
 void GDAPI godot_quat_new_with_axis_angle(godot_quat *r_dest, const godot_vector3 *p_axis, const godot_real p_angle);

+ 2 - 2
modules/gdnative/godot/rect2.h → modules/gdnative/include/gdnative/rect2.h

@@ -43,8 +43,8 @@ typedef struct godot_rect2 {
 } godot_rect2;
 #endif
 
-#include <godot/gdnative.h>
-#include <godot/vector2.h>
+#include <gdnative/gdnative.h>
+#include <gdnative/vector2.h>
 
 void GDAPI godot_rect2_new_with_position_and_size(godot_rect2 *r_dest, const godot_vector2 *p_pos, const godot_vector2 *p_size);
 void GDAPI godot_rect2_new(godot_rect2 *r_dest, const godot_real p_x, const godot_real p_y, const godot_real p_width, const godot_real p_height);

+ 3 - 3
modules/gdnative/godot/rect3.h → modules/gdnative/include/gdnative/rect3.h

@@ -45,9 +45,9 @@ typedef struct {
 } godot_rect3;
 #endif
 
-#include <godot/gdnative.h>
-#include <godot/plane.h>
-#include <godot/vector3.h>
+#include <gdnative/gdnative.h>
+#include <gdnative/plane.h>
+#include <gdnative/vector3.h>
 
 void GDAPI godot_rect3_new(godot_rect3 *r_dest, const godot_vector3 *p_pos, const godot_vector3 *p_size);
 

+ 1 - 1
modules/gdnative/godot/rid.h → modules/gdnative/include/gdnative/rid.h

@@ -45,7 +45,7 @@ typedef struct {
 } godot_rid;
 #endif
 
-#include <godot/gdnative.h>
+#include <gdnative/gdnative.h>
 
 void GDAPI godot_rid_new(godot_rid *r_dest);
 

+ 2 - 2
modules/gdnative/godot/string.h → modules/gdnative/include/gdnative/string.h

@@ -46,8 +46,8 @@ typedef struct {
 } godot_string;
 #endif
 
-#include <godot/gdnative.h>
-#include <godot/variant.h>
+#include <gdnative/gdnative.h>
+#include <gdnative/variant.h>
 
 void GDAPI godot_string_new(godot_string *r_dest);
 void GDAPI godot_string_new_copy(godot_string *r_dest, const godot_string *p_src);

+ 4 - 4
modules/gdnative/godot/transform.h → modules/gdnative/include/gdnative/transform.h

@@ -45,10 +45,10 @@ typedef struct {
 } godot_transform;
 #endif
 
-#include <godot/basis.h>
-#include <godot/gdnative.h>
-#include <godot/variant.h>
-#include <godot/vector3.h>
+#include <gdnative/basis.h>
+#include <gdnative/gdnative.h>
+#include <gdnative/variant.h>
+#include <gdnative/vector3.h>
 
 void GDAPI godot_transform_new_with_axis_origin(godot_transform *r_dest, const godot_vector3 *p_x_axis, const godot_vector3 *p_y_axis, const godot_vector3 *p_z_axis, const godot_vector3 *p_origin);
 void GDAPI godot_transform_new(godot_transform *r_dest, const godot_basis *p_basis, const godot_vector3 *p_origin);

+ 3 - 3
modules/gdnative/godot/transform2d.h → modules/gdnative/include/gdnative/transform2d.h

@@ -45,9 +45,9 @@ typedef struct {
 } godot_transform2d;
 #endif
 
-#include <godot/gdnative.h>
-#include <godot/variant.h>
-#include <godot/vector2.h>
+#include <gdnative/gdnative.h>
+#include <gdnative/variant.h>
+#include <gdnative/vector2.h>
 
 void GDAPI godot_transform2d_new(godot_transform2d *r_dest, const godot_real p_rot, const godot_vector2 *p_pos);
 void GDAPI godot_transform2d_new_axis_origin(godot_transform2d *r_dest, const godot_vector2 *p_x_axis, const godot_vector2 *p_y_axis, const godot_vector2 *p_origin);

+ 19 - 19
modules/gdnative/godot/variant.h → modules/gdnative/include/gdnative/variant.h

@@ -99,25 +99,25 @@ typedef struct godot_variant_call_error {
 	godot_variant_type expected;
 } godot_variant_call_error;
 
-#include <godot/array.h>
-#include <godot/basis.h>
-#include <godot/color.h>
-#include <godot/dictionary.h>
-#include <godot/node_path.h>
-#include <godot/plane.h>
-#include <godot/pool_arrays.h>
-#include <godot/quat.h>
-#include <godot/rect2.h>
-#include <godot/rect3.h>
-#include <godot/rid.h>
-#include <godot/string.h>
-#include <godot/transform.h>
-#include <godot/transform2d.h>
-#include <godot/variant.h>
-#include <godot/vector2.h>
-#include <godot/vector3.h>
-
-#include <godot/gdnative.h>
+#include <gdnative/array.h>
+#include <gdnative/basis.h>
+#include <gdnative/color.h>
+#include <gdnative/dictionary.h>
+#include <gdnative/node_path.h>
+#include <gdnative/plane.h>
+#include <gdnative/pool_arrays.h>
+#include <gdnative/quat.h>
+#include <gdnative/rect2.h>
+#include <gdnative/rect3.h>
+#include <gdnative/rid.h>
+#include <gdnative/string.h>
+#include <gdnative/transform.h>
+#include <gdnative/transform2d.h>
+#include <gdnative/variant.h>
+#include <gdnative/vector2.h>
+#include <gdnative/vector3.h>
+
+#include <gdnative/gdnative.h>
 
 godot_variant_type GDAPI godot_variant_get_type(const godot_variant *p_v);
 

+ 1 - 1
modules/gdnative/godot/vector2.h → modules/gdnative/include/gdnative/vector2.h

@@ -45,7 +45,7 @@ typedef struct {
 } godot_vector2;
 #endif
 
-#include <godot/gdnative.h>
+#include <gdnative/gdnative.h>
 
 void GDAPI godot_vector2_new(godot_vector2 *r_dest, const godot_real p_x, const godot_real p_y);
 

+ 2 - 2
modules/gdnative/godot/vector3.h → modules/gdnative/include/gdnative/vector3.h

@@ -45,8 +45,8 @@ typedef struct {
 } godot_vector3;
 #endif
 
-#include <godot/basis.h>
-#include <godot/gdnative.h>
+#include <gdnative/basis.h>
+#include <gdnative/gdnative.h>
 
 typedef enum {
 	GODOT_VECTOR3_AXIS_X,

+ 1 - 1
modules/nativescript/godot_nativescript.h → modules/gdnative/include/nativescript/godot_nativescript.h

@@ -30,7 +30,7 @@
 #ifndef GODOT_NATIVESCRIPT_H
 #define GODOT_NATIVESCRIPT_H
 
-#include <godot/gdnative.h>
+#include <gdnative/gdnative.h>
 
 #ifdef __cplusplus
 extern "C" {

+ 0 - 0
modules/nativescript/SCsub → modules/gdnative/nativescript/SCsub


+ 0 - 0
modules/nativescript/api_generator.cpp → modules/gdnative/nativescript/api_generator.cpp


+ 0 - 0
modules/nativescript/api_generator.h → modules/gdnative/nativescript/api_generator.h


+ 4 - 4
modules/nativescript/godot_nativescript.cpp → modules/gdnative/nativescript/godot_nativescript.cpp

@@ -27,17 +27,17 @@
 /* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE     */
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
 /*************************************************************************/
-#include "godot_nativescript.h"
-
-#include "nativescript.h"
+#include "nativescript/godot_nativescript.h"
 
 #include "class_db.h"
 #include "error_macros.h"
-#include "gdnative.h"
+#include "gdnative/gdnative.h"
 #include "global_constants.h"
 #include "project_settings.h"
 #include "variant.h"
 
+#include "nativescript.h"
+
 #ifdef __cplusplus
 extern "C" {
 #endif

+ 1 - 1
modules/nativescript/nativescript.cpp → modules/gdnative/nativescript/nativescript.cpp

@@ -29,7 +29,7 @@
 /*************************************************************************/
 #include "nativescript.h"
 
-#include "modules/gdnative/godot/gdnative.h"
+#include "gdnative/gdnative.h"
 
 #include "global_constants.h"
 #include "io/file_access_encrypted.h"

+ 1 - 1
modules/nativescript/nativescript.h → modules/gdnative/nativescript/nativescript.h

@@ -38,8 +38,8 @@
 #include "script_language.h"
 #include "self_list.h"
 
-#include "godot_nativescript.h"
 #include "modules/gdnative/gdnative.h"
+#include <nativescript/godot_nativescript.h>
 
 #ifndef NO_THREADS
 #include "os/mutex.h"

+ 0 - 0
modules/nativescript/register_types.cpp → modules/gdnative/nativescript/register_types.cpp


+ 0 - 0
modules/nativescript/register_types.h → modules/gdnative/nativescript/register_types.h


+ 9 - 0
modules/gdnative/register_types.cpp

@@ -28,11 +28,15 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
 /*************************************************************************/
 #include "register_types.h"
+#include "gdnative/gdnative.h"
+
 #include "gdnative.h"
 
 #include "io/resource_loader.h"
 #include "io/resource_saver.h"
 
+#include "nativescript/register_types.h"
+
 #include "core/os/os.h"
 
 godot_variant cb_standard_varcall(void *handle, godot_string *p_procedure, godot_array *p_args) {
@@ -72,9 +76,14 @@ void register_gdnative_types() {
 	GDNativeCallRegistry::singleton = memnew(GDNativeCallRegistry);
 
 	GDNativeCallRegistry::singleton->register_native_call_type("standard_varcall", cb_standard_varcall);
+
+	register_nativescript_types();
 }
 
 void unregister_gdnative_types() {
+
+	unregister_nativescript_types();
+
 	memdelete(GDNativeCallRegistry::singleton);
 
 	// This is for printing out the sizes of the core types

+ 0 - 8
modules/nativescript/config.py

@@ -1,8 +0,0 @@
-
-
-def can_build(platform):
-    return True
-
-
-def configure(env):
-    env.use_ptrcall = True