Merge pull request from karroffel/gdnative-header-include-paths

[GDNative] better header include paths
This commit is contained in:
Thomas Herzog 2017-08-02 04:16:45 +02:00 committed by GitHub
commit 66a7763b0e
39 changed files with 137 additions and 113 deletions

View File

@ -1,14 +1,15 @@
#!/usr/bin/env python #!/usr/bin/env python
Import('env') Import('env')
Import('env_modules')
env.add_source_files(env.modules_sources, "*.cpp") mod_env = env_modules.Clone()
env.add_source_files(env.modules_sources, "godot/*.cpp") mod_env.add_source_files(env.modules_sources, "*.cpp")
mod_env.add_source_files(env.modules_sources, "godot/*.cpp")
env.Append(CPPFLAGS=['-DGDAPI_BUILT_IN']) mod_env.Append(CPPFLAGS=['-DGDAPI_BUILT_IN'])
mod_env.Append(CPPPATH=['#modules/gdnative/'])
if "platform" in env and env["platform"] == "x11": # there has to be a better solution? if "platform" in env and env["platform"] == "x11": # there has to be a better solution?
env.Append(LINKFLAGS=["-rdynamic"]) mod_env.Append(LINKFLAGS=["-rdynamic"])
env.use_ptrcall = True mod_env.use_ptrcall = True
Export('env')

View File

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

View File

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

View File

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

View File

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

View File

@ -45,9 +45,9 @@ typedef struct {
} godot_basis; } godot_basis;
#endif #endif
#include "gdnative.h" #include <godot/gdnative.h>
#include "quat.h" #include <godot/quat.h>
#include "vector3.h" #include <godot/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_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); void GDAPI godot_basis_new_with_axis_and_angle(godot_basis *r_dest, const godot_vector3 *p_axis, const godot_real p_phi);

View File

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

View File

@ -45,8 +45,8 @@ typedef struct {
} godot_color; } godot_color;
#endif #endif
#include "gdnative.h" #include <godot/gdnative.h>
#include "string.h" #include <godot/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_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); 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);

View File

@ -27,11 +27,11 @@
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ /* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/ /*************************************************************************/
#include "dictionary.h" #include <godot/dictionary.h>
#include "core/variant.h"
#include "core/dictionary.h" #include "core/dictionary.h"
#include "core/io/json.h" #include "core/io/json.h"
#include "core/variant.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {

View File

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

View File

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

View File

@ -174,72 +174,72 @@ typedef struct godot_pool_color_array godot_pool_color_array;
*/ */
/////// String /////// String
#include "string.h" #include <godot/string.h>
////// Vector2 ////// Vector2
#include "vector2.h" #include <godot/vector2.h>
////// Rect2 ////// Rect2
#include "rect2.h" #include <godot/rect2.h>
////// Vector3 ////// Vector3
#include "vector3.h" #include <godot/vector3.h>
////// Transform2D ////// Transform2D
#include "transform2d.h" #include <godot/transform2d.h>
/////// Plane /////// Plane
#include "plane.h" #include <godot/plane.h>
/////// Quat /////// Quat
#include "quat.h" #include <godot/quat.h>
/////// Rect3 /////// Rect3
#include "rect3.h" #include <godot/rect3.h>
/////// Basis /////// Basis
#include "basis.h" #include <godot/basis.h>
/////// Transform /////// Transform
#include "transform.h" #include <godot/transform.h>
/////// Color /////// Color
#include "color.h" #include <godot/color.h>
/////// NodePath /////// NodePath
#include "node_path.h" #include <godot/node_path.h>
/////// RID /////// RID
#include "rid.h" #include <godot/rid.h>
/////// Dictionary /////// Dictionary
#include "dictionary.h" #include <godot/dictionary.h>
/////// Array /////// Array
#include "array.h" #include <godot/array.h>
// single API file for Pool*Array // single API file for Pool*Array
#include "pool_arrays.h" #include <godot/pool_arrays.h>
void GDAPI godot_object_destroy(godot_object *p_o); void GDAPI godot_object_destroy(godot_object *p_o);
////// Variant ////// Variant
#include "variant.h" #include <godot/variant.h>
////// Singleton API ////// Singleton API

