diff --git a/modules/dlscript/api_generator.h b/modules/dlscript/api_generator.h deleted file mode 100644 index 4a8354e9d6..0000000000 --- a/modules/dlscript/api_generator.h +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef API_GENERATOR_H -#define API_GENERATOR_H - -#include "core/ustring.h" -#include "typedefs.h" - -Error generate_c_api(const String &p_path); - -#endif // API_GENERATOR_H diff --git a/modules/dlscript/godot/godot_basis.cpp b/modules/dlscript/godot/godot_basis.cpp deleted file mode 100644 index 813a531de5..0000000000 --- a/modules/dlscript/godot/godot_basis.cpp +++ /dev/null @@ -1,58 +0,0 @@ -#include "godot_basis.h" - -#include "math/matrix3.h" - -#ifdef __cplusplus -extern "C" { -#endif - -void _basis_api_anchor() { -} - -void GDAPI godot_basis_new(godot_basis *p_basis) { - Basis *basis = (Basis *)p_basis; - *basis = Basis(); -} - -void GDAPI godot_basis_new_with_euler_quat(godot_basis *p_basis, const godot_quat *p_euler) { - Basis *basis = (Basis *)p_basis; - Quat *euler = (Quat *)p_euler; - *basis = Basis(*euler); -} - -void GDAPI godot_basis_new_with_euler(godot_basis *p_basis, const godot_vector3 *p_euler) { - Basis *basis = (Basis *)p_basis; - Vector3 *euler = (Vector3 *)p_euler; - *basis = Basis(*euler); -} - -godot_quat GDAPI godot_basis_as_quat(const godot_basis *p_basis) { - const Basis *basis = (const Basis *)p_basis; - godot_quat quat; - Quat *p_quat = (Quat *)&quat; - *p_quat = basis->operator Quat(); - return quat; -} - -godot_vector3 GDAPI godot_basis_get_euler(const godot_basis *p_basis) { - const Basis *basis = (const Basis *)p_basis; - godot_vector3 euler; - Vector3 *p_euler = (Vector3 *)&euler; - *p_euler = basis->get_euler(); - return euler; -} - -/* - * p_elements is a pointer to an array of 3 (!!) vector3 - */ -void GDAPI godot_basis_get_elements(godot_basis *p_basis, godot_vector3 *p_elements) { - Basis *basis = (Basis *)p_basis; - Vector3 *elements = (Vector3 *)p_elements; - elements[0] = basis->elements[0]; - elements[1] = basis->elements[1]; - elements[2] = basis->elements[2]; -} - -#ifdef __cplusplus -} -#endif diff --git a/modules/dlscript/godot/godot_basis.h b/modules/dlscript/godot/godot_basis.h deleted file mode 100644 index 43efd65ea2..0000000000 --- a/modules/dlscript/godot/godot_basis.h +++ /dev/null @@ -1,34 +0,0 @@ -#ifndef GODOT_DLSCRIPT_BASIS_H -#define GODOT_DLSCRIPT_BASIS_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include - -#ifndef GODOT_CORE_API_GODOT_BASIS_TYPE_DEFINED -typedef struct godot_basis { - uint8_t _dont_touch_that[36]; -} godot_basis; -#endif - -#include "../godot.h" - -void GDAPI godot_basis_new(godot_basis *p_basis); -void GDAPI godot_basis_new_with_euler_quat(godot_basis *p_basis, const godot_quat *p_euler); -void GDAPI godot_basis_new_with_euler(godot_basis *p_basis, const godot_vector3 *p_euler); - -godot_quat GDAPI godot_basis_as_quat(const godot_basis *p_basis); -godot_vector3 GDAPI godot_basis_get_euler(const godot_basis *p_basis); - -/* - * p_elements is a pointer to an array of 3 (!!) vector3 - */ -void GDAPI godot_basis_get_elements(godot_basis *p_basis, godot_vector3 *p_elements); - -#ifdef __cplusplus -} -#endif - -#endif // GODOT_DLSCRIPT_BASIS_H diff --git a/modules/dlscript/godot/godot_color.cpp b/modules/dlscript/godot/godot_color.cpp deleted file mode 100644 index 7e49565d40..0000000000 --- a/modules/dlscript/godot/godot_color.cpp +++ /dev/null @@ -1,34 +0,0 @@ -#include "godot_color.h" - -#include "color.h" - -#ifdef __cplusplus -extern "C" { -#endif - -void _color_api_anchor() { -} - -void GDAPI godot_color_new(godot_color *p_color) { - Color *color = (Color *)p_color; - *color = Color(); -} - -void GDAPI godot_color_new_rgba(godot_color *p_color, const godot_real r, const godot_real g, const godot_real b, const godot_real a) { - Color *color = (Color *)p_color; - *color = Color(r, g, b, a); -} - -uint32_t GDAPI godot_color_get_32(const godot_color *p_color) { - const Color *color = (const Color *)p_color; - return color->to_32(); -} - -float GDAPI *godot_color_index(godot_color *p_color, const godot_int idx) { - Color *color = (Color *)p_color; - return &color->operator[](idx); -} - -#ifdef __cplusplus -} -#endif diff --git a/modules/dlscript/godot/godot_color.h b/modules/dlscript/godot/godot_color.h deleted file mode 100644 index 72e16a2c5a..0000000000 --- a/modules/dlscript/godot/godot_color.h +++ /dev/null @@ -1,29 +0,0 @@ -#ifndef GODOT_DLSCRIPT_COLOR_H -#define GODOT_DLSCRIPT_COLOR_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include - -#ifndef GODOT_CORE_API_GODOT_COLOR_TYPE_DEFINED -typedef struct godot_color { - uint8_t _dont_touch_that[16]; -} godot_color; -#endif - -#include "../godot.h" - -void GDAPI godot_color_new(godot_color *p_color); -void GDAPI godot_color_new_rgba(godot_color *p_color, const godot_real r, const godot_real g, const godot_real b, const godot_real a); - -uint32_t GDAPI godot_color_get_32(const godot_color *p_color); - -float GDAPI *godot_color_index(godot_color *p_color, const godot_int idx); - -#ifdef __cplusplus -} -#endif - -#endif // GODOT_DLSCRIPT_COLOR_H diff --git a/modules/dlscript/godot/godot_dictionary.h b/modules/dlscript/godot/godot_dictionary.h deleted file mode 100644 index 5f86cbca5a..0000000000 --- a/modules/dlscript/godot/godot_dictionary.h +++ /dev/null @@ -1,51 +0,0 @@ -#ifndef GODOT_DLSCRIPT_DICTIONARY_H -#define GODOT_DLSCRIPT_DICTIONARY_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include - -#ifndef GODOT_CORE_API_GODOT_DICITIONARY_TYPE_DEFINED -typedef struct godot_dictionary { - uint8_t _dont_touch_that[8]; -} godot_dictionary; -#endif - -#include "godot_array.h" -#include "godot_variant.h" - -void GDAPI godot_dictionary_new(godot_dictionary *p_dict); - -void GDAPI godot_dictionary_clear(godot_dictionary *p_dict); - -godot_bool GDAPI godot_dictionary_empty(const godot_dictionary *p_dict); - -void GDAPI godot_dictionary_erase(godot_dictionary *p_dict, const godot_variant *p_key); - -godot_bool GDAPI godot_dictionary_has(const godot_dictionary *p_dict, const godot_variant *p_key); - -godot_bool GDAPI godot_dictionary_has_all(const godot_dictionary *p_dict, const godot_array *p_keys); - -uint32_t GDAPI godot_dictionary_hash(const godot_dictionary *p_dict); - -godot_array GDAPI godot_dictionary_keys(const godot_dictionary *p_dict); - -godot_int GDAPI godot_dictionary_parse_json(godot_dictionary *p_dict, const godot_string *p_json); - -godot_variant GDAPI *godot_dictionary_operator_index(godot_dictionary *p_dict, const godot_variant *p_key); - -godot_int GDAPI godot_dictionary_size(const godot_dictionary *p_dict); - -godot_string GDAPI godot_dictionary_to_json(const godot_dictionary *p_dict); - -godot_array GDAPI godot_dictionary_values(const godot_dictionary *p_dict); - -void GDAPI godot_dictionary_destroy(godot_dictionary *p_dict); - -#ifdef __cplusplus -} -#endif - -#endif // GODOT_DLSCRIPT_DICTIONARY_H diff --git a/modules/dlscript/godot/godot_node_path.h b/modules/dlscript/godot/godot_node_path.h deleted file mode 100644 index 04f1e70c1d..0000000000 --- a/modules/dlscript/godot/godot_node_path.h +++ /dev/null @@ -1,39 +0,0 @@ -#ifndef GODOT_DLSCRIPT_NODE_PATH_H -#define GODOT_DLSCRIPT_NODE_PATH_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include - -#ifndef GODOT_CORE_API_GODOT_NODE_PATH_TYPE_DEFINED -typedef struct godot_node_path { - uint8_t _dont_touch_that[8]; -} godot_node_path; -#endif - -#include "../godot.h" - -void GDAPI godot_node_path_new(godot_node_path *p_np, const godot_string *p_from); -void GDAPI godot_node_path_copy(godot_node_path *p_np, const godot_node_path *p_from); - -godot_string GDAPI godot_node_path_get_name(const godot_node_path *p_np, const godot_int p_idx); -godot_int GDAPI godot_node_path_get_name_count(const godot_node_path *p_np); - -godot_string GDAPI godot_node_path_get_property(const godot_node_path *p_np); -godot_string GDAPI godot_node_path_get_subname(const godot_node_path *p_np, const godot_int p_idx); -godot_int GDAPI godot_node_path_get_subname_count(const godot_node_path *p_np); - -godot_bool GDAPI godot_node_path_is_absolute(const godot_node_path *p_np); -godot_bool GDAPI godot_node_path_is_empty(const godot_node_path *p_np); - -godot_string GDAPI godot_node_path_as_string(const godot_node_path *p_np); - -void GDAPI godot_node_path_destroy(godot_node_path *p_np); - -#ifdef __cplusplus -} -#endif - -#endif // GODOT_DLSCRIPT_NODE_PATH_H diff --git a/modules/dlscript/godot/godot_plane.cpp b/modules/dlscript/godot/godot_plane.cpp deleted file mode 100644 index 883aeb6282..0000000000 --- a/modules/dlscript/godot/godot_plane.cpp +++ /dev/null @@ -1,48 +0,0 @@ -#include "godot_plane.h" - -#include "math/plane.h" - -#ifdef __cplusplus -extern "C" { -#endif - -void _plane_api_anchor() { -} - -void GDAPI godot_plane_new(godot_plane *p_pl) { - Plane *pl = (Plane *)p_pl; - *pl = Plane(); -} - -void GDAPI godot_plane_new_with_normal(godot_plane *p_pl, const godot_vector3 *p_normal, const godot_real p_d) { - Plane *pl = (Plane *)p_pl; - const Vector3 *normal = (const Vector3 *)p_normal; - *pl = Plane(*normal, p_d); -} - -void GDAPI godot_plane_set_normal(godot_plane *p_pl, const godot_vector3 *p_normal) { - Plane *pl = (Plane *)p_pl; - const Vector3 *normal = (const Vector3 *)p_normal; - pl->set_normal(*normal); -} - -godot_vector3 godot_plane_get_normal(const godot_plane *p_pl) { - const Plane *pl = (const Plane *)p_pl; - const Vector3 normal = pl->get_normal(); - godot_vector3 *v3 = (godot_vector3 *)&normal; - return *v3; -} - -void GDAPI godot_plane_set_d(godot_plane *p_pl, const godot_real p_d) { - Plane *pl = (Plane *)p_pl; - pl->d = p_d; -} - -godot_real GDAPI godot_plane_get_d(const godot_plane *p_pl) { - const Plane *pl = (const Plane *)p_pl; - return pl->d; -} - -#ifdef __cplusplus -} -#endif diff --git a/modules/dlscript/godot/godot_plane.h b/modules/dlscript/godot/godot_plane.h deleted file mode 100644 index 1323ef4075..0000000000 --- a/modules/dlscript/godot/godot_plane.h +++ /dev/null @@ -1,37 +0,0 @@ -#ifndef GODOT_DLSCRIPT_PLANE_H -#define GODOT_DLSCRIPT_PLANE_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include - -#ifndef GODOT_CORE_API_GODOT_PLANE_TYPE_DEFINED -typedef struct godot_plane { - uint8_t _dont_touch_that[16]; -} godot_plane; -#endif - -#include "godot_vector3.h" - -void GDAPI godot_plane_new(godot_plane *p_pl); -void GDAPI godot_plane_new_with_normal(godot_plane *p_pl, const godot_vector3 *p_normal, const godot_real p_d); - -// @Incomplete -// These are additional valid constructors -// _FORCE_INLINE_ Plane(const Vector3 &p_normal, real_t p_d); -// _FORCE_INLINE_ Plane(const Vector3 &p_point, const Vector3& p_normal); -// _FORCE_INLINE_ Plane(const Vector3 &p_point1, const Vector3 &p_point2,const Vector3 &p_point3,ClockDirection p_dir = CLOCKWISE); - -void GDAPI godot_plane_set_normal(godot_plane *p_pl, const godot_vector3 *p_normal); -godot_vector3 GDAPI godot_plane_get_normal(const godot_plane *p_pl); - -godot_real GDAPI godot_plane_get_d(const godot_plane *p_pl); -void GDAPI godot_plane_set_d(godot_plane *p_pl, const godot_real p_d); - -#ifdef __cplusplus -} -#endif - -#endif // GODOT_DLSCRIPT_PLANE_H diff --git a/modules/dlscript/godot/godot_quat.cpp b/modules/dlscript/godot/godot_quat.cpp deleted file mode 100644 index 9bd2eb0639..0000000000 --- a/modules/dlscript/godot/godot_quat.cpp +++ /dev/null @@ -1,77 +0,0 @@ -#include "godot_quat.h" - -#include "math/quat.h" - -#ifdef __cplusplus -extern "C" { -#endif - -void _quat_api_anchor() { -} - -void GDAPI godot_quat_new(godot_quat *p_quat) { - Quat *quat = (Quat *)p_quat; - *quat = Quat(); -} - -void GDAPI godot_quat_new_with_elements(godot_quat *p_quat, const godot_real x, const godot_real y, const godot_real z, const godot_real w) { - Quat *quat = (Quat *)p_quat; - *quat = Quat(x, y, z, w); -} - -void GDAPI godot_quat_new_with_rotation(godot_quat *p_quat, const godot_vector3 *p_axis, const godot_real p_angle) { - Quat *quat = (Quat *)p_quat; - const Vector3 *axis = (const Vector3 *)p_axis; - *quat = Quat(*axis, p_angle); -} - -void GDAPI godot_quat_new_with_shortest_arc(godot_quat *p_quat, const godot_vector3 *p_v0, const godot_vector3 *p_v1) { - Quat *quat = (Quat *)p_quat; - const Vector3 *v0 = (const Vector3 *)p_v0; - const Vector3 *v1 = (const Vector3 *)p_v1; - *quat = Quat(*v0, *v1); -} - -godot_vector3 GDAPI godot_quat_get_euler(const godot_quat *p_quat) { - Quat *quat = (Quat *)p_quat; - Vector3 euler = quat->get_euler(); - return *(godot_vector3 *)&euler; -} - -void GDAPI godot_quat_set_euler(godot_quat *p_quat, const godot_vector3 *p_euler) { - Quat *quat = (Quat *)p_quat; - const Vector3 *euler = (const Vector3 *)p_euler; - quat->set_euler(*euler); -} - -godot_real GDAPI *godot_quat_index(godot_quat *p_quat, const godot_int p_idx) { - Quat *quat = (Quat *)p_quat; - switch (p_idx) { - case 0: - return &quat->x; - case 1: - return &quat->y; - case 2: - return &quat->z; - default: - return &quat->y; - } -} - -godot_real GDAPI godot_quat_const_index(const godot_quat *p_quat, const godot_int p_idx) { - const Quat *quat = (const Quat *)p_quat; - switch (p_idx) { - case 0: - return quat->x; - case 1: - return quat->y; - case 2: - return quat->z; - default: - return quat->y; - } -} - -#ifdef __cplusplus -} -#endif diff --git a/modules/dlscript/godot/godot_quat.h b/modules/dlscript/godot/godot_quat.h deleted file mode 100644 index 4e3253c4e5..0000000000 --- a/modules/dlscript/godot/godot_quat.h +++ /dev/null @@ -1,33 +0,0 @@ -#ifndef GODOT_DLSCRIPT_QUAT_H -#define GODOT_DLSCRIPT_QUAT_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include - -#ifndef GODOT_CORE_API_GODOT_QUAT_TYPE_DEFINED -typedef struct godot_quat { - uint8_t _dont_touch_that[16]; -} godot_quat; -#endif - -#include "../godot.h" - -void GDAPI godot_quat_new(godot_quat *p_quat); -void GDAPI godot_quat_new_with_elements(godot_quat *p_quat, const godot_real x, const godot_real y, const godot_real z, const godot_real w); -void GDAPI godot_quat_new_with_rotation(godot_quat *p_quat, const godot_vector3 *p_axis, const godot_real p_angle); -void GDAPI godot_quat_new_with_shortest_arc(godot_quat *p_quat, const godot_vector3 *p_v0, const godot_vector3 *p_v1); - -godot_vector3 GDAPI godot_quat_get_euler(const godot_quat *p_quat); -void GDAPI godot_quat_set_euler(godot_quat *p_quat, const godot_vector3 *p_euler); - -godot_real GDAPI *godot_quat_index(godot_quat *p_quat, const godot_int p_idx); -godot_real GDAPI godot_quat_const_index(const godot_quat *p_quat, const godot_int p_idx); - -#ifdef __cplusplus -} -#endif - -#endif // GODOT_DLSCRIPT_QUAT_H diff --git a/modules/dlscript/godot/godot_rect2.cpp b/modules/dlscript/godot/godot_rect2.cpp deleted file mode 100644 index 8e60811114..0000000000 --- a/modules/dlscript/godot/godot_rect2.cpp +++ /dev/null @@ -1,48 +0,0 @@ -#include "godot_rect2.h" - -#include "math/math_2d.h" - -#ifdef __cplusplus -extern "C" { -#endif - -void _rect2_api_anchor() { -} - -void GDAPI godot_rect2_new(godot_rect2 *p_rect) { - Rect2 *rect = (Rect2 *)p_rect; - *rect = Rect2(); -} - -void GDAPI godot_rect2_new_with_pos_and_size(godot_rect2 *p_rect, const godot_vector2 *p_pos, const godot_vector2 *p_size) { - Rect2 *rect = (Rect2 *)p_rect; - const Vector2 *pos = (const Vector2 *)p_pos; - const Vector2 *size = (const Vector2 *)p_size; - *rect = Rect2(*pos, *size); -} - -godot_vector2 GDAPI *godot_rect2_get_pos(godot_rect2 *p_rect) { - Rect2 *rect = (Rect2 *)p_rect; - return (godot_vector2 *)&rect->pos; -} - -void GDAPI godot_rect2_set_pos(godot_rect2 *p_rect, const godot_vector2 *p_pos) { - Rect2 *rect = (Rect2 *)p_rect; - const Vector2 *pos = (const Vector2 *)p_pos; - rect->pos = *pos; -} - -godot_vector2 GDAPI *godot_rect2_get_size(godot_rect2 *p_rect) { - Rect2 *rect = (Rect2 *)p_rect; - return (godot_vector2 *)&rect->size; -} - -void GDAPI godot_rect2_set_size(godot_rect2 *p_rect, const godot_vector2 *p_size) { - Rect2 *rect = (Rect2 *)p_rect; - const Vector2 *size = (const Vector2 *)p_size; - rect->size = *size; -} - -#ifdef __cplusplus -} -#endif diff --git a/modules/dlscript/godot/godot_rect2.h b/modules/dlscript/godot/godot_rect2.h deleted file mode 100644 index a3b19bdb7e..0000000000 --- a/modules/dlscript/godot/godot_rect2.h +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef GODOT_DLSCRIPT_RECT2_H -#define GODOT_DLSCRIPT_RECT2_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include - -#ifndef GODOT_CORE_API_GODOT_RECT2_TYPE_DEFINED -typedef struct godot_rect2 { - uint8_t _dont_touch_that[16]; -} godot_rect2; -#endif - -#include "../godot.h" - -void GDAPI godot_rect2_new(godot_rect2 *p_rect); -void GDAPI godot_rect2_new_with_pos_and_size(godot_rect2 *p_rect, const godot_vector2 *p_pos, const godot_vector2 *p_size); - -godot_vector2 GDAPI *godot_rect2_get_pos(godot_rect2 *p_rect); -void GDAPI godot_rect2_set_pos(godot_rect2 *p_rect, const godot_vector2 *p_pos); - -godot_vector2 GDAPI *godot_rect2_get_size(godot_rect2 *p_rect); -void GDAPI godot_rect2_set_size(godot_rect2 *p_rect, const godot_vector2 *p_size); - -#ifdef __cplusplus -} -#endif - -#endif // GODOT_DLSCRIPT_RECT3_H diff --git a/modules/dlscript/godot/godot_rect3.cpp b/modules/dlscript/godot/godot_rect3.cpp deleted file mode 100644 index 3c442a278b..0000000000 --- a/modules/dlscript/godot/godot_rect3.cpp +++ /dev/null @@ -1,48 +0,0 @@ -#include "godot_rect3.h" - -#include "math/rect3.h" - -#ifdef __cplusplus -extern "C" { -#endif - -void _rect3_api_anchor() { -} - -void GDAPI godot_rect3_new(godot_rect3 *p_rect) { - Rect3 *rect = (Rect3 *)p_rect; - *rect = Rect3(); -} - -void GDAPI godot_rect3_new_with_pos_and_size(godot_rect3 *p_rect, const godot_vector3 *p_pos, const godot_vector3 *p_size) { - Rect3 *rect = (Rect3 *)p_rect; - const Vector3 *pos = (const Vector3 *)p_pos; - const Vector3 *size = (const Vector3 *)p_size; - *rect = Rect3(*pos, *size); -} - -godot_vector3 GDAPI *godot_rect3_get_pos(godot_rect3 *p_rect) { - Rect3 *rect = (Rect3 *)p_rect; - return (godot_vector3 *)&rect->pos; -} - -void GDAPI godot_rect3_set_pos(godot_rect3 *p_rect, const godot_vector3 *p_pos) { - Rect3 *rect = (Rect3 *)p_rect; - const Vector3 *pos = (const Vector3 *)p_pos; - rect->pos = *pos; -} - -godot_vector3 GDAPI *godot_rect3_get_size(godot_rect3 *p_rect) { - Rect3 *rect = (Rect3 *)p_rect; - return (godot_vector3 *)&rect->size; -} - -void GDAPI godot_rect3_set_size(godot_rect3 *p_rect, const godot_vector3 *p_size) { - Rect3 *rect = (Rect3 *)p_rect; - const Vector3 *size = (const Vector3 *)p_size; - rect->size = *size; -} - -#ifdef __cplusplus -} -#endif diff --git a/modules/dlscript/godot/godot_rect3.h b/modules/dlscript/godot/godot_rect3.h deleted file mode 100644 index b9279616d1..0000000000 --- a/modules/dlscript/godot/godot_rect3.h +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef GODOT_DLSCRIPT_RECT3_H -#define GODOT_DLSCRIPT_RECT3_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include - -#ifndef GODOT_CORE_API_GODOT_RECT3_TYPE_DEFINED -typedef struct godot_rect3 { - uint8_t _dont_touch_that[24]; -} godot_rect3; -#endif - -#include "../godot.h" - -void GDAPI godot_rect3_new(godot_rect3 *p_rect); -void GDAPI godot_rect3_new_with_pos_and_size(godot_rect3 *p_rect, const godot_vector3 *p_pos, const godot_vector3 *p_size); - -godot_vector3 GDAPI *godot_rect3_get_pos(godot_rect3 *p_rect); -void GDAPI godot_rect3_set_pos(godot_rect3 *p_rect, const godot_vector3 *p_pos); - -godot_vector3 GDAPI *godot_rect3_get_size(godot_rect3 *p_rect); -void GDAPI godot_rect3_set_size(godot_rect3 *p_rect, const godot_vector3 *p_size); - -#ifdef __cplusplus -} -#endif - -#endif // GODOT_DLSCRIPT_RECT3_H diff --git a/modules/dlscript/godot/godot_rid.cpp b/modules/dlscript/godot/godot_rid.cpp deleted file mode 100644 index a36a2e64a3..0000000000 --- a/modules/dlscript/godot/godot_rid.cpp +++ /dev/null @@ -1,36 +0,0 @@ -#include "godot_rid.h" - -#include "object.h" -#include "resource.h" - -#ifdef __cplusplus -extern "C" { -#endif - -void _rid_api_anchor() { -} - -void GDAPI godot_rid_new(godot_rid *p_rid, godot_object *p_from) { - - Resource *res_from = ((Object *)p_from)->cast_to(); - - RID *rid = (RID *)p_rid; - memnew_placement(rid, RID); - - if (res_from) { - *rid = RID(res_from->get_rid()); - } -} - -uint32_t GDAPI godot_rid_get_rid(const godot_rid *p_rid) { - RID *rid = (RID *)p_rid; - return rid->get_id(); -} - -void GDAPI godot_rid_destroy(godot_rid *p_rid) { - ((RID *)p_rid)->~RID(); -} - -#ifdef __cplusplus -} -#endif diff --git a/modules/dlscript/godot/godot_rid.h b/modules/dlscript/godot/godot_rid.h deleted file mode 100644 index f20c0d4dae..0000000000 --- a/modules/dlscript/godot/godot_rid.h +++ /dev/null @@ -1,28 +0,0 @@ -#ifndef GODOT_DLSCRIPT_RID_H -#define GODOT_DLSCRIPT_RID_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include - -#ifndef GODOT_CORE_API_GODOT_RID_TYPE_DEFINED -typedef struct godot_rid { - uint8_t _dont_touch_that[8]; -} godot_rid; -#endif - -#include "../godot.h" - -void GDAPI godot_rid_new(godot_rid *p_rid, godot_object *p_from); - -uint32_t GDAPI godot_rid_get_rid(const godot_rid *p_rid); - -void GDAPI godot_rid_destroy(godot_rid *p_rid); - -#ifdef __cplusplus -} -#endif - -#endif // GODOT_DLSCRIPT_RID_H diff --git a/modules/dlscript/godot/godot_string.cpp b/modules/dlscript/godot/godot_string.cpp deleted file mode 100644 index 97d0985a50..0000000000 --- a/modules/dlscript/godot/godot_string.cpp +++ /dev/null @@ -1,83 +0,0 @@ -#include "godot_string.h" - -#include "string_db.h" -#include "ustring.h" - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -void _string_api_anchor() { -} - -void GDAPI godot_string_new(godot_string *p_str) { - String *p = (String *)p_str; - memnew_placement(p, String); - // *p = String(); // useless here -} - -void GDAPI godot_string_new_data(godot_string *p_str, const char *p_contents, const int p_size) { - String *p = (String *)p_str; - memnew_placement(p, String); - *p = String::utf8(p_contents, p_size); -} - -void GDAPI godot_string_get_data(const godot_string *p_str, wchar_t *p_dest, int *p_size) { - String *p = (String *)p_str; - if (p_size != NULL) { - *p_size = p->length(); - } - if (p_dest != NULL) { - memcpy(p_dest, p->ptr(), *p_size * sizeof(CharType)); - } -} - -void GDAPI godot_string_copy_string(const godot_string *p_dest, const godot_string *p_src) { - String *dest = (String *)p_dest; - String *src = (String *)p_src; - - *dest = *src; -} - -wchar_t GDAPI *godot_string_operator_index(godot_string *p_str, const godot_int p_idx) { - String *s = (String *)p_str; - return &(s->operator[](p_idx)); -} - -const wchar_t GDAPI *godot_string_c_str(const godot_string *p_str) { - const String *s = (const String *)p_str; - return s->c_str(); -} - -godot_bool GDAPI godot_string_operator_equal(const godot_string *p_a, const godot_string *p_b) { - String *a = (String *)p_a; - String *b = (String *)p_b; - return *a == *b; -} - -godot_bool GDAPI godot_string_operator_less(const godot_string *p_a, const godot_string *p_b) { - String *a = (String *)p_a; - String *b = (String *)p_b; - return *a < *b; -} - -void GDAPI godot_string_operator_plus(godot_string *p_dest, const godot_string *p_a, const godot_string *p_b) { - String *dest = (String *)p_dest; - const String *a = (String *)p_a; - const String *b = (String *)p_b; - - String tmp = *a + *b; - godot_string_new(p_dest); - *dest = tmp; -} - -void GDAPI godot_string_destroy(godot_string *p_str) { - String *p = (String *)p_str; - p->~String(); -} - -#ifdef __cplusplus -} -#endif diff --git a/modules/dlscript/godot/godot_string.h b/modules/dlscript/godot/godot_string.h deleted file mode 100644 index 73b366d9cd..0000000000 --- a/modules/dlscript/godot/godot_string.h +++ /dev/null @@ -1,42 +0,0 @@ -#ifndef GODOT_DLSCRIPT_STRING_H -#define GODOT_DLSCRIPT_STRING_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include - -#ifndef GODOT_CORE_API_GODOT_STRING_TYPE_DEFINED -typedef struct godot_string { - uint8_t _dont_touch_that[8]; -} godot_string; -#endif - -#include "../godot.h" - -void GDAPI godot_string_new(godot_string *p_str); -void GDAPI godot_string_new_data(godot_string *p_str, const char *p_contents, const int p_size); - -void GDAPI godot_string_get_data(const godot_string *p_str, wchar_t *p_dest, int *p_size); - -void GDAPI godot_string_copy_string(const godot_string *p_dest, const godot_string *p_src); - -wchar_t GDAPI *godot_string_operator_index(godot_string *p_str, const godot_int p_idx); -const wchar_t GDAPI *godot_string_c_str(const godot_string *p_str); - -godot_bool GDAPI godot_string_operator_equal(const godot_string *p_a, const godot_string *p_b); -godot_bool GDAPI godot_string_operator_less(const godot_string *p_a, const godot_string *p_b); -void GDAPI godot_string_operator_plus(godot_string *p_dest, const godot_string *p_a, const godot_string *p_b); - -// @Incomplete -// hmm, I guess exposing the whole API doesn't make much sense -// since the language used in the library has its own string funcs - -void GDAPI godot_string_destroy(godot_string *p_str); - -#ifdef __cplusplus -} -#endif - -#endif // GODOT_DLSCRIPT_STRING_H diff --git a/modules/dlscript/godot/godot_transform.cpp b/modules/dlscript/godot/godot_transform.cpp deleted file mode 100644 index c8da519f6b..0000000000 --- a/modules/dlscript/godot/godot_transform.cpp +++ /dev/null @@ -1,42 +0,0 @@ -#include "godot_transform.h" - -#include "math/transform.h" - -#ifdef __cplusplus -extern "C" { -#endif - -void _transform_api_anchor() { -} - -void GDAPI godot_transform_new(godot_transform *p_trans) { - Transform *trans = (Transform *)p_trans; - *trans = Transform(); -} - -void GDAPI godot_transform_new_with_basis(godot_transform *p_trans, const godot_basis *p_basis) { - Transform *trans = (Transform *)p_trans; - const Basis *basis = (const Basis *)p_basis; - *trans = Transform(*basis); -} - -void GDAPI godot_transform_new_with_basis_origin(godot_transform *p_trans, const godot_basis *p_basis, const godot_vector3 *p_origin) { - Transform *trans = (Transform *)p_trans; - const Basis *basis = (const Basis *)p_basis; - const Vector3 *origin = (const Vector3 *)p_origin; - *trans = Transform(*basis, *origin); -} - -godot_basis GDAPI *godot_transform_get_basis(godot_transform *p_trans) { - Transform *trans = (Transform *)p_trans; - return (godot_basis *)&trans->basis; -} - -godot_vector3 GDAPI *godot_transform_get_origin(godot_transform *p_trans) { - Transform *trans = (Transform *)p_trans; - return (godot_vector3 *)&trans->origin; -} - -#ifdef __cplusplus -} -#endif diff --git a/modules/dlscript/godot/godot_transform.h b/modules/dlscript/godot/godot_transform.h deleted file mode 100644 index 54af78d5b9..0000000000 --- a/modules/dlscript/godot/godot_transform.h +++ /dev/null @@ -1,29 +0,0 @@ -#ifndef GODOT_DLSCRIPT_TRANSFORM_H -#define GODOT_DLSCRIPT_TRANSFORM_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include - -#ifndef GODOT_CORE_API_GODOT_TRANSFORM_TYPE_DEFINED -typedef struct godot_transform { - uint8_t _dont_touch_that[48]; -} godot_transform; -#endif - -#include "../godot.h" - -void GDAPI godot_transform_new(godot_transform *p_trans); -void GDAPI godot_transform_new_with_basis(godot_transform *p_trans, const godot_basis *p_basis); -void GDAPI godot_transform_new_with_basis_origin(godot_transform *p_trans, const godot_basis *p_basis, const godot_vector3 *p_origin); - -godot_basis GDAPI *godot_transform_get_basis(godot_transform *p_trans); -godot_vector3 GDAPI *godot_transform_get_origin(godot_transform *p_trans); - -#ifdef __cplusplus -} -#endif - -#endif // GODOT_DLSCRIPT_TRANSFORM_H diff --git a/modules/dlscript/godot/godot_transform2d.cpp b/modules/dlscript/godot/godot_transform2d.cpp deleted file mode 100644 index 39fa0e7363..0000000000 --- a/modules/dlscript/godot/godot_transform2d.cpp +++ /dev/null @@ -1,59 +0,0 @@ -#include "godot_transform2d.h" - -#include "../godot.h" - -#include "math/math_2d.h" - -#ifdef __cplusplus -extern "C" { -#endif - -void _transform2d_api_anchor() { -} - -void GDAPI godot_transform2d_new_identity(godot_transform2d *p_t) { - Transform2D *t = (Transform2D *)p_t; - *t = Transform2D(); -} - -void GDAPI godot_transform2d_new_elements(godot_transform2d *p_t, const godot_vector2 *p_a, const godot_vector2 *p_b, const godot_vector2 *p_c) { - Transform2D *t = (Transform2D *)p_t; - Vector2 *a = (Vector2 *)p_a; - Vector2 *b = (Vector2 *)p_b; - Vector2 *c = (Vector2 *)p_c; - *t = Transform2D(a->x, a->y, b->x, b->y, c->x, c->y); -} - -void GDAPI godot_transform2d_new(godot_transform2d *p_t, const godot_real p_rot, const godot_vector2 *p_pos) { - Transform2D *t = (Transform2D *)p_t; - Vector2 *pos = (Vector2 *)p_pos; - *t = Transform2D(p_rot, *pos); -} - -godot_vector2 const GDAPI *godot_transform2d_const_index(const godot_transform2d *p_t, const godot_int p_idx) { - const Transform2D *t = (const Transform2D *)p_t; - const Vector2 *e = &t->operator[](p_idx); - return (godot_vector2 const *)e; -} - -godot_vector2 GDAPI *godot_transform2d_index(godot_transform2d *p_t, const godot_int p_idx) { - Transform2D *t = (Transform2D *)p_t; - Vector2 *e = &t->operator[](p_idx); - return (godot_vector2 *)e; -} - -godot_vector2 GDAPI godot_transform2d_get_axis(const godot_transform2d *p_t, const godot_int p_axis) { - return *godot_transform2d_const_index(p_t, p_axis); -} - -void GDAPI godot_transform2d_set_axis(godot_transform2d *p_t, const godot_int p_axis, const godot_vector2 *p_vec) { - godot_vector2 *origin_v = godot_transform2d_index(p_t, p_axis); - *origin_v = *p_vec; -} - -// @Incomplete -// See header file - -#ifdef __cplusplus -} -#endif diff --git a/modules/dlscript/godot/godot_transform2d.h b/modules/dlscript/godot/godot_transform2d.h deleted file mode 100644 index 7403954527..0000000000 --- a/modules/dlscript/godot/godot_transform2d.h +++ /dev/null @@ -1,48 +0,0 @@ -#ifndef GODOT_TRANSFORM2D_H -#define GODOT_TRANSFORM2D_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include - -#ifndef GODOT_CORE_API_GODOT_TRANSFORM2D_TYPE_DEFINED -#define GODOT_CORE_API_GODOT_TRANSFORM2D_TYPE_DEFINED -typedef struct godot_transform2d { - uint8_t _dont_touch_that[24]; -} godot_transform2d; -#endif - -#include "../godot.h" - -#include "godot_vector2.h" - -void GDAPI godot_transform2d_new_identity(godot_transform2d *p_t); -void GDAPI godot_transform2d_new_elements(godot_transform2d *p_t, const godot_vector2 *p_a, const godot_vector2 *p_b, const godot_vector2 *p_c); -void GDAPI godot_transform2d_new(godot_transform2d *p_t, const godot_real p_rot, const godot_vector2 *p_pos); - -/* -godot_real GDAPI godot_transform2d_tdotx(const godot_transform2d *p_t, const godot_vector2 *p_v); -godot_real GDAPI godot_transform2d_tdoty(const godot_transform2d *p_t, const godot_vector2 *p_v); -*/ - -godot_vector2 const GDAPI *godot_transform2d_const_index(const godot_transform2d *p_t, const godot_int p_idx); -godot_vector2 GDAPI *godot_transform2d_index(godot_transform2d *p_t, const godot_int p_idx); - -godot_vector2 GDAPI godot_transform2d_get_axis(const godot_transform2d *p_t, const godot_int p_axis); -void GDAPI godot_transform2d_set_axis(godot_transform2d *p_t, const godot_int p_axis, const godot_vector2 *p_vec); - -/* -void GDAPI godot_transform2d_invert(godot_transform2d *p_t); -godot_transform2d GDAPI godot_transform2d_inverse(const godot_transform2d *p_t); -*/ - -// @Incomplete -// I feel like it should be enough to expose get and set, the whole logic can be done in the bindings. - -#ifdef __cplusplus -} -#endif - -#endif // GODOT_TRANSFORM2D_H diff --git a/modules/dlscript/SCsub b/modules/gdnative/SCsub similarity index 100% rename from modules/dlscript/SCsub rename to modules/gdnative/SCsub diff --git a/modules/dlscript/api_generator.cpp b/modules/gdnative/api_generator.cpp similarity index 86% rename from modules/dlscript/api_generator.cpp rename to modules/gdnative/api_generator.cpp index 1de3f6d520..f5d010f0a2 100644 --- a/modules/dlscript/api_generator.cpp +++ b/modules/gdnative/api_generator.cpp @@ -1,3 +1,32 @@ +/*************************************************************************/ +/* api_generator.cpp */ +/*************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* http://www.godotengine.org */ +/*************************************************************************/ +/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */ +/* */ +/* 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 "api_generator.h" #ifdef TOOLS_ENABLED diff --git a/modules/gdnative/api_generator.h b/modules/gdnative/api_generator.h new file mode 100644 index 0000000000..a108d7a7b6 --- /dev/null +++ b/modules/gdnative/api_generator.h @@ -0,0 +1,38 @@ +/*************************************************************************/ +/* api_generator.h */ +/*************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* http://www.godotengine.org */ +/*************************************************************************/ +/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */ +/* */ +/* 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. */ +/*************************************************************************/ +#ifndef API_GENERATOR_H +#define API_GENERATOR_H + +#include "core/ustring.h" +#include "typedefs.h" + +Error generate_c_api(const String &p_path); + +#endif // API_GENERATOR_H diff --git a/modules/dlscript/config.py b/modules/gdnative/config.py similarity index 100% rename from modules/dlscript/config.py rename to modules/gdnative/config.py diff --git a/modules/dlscript/dl_script.cpp b/modules/gdnative/gdnative.cpp similarity index 61% rename from modules/dlscript/dl_script.cpp rename to modules/gdnative/gdnative.cpp index fa082d7b94..43b309ae36 100644 --- a/modules/dlscript/dl_script.cpp +++ b/modules/gdnative/gdnative.cpp @@ -1,5 +1,5 @@ /*************************************************************************/ -/* dl_script.cpp */ +/* gdnative.cpp */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ @@ -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 "dl_script.h" +#include "gdnative.h" #include "global_config.h" #include "global_constants.h" @@ -48,8 +48,8 @@ Error NativeLibrary::initialize(NativeLibrary *&p_native_lib, const StringName p_path) { - if (DLScriptLanguage::get_singleton()->initialized_libraries.has(p_path)) { - p_native_lib = DLScriptLanguage::get_singleton()->initialized_libraries[p_path]; + if (GDNativeScriptLanguage::get_singleton()->initialized_libraries.has(p_path)) { + p_native_lib = GDNativeScriptLanguage::get_singleton()->initialized_libraries[p_path]; return OK; } @@ -68,13 +68,13 @@ Error NativeLibrary::initialize(NativeLibrary *&p_native_lib, const StringName p // Get the method void *library_init; - error = OS::get_singleton()->get_dynamic_library_symbol_handle(lib->handle, DLScriptLanguage::get_init_symbol_name(), library_init); + error = OS::get_singleton()->get_dynamic_library_symbol_handle(lib->handle, GDNativeScriptLanguage::get_init_symbol_name(), library_init); if (error) return error; ERR_FAIL_COND_V(!library_init, ERR_BUG); - void (*library_init_fpointer)(godot_dlscript_init_options *) = (void (*)(godot_dlscript_init_options *))library_init; + void (*library_init_fpointer)(godot_native_init_options *) = (void (*)(godot_native_init_options *))library_init; - godot_dlscript_init_options options; + godot_native_init_options options; options.in_editor = SceneTree::get_singleton()->is_editor_hint(); /* @@ -85,14 +85,14 @@ Error NativeLibrary::initialize(NativeLibrary *&p_native_lib, const StringName p library_init_fpointer(&options); // Catch errors? - DLScriptLanguage::get_singleton()->initialized_libraries[p_path] = lib; + GDNativeScriptLanguage::get_singleton()->initialized_libraries[p_path] = lib; return OK; } Error NativeLibrary::terminate(NativeLibrary *&p_native_lib) { - if (!DLScriptLanguage::get_singleton()->initialized_libraries.has(p_native_lib->path)) { + if (!GDNativeScriptLanguage::get_singleton()->initialized_libraries.has(p_native_lib->path)) { OS::get_singleton()->close_dynamic_library(p_native_lib->handle); p_native_lib->handle = 0; return OK; @@ -100,18 +100,18 @@ Error NativeLibrary::terminate(NativeLibrary *&p_native_lib) { Error error = OK; void *library_terminate; - error = OS::get_singleton()->get_dynamic_library_symbol_handle(p_native_lib->handle, DLScriptLanguage::get_terminate_symbol_name(), library_terminate); + error = OS::get_singleton()->get_dynamic_library_symbol_handle(p_native_lib->handle, GDNativeScriptLanguage::get_terminate_symbol_name(), library_terminate); if (error) return OK; // no terminate? okay, not that important lol - void (*library_terminate_pointer)(godot_dlscript_terminate_options *) = (void (*)(godot_dlscript_terminate_options *))library_terminate; + void (*library_terminate_pointer)(godot_native_terminate_options *) = (void (*)(godot_native_terminate_options *))library_terminate; - godot_dlscript_terminate_options options; + godot_native_terminate_options options; options.in_editor = SceneTree::get_singleton()->is_editor_hint(); library_terminate_pointer(&options); - DLScriptLanguage::get_singleton()->initialized_libraries.erase(p_native_lib->path); + GDNativeScriptLanguage::get_singleton()->initialized_libraries.erase(p_native_lib->path); OS::get_singleton()->close_dynamic_library(p_native_lib->handle); p_native_lib->handle = 0; @@ -122,12 +122,13 @@ Error NativeLibrary::terminate(NativeLibrary *&p_native_lib) { // Script #ifdef TOOLS_ENABLED -void DLScript::_update_placeholder(PlaceHolderScriptInstance *p_placeholder) { +void GDNativeScript::_update_placeholder(PlaceHolderScriptInstance *p_placeholder) { + ERR_FAIL_COND(!script_data); List pinfo; Map values; - for (Map::Element *E = script_data->properties.front(); E; E = E->next()) { + for (Map::Element *E = script_data->properties.front(); E; E = E->next()) { PropertyInfo p = E->get().info; p.name = String(E->key()); pinfo.push_back(p); @@ -137,24 +138,24 @@ void DLScript::_update_placeholder(PlaceHolderScriptInstance *p_placeholder) { p_placeholder->update(pinfo, values); } -void DLScript::_placeholder_erased(PlaceHolderScriptInstance *p_placeholder) { +void GDNativeScript::_placeholder_erased(PlaceHolderScriptInstance *p_placeholder) { placeholders.erase(p_placeholder); } #endif -bool DLScript::can_instance() const { -#ifdef DLSCRIPT_EDITOR_FEATURES +bool GDNativeScript::can_instance() const { +#ifdef TOOLS_ENABLED return script_data || (!is_tool() && !ScriptServer::is_scripting_enabled()); #else // allow defaultlibrary without editor features if (!library.is_valid()) { - String path = GLOBAL_GET("dlscript/default_dllibrary"); + String path = GLOBAL_GET("gdnative/default_gdnativelibrary"); RES lib = ResourceLoader::load(path); - if (lib.is_valid() && lib->cast_to()) { + if (lib.is_valid() && lib->cast_to()) { return true; } } @@ -165,28 +166,27 @@ bool DLScript::can_instance() const { // change to true enable in editor stuff. } -Ref