diff options
Diffstat (limited to 'modules')
19 files changed, 163 insertions, 1 deletions
diff --git a/modules/gdnative/include/gdnative/array.h b/modules/gdnative/include/gdnative/array.h index edab028cba..d0639589b7 100644 --- a/modules/gdnative/include/gdnative/array.h +++ b/modules/gdnative/include/gdnative/array.h @@ -46,11 +46,20 @@ typedef struct { } godot_array; #endif +// reduce extern "C" nesting for VS2013 +#ifdef __cplusplus +} +#endif + #include <gdnative/pool_arrays.h> #include <gdnative/variant.h> #include <gdnative/gdnative.h> +#ifdef __cplusplus +extern "C" { +#endif + 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_pool_color_array(godot_array *r_dest, const godot_pool_color_array *p_pca); diff --git a/modules/gdnative/include/gdnative/basis.h b/modules/gdnative/include/gdnative/basis.h index 8ff6a6f541..b86b1c17d8 100644 --- a/modules/gdnative/include/gdnative/basis.h +++ b/modules/gdnative/include/gdnative/basis.h @@ -45,10 +45,19 @@ typedef struct { } godot_basis; #endif +// reduce extern "C" nesting for VS2013 +#ifdef __cplusplus +} +#endif + #include <gdnative/gdnative.h> #include <gdnative/quat.h> #include <gdnative/vector3.h> +#ifdef __cplusplus +extern "C" { +#endif + 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_euler(godot_basis *r_dest, const godot_vector3 *p_euler); diff --git a/modules/gdnative/include/gdnative/color.h b/modules/gdnative/include/gdnative/color.h index 14265466b9..857e86a738 100644 --- a/modules/gdnative/include/gdnative/color.h +++ b/modules/gdnative/include/gdnative/color.h @@ -45,9 +45,18 @@ typedef struct { } godot_color; #endif +// reduce extern "C" nesting for VS2013 +#ifdef __cplusplus +} +#endif + #include <gdnative/gdnative.h> #include <gdnative/string.h> +#ifdef __cplusplus +extern "C" { +#endif + 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); diff --git a/modules/gdnative/include/gdnative/dictionary.h b/modules/gdnative/include/gdnative/dictionary.h index c85c3f3830..e68d0fdc29 100644 --- a/modules/gdnative/include/gdnative/dictionary.h +++ b/modules/gdnative/include/gdnative/dictionary.h @@ -45,10 +45,19 @@ typedef struct { } godot_dictionary; #endif +// reduce extern "C" nesting for VS2013 +#ifdef __cplusplus +} +#endif + #include <gdnative/array.h> #include <gdnative/gdnative.h> #include <gdnative/variant.h> +#ifdef __cplusplus +extern "C" { +#endif + 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_destroy(godot_dictionary *p_self); diff --git a/modules/gdnative/include/gdnative/node_path.h b/modules/gdnative/include/gdnative/node_path.h index 0cfdbc1127..42446175d8 100644 --- a/modules/gdnative/include/gdnative/node_path.h +++ b/modules/gdnative/include/gdnative/node_path.h @@ -45,9 +45,18 @@ typedef struct { } godot_node_path; #endif +// reduce extern "C" nesting for VS2013 +#ifdef __cplusplus +} +#endif + #include <gdnative/gdnative.h> #include <gdnative/string.h> +#ifdef __cplusplus +extern "C" { +#endif + 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_destroy(godot_node_path *p_self); diff --git a/modules/gdnative/include/gdnative/plane.h b/modules/gdnative/include/gdnative/plane.h index 6a8915e08b..dddd172122 100644 --- a/modules/gdnative/include/gdnative/plane.h +++ b/modules/gdnative/include/gdnative/plane.h @@ -45,9 +45,18 @@ typedef struct { } godot_plane; #endif +// reduce extern "C" nesting for VS2013 +#ifdef __cplusplus +} +#endif + #include <gdnative/gdnative.h> #include <gdnative/vector3.h> +#ifdef __cplusplus +extern "C" { +#endif + 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_normal(godot_plane *r_dest, const godot_vector3 *p_normal, const godot_real p_d); diff --git a/modules/gdnative/include/gdnative/pool_arrays.h b/modules/gdnative/include/gdnative/pool_arrays.h index cb1095ee8c..93181f2a6b 100644 --- a/modules/gdnative/include/gdnative/pool_arrays.h +++ b/modules/gdnative/include/gdnative/pool_arrays.h @@ -113,6 +113,11 @@ typedef struct { } godot_pool_color_array; #endif +// reduce extern "C" nesting for VS2013 +#ifdef __cplusplus +} +#endif + #include <gdnative/array.h> #include <gdnative/color.h> #include <gdnative/vector2.h> @@ -120,6 +125,10 @@ typedef struct { #include <gdnative/gdnative.h> +#ifdef __cplusplus +extern "C" { +#endif + // byte void GDAPI godot_pool_byte_array_new(godot_pool_byte_array *r_dest); diff --git a/modules/gdnative/include/gdnative/quat.h b/modules/gdnative/include/gdnative/quat.h index 4ffb96eb26..acae6e3e90 100644 --- a/modules/gdnative/include/gdnative/quat.h +++ b/modules/gdnative/include/gdnative/quat.h @@ -45,9 +45,18 @@ typedef struct { } godot_quat; #endif +// reduce extern "C" nesting for VS2013 +#ifdef __cplusplus +} +#endif + #include <gdnative/gdnative.h> #include <gdnative/vector3.h> +#ifdef __cplusplus +extern "C" { +#endif + 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); diff --git a/modules/gdnative/include/gdnative/rect2.h b/modules/gdnative/include/gdnative/rect2.h index 9e6cf60342..1c66443d4f 100644 --- a/modules/gdnative/include/gdnative/rect2.h +++ b/modules/gdnative/include/gdnative/rect2.h @@ -43,9 +43,18 @@ typedef struct godot_rect2 { } godot_rect2; #endif +// reduce extern "C" nesting for VS2013 +#ifdef __cplusplus +} +#endif + #include <gdnative/gdnative.h> #include <gdnative/vector2.h> +#ifdef __cplusplus +extern "C" { +#endif + 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); diff --git a/modules/gdnative/include/gdnative/rect3.h b/modules/gdnative/include/gdnative/rect3.h index f94b6fea25..f603a9268a 100644 --- a/modules/gdnative/include/gdnative/rect3.h +++ b/modules/gdnative/include/gdnative/rect3.h @@ -45,10 +45,19 @@ typedef struct { } godot_rect3; #endif +// reduce extern "C" nesting for VS2013 +#ifdef __cplusplus +} +#endif + #include <gdnative/gdnative.h> #include <gdnative/plane.h> #include <gdnative/vector3.h> +#ifdef __cplusplus +extern "C" { +#endif + void GDAPI godot_rect3_new(godot_rect3 *r_dest, const godot_vector3 *p_pos, const godot_vector3 *p_size); godot_vector3 GDAPI godot_rect3_get_position(const godot_rect3 *p_self); diff --git a/modules/gdnative/include/gdnative/rid.h b/modules/gdnative/include/gdnative/rid.h index d9b5336fc9..caa1bb967e 100644 --- a/modules/gdnative/include/gdnative/rid.h +++ b/modules/gdnative/include/gdnative/rid.h @@ -45,8 +45,17 @@ typedef struct { } godot_rid; #endif +// reduce extern "C" nesting for VS2013 +#ifdef __cplusplus +} +#endif + #include <gdnative/gdnative.h> +#ifdef __cplusplus +extern "C" { +#endif + void GDAPI godot_rid_new(godot_rid *r_dest); godot_int GDAPI godot_rid_get_id(const godot_rid *p_self); diff --git a/modules/gdnative/include/gdnative/string.h b/modules/gdnative/include/gdnative/string.h index aca23a81d8..f30fdb8dc7 100644 --- a/modules/gdnative/include/gdnative/string.h +++ b/modules/gdnative/include/gdnative/string.h @@ -46,9 +46,18 @@ typedef struct { } godot_string; #endif +// reduce extern "C" nesting for VS2013 +#ifdef __cplusplus +} +#endif + #include <gdnative/gdnative.h> #include <gdnative/variant.h> +#ifdef __cplusplus +extern "C" { +#endif + 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_data(godot_string *r_dest, const char *p_contents, const int p_size); diff --git a/modules/gdnative/include/gdnative/string_name.h b/modules/gdnative/include/gdnative/string_name.h index e217487250..ee9f603d20 100644 --- a/modules/gdnative/include/gdnative/string_name.h +++ b/modules/gdnative/include/gdnative/string_name.h @@ -46,8 +46,17 @@ typedef struct { } godot_string_name; #endif +// reduce extern "C" nesting for VS2013 +#ifdef __cplusplus +} +#endif + #include <gdnative/gdnative.h> +#ifdef __cplusplus +extern "C" { +#endif + void GDAPI godot_string_name_new(godot_string_name *r_dest, const godot_string *p_name); void GDAPI godot_string_name_new_data(godot_string_name *r_dest, const char *p_name); diff --git a/modules/gdnative/include/gdnative/transform.h b/modules/gdnative/include/gdnative/transform.h index 656afae129..8f50b01fb5 100644 --- a/modules/gdnative/include/gdnative/transform.h +++ b/modules/gdnative/include/gdnative/transform.h @@ -45,11 +45,20 @@ typedef struct { } godot_transform; #endif +// reduce extern "C" nesting for VS2013 +#ifdef __cplusplus +} +#endif + #include <gdnative/basis.h> #include <gdnative/gdnative.h> #include <gdnative/variant.h> #include <gdnative/vector3.h> +#ifdef __cplusplus +extern "C" { +#endif + 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); diff --git a/modules/gdnative/include/gdnative/transform2d.h b/modules/gdnative/include/gdnative/transform2d.h index a945868b17..c68bd2963f 100644 --- a/modules/gdnative/include/gdnative/transform2d.h +++ b/modules/gdnative/include/gdnative/transform2d.h @@ -45,10 +45,19 @@ typedef struct { } godot_transform2d; #endif +// reduce extern "C" nesting for VS2013 +#ifdef __cplusplus +} +#endif + #include <gdnative/gdnative.h> #include <gdnative/variant.h> #include <gdnative/vector2.h> +#ifdef __cplusplus +extern "C" { +#endif + 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); diff --git a/modules/gdnative/include/gdnative/variant.h b/modules/gdnative/include/gdnative/variant.h index 7b804c1eaf..3d744ef1f2 100644 --- a/modules/gdnative/include/gdnative/variant.h +++ b/modules/gdnative/include/gdnative/variant.h @@ -99,6 +99,11 @@ typedef struct godot_variant_call_error { godot_variant_type expected; } godot_variant_call_error; +// reduce extern "C" nesting for VS2013 +#ifdef __cplusplus +} +#endif + #include <gdnative/array.h> #include <gdnative/basis.h> #include <gdnative/color.h> @@ -119,6 +124,10 @@ typedef struct godot_variant_call_error { #include <gdnative/gdnative.h> +#ifdef __cplusplus +extern "C" { +#endif + godot_variant_type GDAPI godot_variant_get_type(const godot_variant *p_v); void GDAPI godot_variant_new_copy(godot_variant *r_dest, const godot_variant *p_src); diff --git a/modules/gdnative/include/gdnative/vector2.h b/modules/gdnative/include/gdnative/vector2.h index 0af4abae27..07105abaf2 100644 --- a/modules/gdnative/include/gdnative/vector2.h +++ b/modules/gdnative/include/gdnative/vector2.h @@ -45,8 +45,17 @@ typedef struct { } godot_vector2; #endif +// reduce extern "C" nesting for VS2013 +#ifdef __cplusplus +} +#endif + #include <gdnative/gdnative.h> +#ifdef __cplusplus +extern "C" { +#endif + void GDAPI godot_vector2_new(godot_vector2 *r_dest, const godot_real p_x, const godot_real p_y); godot_string GDAPI godot_vector2_as_string(const godot_vector2 *p_self); diff --git a/modules/gdnative/include/gdnative/vector3.h b/modules/gdnative/include/gdnative/vector3.h index a27d516ec5..3ed23778ec 100644 --- a/modules/gdnative/include/gdnative/vector3.h +++ b/modules/gdnative/include/gdnative/vector3.h @@ -45,9 +45,18 @@ typedef struct { } godot_vector3; #endif +// reduce extern "C" nesting for VS2013 +#ifdef __cplusplus +} +#endif + #include <gdnative/basis.h> #include <gdnative/gdnative.h> +#ifdef __cplusplus +extern "C" { +#endif + typedef enum { GODOT_VECTOR3_AXIS_X, GODOT_VECTOR3_AXIS_Y, diff --git a/modules/mobile_vr/mobile_interface.h b/modules/mobile_vr/mobile_interface.h index 6a5e01c163..747377ae46 100644 --- a/modules/mobile_vr/mobile_interface.h +++ b/modules/mobile_vr/mobile_interface.h @@ -90,7 +90,7 @@ private: ///@TODO a few support functions for trackers, most are math related and should likely be moved elsewhere float floor_decimals(float p_value, float p_decimals) { - float power_of_10 = pow(10.0, p_decimals); + float power_of_10 = pow(10.0f, p_decimals); return floor(p_value * power_of_10) / power_of_10; }; |