View File

@ -27,10 +27,10 @@
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ /* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/ /*************************************************************************/
#include "node_path.h" #include <godot/node_path.h>
#include "core/variant.h"
#include "core/path_db.h" #include "core/path_db.h"
#include "core/variant.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {

View File

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

View File

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

View File

@ -45,8 +45,8 @@ typedef struct {
} godot_plane; } godot_plane;
#endif #endif
#include "gdnative.h" #include <godot/gdnative.h>
#include "vector3.h" #include <godot/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_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); 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);

View File

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

View File

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

View File

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

View File

@ -45,8 +45,8 @@ typedef struct {
} godot_quat; } godot_quat;
#endif #endif
#include "gdnative.h" #include <godot/gdnative.h>
#include "vector3.h" #include <godot/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(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); void GDAPI godot_quat_new_with_axis_angle(godot_quat *r_dest, const godot_vector3 *p_axis, const godot_real p_angle);

View File

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

View File

@ -43,8 +43,8 @@ typedef struct godot_rect2 {
} godot_rect2; } godot_rect2;
#endif #endif
#include "gdnative.h" #include <godot/gdnative.h>
#include "vector2.h" #include <godot/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_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); 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);

View File

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

View File

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

View File

@ -27,11 +27,11 @@
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ /* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/ /*************************************************************************/
#include "rid.h" #include <godot/rid.h>
#include "core/variant.h"
#include "core/resource.h" #include "core/resource.h"
#include "core/rid.h" #include "core/rid.h"
#include "core/variant.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {

View File

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

View File

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

View File

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

View File

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

View File

@ -45,10 +45,10 @@ typedef struct {
} godot_transform; } godot_transform;
#endif #endif
#include "basis.h" #include <godot/basis.h>
#include "gdnative.h" #include <godot/gdnative.h>
#include "variant.h" #include <godot/variant.h>
#include "vector3.h" #include <godot/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_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); void GDAPI godot_transform_new(godot_transform *r_dest, const godot_basis *p_basis, const godot_vector3 *p_origin);

View File

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

View File

@ -45,9 +45,9 @@ typedef struct {
} godot_transform2d; } godot_transform2d;
#endif #endif
#include "gdnative.h" #include <godot/gdnative.h>
#include "variant.h" #include <godot/variant.h>
#include "vector2.h" #include <godot/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(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); 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);

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -76,4 +76,26 @@ void register_gdnative_types() {
void unregister_gdnative_types() { void unregister_gdnative_types() {
memdelete(GDNativeCallRegistry::singleton); memdelete(GDNativeCallRegistry::singleton);
// This is for printing out the sizes of the core types
/*
print_line(String("array:\t") + itos(sizeof(Array)));
print_line(String("basis:\t") + itos(sizeof(Basis)));
print_line(String("color:\t") + itos(sizeof(Color)));
print_line(String("dict:\t" ) + itos(sizeof(Dictionary)));
print_line(String("node_path:\t") + itos(sizeof(NodePath)));
print_line(String("plane:\t") + itos(sizeof(Plane)));
print_line(String("poolarray:\t") + itos(sizeof(PoolByteArray)));
print_line(String("quat:\t") + itos(sizeof(Quat)));
print_line(String("rect2:\t") + itos(sizeof(Rect2)));
print_line(String("rect3:\t") + itos(sizeof(Rect3)));
print_line(String("rid:\t") + itos(sizeof(RID)));
print_line(String("string:\t") + itos(sizeof(String)));
print_line(String("transform:\t") + itos(sizeof(Transform)));
print_line(String("transfo2D:\t") + itos(sizeof(Transform2D)));
print_line(String("variant:\t") + itos(sizeof(Variant)));
print_line(String("vector2:\t") + itos(sizeof(Vector2)));
print_line(String("vector3:\t") + itos(sizeof(Vector3)));
*/
} }