diff options
| author | Karroffel <therzog@mail.de> | 2017-07-23 17:53:50 +0200 |
|---|---|---|
| committer | Karroffel <therzog@mail.de> | 2017-07-23 17:53:50 +0200 |
| commit | 4769f49cb4b9465ec27ff076e1cf97286cd13453 (patch) | |
| tree | 1da8dbf14f072f634d7fddac70dff25998d60818 /include/core | |
| parent | 606d2624af00d58da1c3dff0e25c55099459a973 (diff) | |
| download | redot-cpp-4769f49cb4b9465ec27ff076e1cf97286cd13453.tar.gz | |
Use static linking instead of dynamic linking
Diffstat (limited to 'include/core')
| -rw-r--r-- | include/core/Array.hpp | 12 | ||||
| -rw-r--r-- | include/core/Basis.hpp | 18 | ||||
| -rw-r--r-- | include/core/Color.hpp | 12 | ||||
| -rw-r--r-- | include/core/Dictionary.hpp | 12 | ||||
| -rw-r--r-- | include/core/GodotGlobal.hpp | 12 | ||||
| -rw-r--r-- | include/core/NodePath.hpp | 12 | ||||
| -rw-r--r-- | include/core/Plane.hpp | 12 | ||||
| -rw-r--r-- | include/core/PoolArrays.hpp | 24 | ||||
| -rw-r--r-- | include/core/Quat.hpp | 12 | ||||
| -rw-r--r-- | include/core/RID.hpp | 12 | ||||
| -rw-r--r-- | include/core/Rect2.hpp | 12 | ||||
| -rw-r--r-- | include/core/Rect3.hpp | 12 | ||||
| -rw-r--r-- | include/core/Ref.hpp | 10 | ||||
| -rw-r--r-- | include/core/String.hpp | 12 | ||||
| -rw-r--r-- | include/core/Transform.hpp | 12 | ||||
| -rw-r--r-- | include/core/Transform2D.hpp | 12 | ||||
| -rw-r--r-- | include/core/Variant.hpp | 12 | ||||
| -rw-r--r-- | include/core/Vector2.hpp | 13 | ||||
| -rw-r--r-- | include/core/Vector3.hpp | 14 |
19 files changed, 28 insertions, 219 deletions
diff --git a/include/core/Array.hpp b/include/core/Array.hpp index 9a39b35..1b60788 100644 --- a/include/core/Array.hpp +++ b/include/core/Array.hpp @@ -1,16 +1,6 @@ #ifndef ARRAY_H #define ARRAY_H -#if defined(_WIN32) -# ifdef _GD_CPP_CORE_API_IMPL -# define GD_CPP_CORE_API __declspec(dllexport) -# else -# define GD_CPP_CORE_API __declspec(dllimport) -# endif -#else -# define GD_CPP_CORE_API -#endif - #include <godot/godot_array.h> #include "String.hpp" @@ -28,7 +18,7 @@ class PoolColorArray; class Object; -class GD_CPP_CORE_API Array { +class Array { godot_array _godot_array; public: Array(); diff --git a/include/core/Basis.hpp b/include/core/Basis.hpp index eda3d09..dad20b6 100644 --- a/include/core/Basis.hpp +++ b/include/core/Basis.hpp @@ -1,16 +1,6 @@ #ifndef BASIS_H #define BASIS_H -#if defined(_WIN32) -# ifdef _GD_CPP_CORE_API_IMPL -# define GD_CPP_CORE_API __declspec(dllexport) -# else -# define GD_CPP_CORE_API __declspec(dllimport) -# endif -#else -# define GD_CPP_CORE_API -#endif - #include "Defs.hpp" #include "Vector3.hpp" @@ -19,10 +9,12 @@ namespace godot { class Quat; -class GD_CPP_CORE_API Basis { +class Basis { public: - - Vector3 elements[3]; + union { + Vector3 elements[3]; + Vector3 x, y, z; + }; Basis(const Quat& p_quat); // euler Basis(const Vector3& p_euler); // euler diff --git a/include/core/Color.hpp b/include/core/Color.hpp index dbaf7aa..528e674 100644 --- a/include/core/Color.hpp +++ b/include/core/Color.hpp @@ -1,16 +1,6 @@ #ifndef COLOR_H #define COLOR_H -#if defined(_WIN32) -# ifdef _GD_CPP_CORE_API_IMPL -# define GD_CPP_CORE_API __declspec(dllexport) -# else -# define GD_CPP_CORE_API __declspec(dllimport) -# endif -#else -# define GD_CPP_CORE_API -#endif - #include <godot/godot_color.h> #include <cmath> @@ -20,7 +10,7 @@ namespace godot { -struct GD_CPP_CORE_API Color { +struct Color { private: diff --git a/include/core/Dictionary.hpp b/include/core/Dictionary.hpp index 34582c8..4c719f5 100644 --- a/include/core/Dictionary.hpp +++ b/include/core/Dictionary.hpp @@ -1,16 +1,6 @@ #ifndef DICTIONARY_H #define DICTIONARY_H -#if defined(_WIN32) -# ifdef _GD_CPP_CORE_API_IMPL -# define GD_CPP_CORE_API __declspec(dllexport) -# else -# define GD_CPP_CORE_API __declspec(dllimport) -# endif -#else -# define GD_CPP_CORE_API -#endif - #include "Variant.hpp" #include "Array.hpp" @@ -19,7 +9,7 @@ namespace godot { -class GD_CPP_CORE_API Dictionary { +class Dictionary { godot_dictionary _godot_dictionary; public: Dictionary(); diff --git a/include/core/GodotGlobal.hpp b/include/core/GodotGlobal.hpp index df93c0a..18e2306 100644 --- a/include/core/GodotGlobal.hpp +++ b/include/core/GodotGlobal.hpp @@ -1,22 +1,12 @@ #ifndef GODOT_GLOBAL_HPP #define GODOT_GLOBAL_HPP -#if defined(_WIN32) -# ifdef _GD_CPP_CORE_API_IMPL -# define GD_CPP_CORE_API __declspec(dllexport) -# else -# define GD_CPP_CORE_API __declspec(dllimport) -# endif -#else -# define GD_CPP_CORE_API -#endif - #include "String.hpp" namespace godot { -class GD_CPP_CORE_API Godot { +class Godot { public: static void print(const String& message); diff --git a/include/core/NodePath.hpp b/include/core/NodePath.hpp index 3f75ca1..91cb1e1 100644 --- a/include/core/NodePath.hpp +++ b/include/core/NodePath.hpp @@ -1,16 +1,6 @@ #ifndef NODEPATH_H #define NODEPATH_H -#if defined(_WIN32) -# ifdef _GD_CPP_CORE_API_IMPL -# define GD_CPP_CORE_API __declspec(dllexport) -# else -# define GD_CPP_CORE_API __declspec(dllimport) -# endif -#else -# define GD_CPP_CORE_API -#endif - #include "String.hpp" #include <godot/godot_node_path.h> @@ -18,7 +8,7 @@ namespace godot { -class GD_CPP_CORE_API NodePath +class NodePath { godot_node_path _node_path; public: diff --git a/include/core/Plane.hpp b/include/core/Plane.hpp index dbcf448..5ad5fcd 100644 --- a/include/core/Plane.hpp +++ b/include/core/Plane.hpp @@ -1,16 +1,6 @@ #ifndef PLANE_H #define PLANE_H -#if defined(_WIN32) -# ifdef _GD_CPP_CORE_API_IMPL -# define GD_CPP_CORE_API __declspec(dllexport) -# else -# define GD_CPP_CORE_API __declspec(dllimport) -# endif -#else -# define GD_CPP_CORE_API -#endif - #include "Vector3.hpp" #include <cmath> @@ -25,7 +15,7 @@ enum ClockDirection { COUNTERCLOCKWISE }; -class GD_CPP_CORE_API Plane { +class Plane { public: Vector3 normal; real_t d; diff --git a/include/core/PoolArrays.hpp b/include/core/PoolArrays.hpp index ebbd61d..e2a51f1 100644 --- a/include/core/PoolArrays.hpp +++ b/include/core/PoolArrays.hpp @@ -1,16 +1,6 @@ #ifndef POOLARRAYS_H #define POOLARRAYS_H -#if defined(_WIN32) -# ifdef _GD_CPP_CORE_API_IMPL -# define GD_CPP_CORE_API __declspec(dllexport) -# else -# define GD_CPP_CORE_API __declspec(dllimport) -# endif -#else -# define GD_CPP_CORE_API -#endif - #include "Defs.hpp" #include "String.hpp" @@ -24,7 +14,7 @@ namespace godot { class Array; -class GD_CPP_CORE_API PoolByteArray { +class PoolByteArray { godot_pool_byte_array _godot_array; public: PoolByteArray(); @@ -55,7 +45,7 @@ public: }; -class GD_CPP_CORE_API PoolIntArray { +class PoolIntArray { godot_pool_int_array _godot_array; public: PoolIntArray(); @@ -86,7 +76,7 @@ public: }; -class GD_CPP_CORE_API PoolRealArray { +class PoolRealArray { godot_pool_real_array _godot_array; public: PoolRealArray(); @@ -117,7 +107,7 @@ public: }; -class GD_CPP_CORE_API PoolStringArray { +class PoolStringArray { godot_pool_string_array _godot_array; public: PoolStringArray(); @@ -149,7 +139,7 @@ public: -class GD_CPP_CORE_API PoolVector2Array { +class PoolVector2Array { godot_pool_vector2_array _godot_array; public: PoolVector2Array(); @@ -180,7 +170,7 @@ public: }; -class GD_CPP_CORE_API PoolVector3Array { +class PoolVector3Array { godot_pool_vector3_array _godot_array; public: PoolVector3Array(); @@ -211,7 +201,7 @@ public: }; -class GD_CPP_CORE_API PoolColorArray { +class PoolColorArray { godot_pool_color_array _godot_array; public: PoolColorArray(); diff --git a/include/core/Quat.hpp b/include/core/Quat.hpp index 03bb015..927d4a3 100644 --- a/include/core/Quat.hpp +++ b/include/core/Quat.hpp @@ -1,16 +1,6 @@ #ifndef QUAT_H #define QUAT_H -#if defined(_WIN32) -# ifdef _GD_CPP_CORE_API_IMPL -# define GD_CPP_CORE_API __declspec(dllexport) -# else -# define GD_CPP_CORE_API __declspec(dllimport) -# endif -#else -# define GD_CPP_CORE_API -#endif - #include <cmath> #include "Vector3.hpp" @@ -19,7 +9,7 @@ namespace godot { -class GD_CPP_CORE_API Quat{ +class Quat{ public: real_t x,y,z,w; diff --git a/include/core/RID.hpp b/include/core/RID.hpp index 7d3bc41..5855049 100644 --- a/include/core/RID.hpp +++ b/include/core/RID.hpp @@ -1,23 +1,13 @@ #ifndef RID_H #define RID_H -#if defined(_WIN32) -# ifdef _GD_CPP_CORE_API_IMPL -# define GD_CPP_CORE_API __declspec(dllexport) -# else -# define GD_CPP_CORE_API __declspec(dllimport) -# endif -#else -# define GD_CPP_CORE_API -#endif - #include <godot/godot_rid.h> namespace godot { class Object; -class GD_CPP_CORE_API RID { +class RID { godot_rid _godot_rid; public: diff --git a/include/core/Rect2.hpp b/include/core/Rect2.hpp index 849fa68..792972d 100644 --- a/include/core/Rect2.hpp +++ b/include/core/Rect2.hpp @@ -1,16 +1,6 @@ #ifndef RECT2_H #define RECT2_H -#if defined(_WIN32) -# ifdef _GD_CPP_CORE_API_IMPL -# define GD_CPP_CORE_API __declspec(dllexport) -# else -# define GD_CPP_CORE_API __declspec(dllimport) -# endif -#else -# define GD_CPP_CORE_API -#endif - #include "Vector2.hpp" #include <cmath> @@ -26,7 +16,7 @@ typedef Vector2 Point2; class Transform2D; -struct GD_CPP_CORE_API Rect2 { +struct Rect2 { Point2 pos; Size2 size; diff --git a/include/core/Rect3.hpp b/include/core/Rect3.hpp index b04195c..acd674f 100644 --- a/include/core/Rect3.hpp +++ b/include/core/Rect3.hpp @@ -1,16 +1,6 @@ #ifndef RECT3_H #define RECT3_H -#if defined(_WIN32) -# ifdef _GD_CPP_CORE_API_IMPL -# define GD_CPP_CORE_API __declspec(dllexport) -# else -# define GD_CPP_CORE_API __declspec(dllimport) -# endif -#else -# define GD_CPP_CORE_API -#endif - #include "Vector3.hpp" #include "Plane.hpp" @@ -19,7 +9,7 @@ namespace godot { -class GD_CPP_CORE_API Rect3 { +class Rect3 { public: Vector3 pos; Vector3 size; diff --git a/include/core/Ref.hpp b/include/core/Ref.hpp index 78b1926..30d0816 100644 --- a/include/core/Ref.hpp +++ b/include/core/Ref.hpp @@ -1,16 +1,6 @@ #ifndef REF_H #define REF_H -#if defined(_WIN32) -# ifdef _GD_CPP_CORE_API_IMPL -# define GD_CPP_CORE_API __declspec(dllexport) -# else -# define GD_CPP_CORE_API __declspec(dllimport) -# endif -#else -# define GD_CPP_CORE_API -#endif - #include "Variant.hpp" namespace godot { diff --git a/include/core/String.hpp b/include/core/String.hpp index ee6532e..0b4e4fb 100644 --- a/include/core/String.hpp +++ b/include/core/String.hpp @@ -1,23 +1,13 @@ #ifndef STRING_H #define STRING_H -#if defined(_WIN32) -# ifdef _GD_CPP_CORE_API_IMPL -# define GD_CPP_CORE_API __declspec(dllexport) -# else -# define GD_CPP_CORE_API __declspec(dllimport) -# endif -#else -# define GD_CPP_CORE_API -#endif - #include <godot/godot_string.h> namespace godot { class NodePath; -class GD_CPP_CORE_API String +class String { godot_string _godot_string; public: diff --git a/include/core/Transform.hpp b/include/core/Transform.hpp index f6f5143..c6b9b14 100644 --- a/include/core/Transform.hpp +++ b/include/core/Transform.hpp @@ -1,16 +1,6 @@ #ifndef TRANSFORM_H #define TRANSFORM_H -#if defined(_WIN32) -# ifdef _GD_CPP_CORE_API_IMPL -# define GD_CPP_CORE_API __declspec(dllexport) -# else -# define GD_CPP_CORE_API __declspec(dllimport) -# endif -#else -# define GD_CPP_CORE_API -#endif - #include "Basis.hpp" #include "Plane.hpp" @@ -18,7 +8,7 @@ namespace godot { -class GD_CPP_CORE_API Transform { +class Transform { public: Basis basis; diff --git a/include/core/Transform2D.hpp b/include/core/Transform2D.hpp index 553c324..f3bc5fb 100644 --- a/include/core/Transform2D.hpp +++ b/include/core/Transform2D.hpp @@ -1,16 +1,6 @@ #ifndef TRANSFORM2D_H #define TRANSFORM2D_H -#if defined(_WIN32) -# ifdef _GD_CPP_CORE_API_IMPL -# define GD_CPP_CORE_API __declspec(dllexport) -# else -# define GD_CPP_CORE_API __declspec(dllimport) -# endif -#else -# define GD_CPP_CORE_API -#endif - #include "Vector2.hpp" @@ -20,7 +10,7 @@ typedef Vector2 Size2; class Rect2; -struct GD_CPP_CORE_API Transform2D { +struct Transform2D { // Warning #1: basis of Transform2D is stored differently from Basis. In terms of elements array, the basis matrix looks like "on paper": // M = (elements[0][0] elements[1][0]) // (elements[0][1] elements[1][1]) diff --git a/include/core/Variant.hpp b/include/core/Variant.hpp index 05ca4e4..670c5c2 100644 --- a/include/core/Variant.hpp +++ b/include/core/Variant.hpp @@ -1,16 +1,6 @@ #ifndef VARIANT_H #define VARIANT_H -#if defined(_WIN32) -# ifdef _GD_CPP_CORE_API_IMPL -# define GD_CPP_CORE_API __declspec(dllexport) -# else -# define GD_CPP_CORE_API __declspec(dllimport) -# endif -#else -# define GD_CPP_CORE_API -#endif - #include <godot/godot_variant.h> #include "Defs.hpp" @@ -38,7 +28,7 @@ class Dictionary; class Array; -class GD_CPP_CORE_API Variant { +class Variant { godot_variant _godot_variant; public: enum Type { diff --git a/include/core/Vector2.hpp b/include/core/Vector2.hpp index 73dd562..9cdde2a 100644 --- a/include/core/Vector2.hpp +++ b/include/core/Vector2.hpp @@ -1,17 +1,6 @@ #ifndef VECTOR2_H #define VECTOR2_H - -#if defined(_WIN32) -# ifdef _GD_CPP_CORE_API_IMPL -# define GD_CPP_CORE_API __declspec(dllexport) -# else -# define GD_CPP_CORE_API __declspec(dllimport) -# endif -#else -# define GD_CPP_CORE_API -#endif - #include <godot/godot_vector2.h> #include "Defs.hpp" @@ -20,7 +9,7 @@ namespace godot { class String; -struct GD_CPP_CORE_API Vector2 { +struct Vector2 { union { real_t x; diff --git a/include/core/Vector3.hpp b/include/core/Vector3.hpp index 52a5d73..fa7dcf4 100644 --- a/include/core/Vector3.hpp +++ b/include/core/Vector3.hpp @@ -1,16 +1,6 @@ #ifndef VECTOR3_H #define VECTOR3_H -#if defined(_WIN32) -# ifdef _GD_CPP_CORE_API_IMPL -# define GD_CPP_CORE_API __declspec(dllexport) -# else -# define GD_CPP_CORE_API __declspec(dllimport) -# endif -#else -# define GD_CPP_CORE_API -#endif - #include "Defs.hpp" #include "String.hpp" @@ -18,7 +8,7 @@ namespace godot { -struct GD_CPP_CORE_API Vector3 { +struct Vector3 { enum Axis { AXIS_X, @@ -40,8 +30,6 @@ struct GD_CPP_CORE_API Vector3 { Vector3(); - Vector3(const Vector3& b); - const real_t& operator[](int p_axis) const; real_t& operator[](int p_axis); |
