summaryrefslogtreecommitdiffstats
path: root/include/godot_cpp/core
diff options
context:
space:
mode:
authorKarroffel <therzog@mail.de>2017-03-15 23:19:58 +0100
committerKarroffel <therzog@mail.de>2017-03-15 23:19:58 +0100
commit8d63048c6df08da5f0f88b62b2868c6938c222b7 (patch)
treec9113e2139838b11d3040469104a153d1f45a4af /include/godot_cpp/core
parentbce9ac109d63d67c3e7f0b25df8aa9d72e094d1b (diff)
downloadredot-cpp-8d63048c6df08da5f0f88b62b2868c6938c222b7.tar.gz
Windows compatibility
Diffstat (limited to 'include/godot_cpp/core')
-rw-r--r--include/godot_cpp/core/Array.hpp12
-rw-r--r--include/godot_cpp/core/Basis.hpp12
-rw-r--r--include/godot_cpp/core/Color.hpp12
-rw-r--r--include/godot_cpp/core/CoreTypes.hpp2
-rw-r--r--include/godot_cpp/core/Dictionary.hpp12
-rw-r--r--include/godot_cpp/core/Image.hpp12
-rw-r--r--include/godot_cpp/core/InputEvent.cpp2
-rw-r--r--include/godot_cpp/core/InputEvent.hpp14
-rw-r--r--include/godot_cpp/core/NodePath.hpp12
-rw-r--r--include/godot_cpp/core/Plane.hpp12
-rw-r--r--include/godot_cpp/core/PoolArrays.hpp24
-rw-r--r--include/godot_cpp/core/Quat.hpp12
-rw-r--r--include/godot_cpp/core/RID.hpp12
-rw-r--r--include/godot_cpp/core/Rect2.cpp2
-rw-r--r--include/godot_cpp/core/Rect2.hpp12
-rw-r--r--include/godot_cpp/core/Rect3.hpp12
-rw-r--r--include/godot_cpp/core/String.cpp5
-rw-r--r--include/godot_cpp/core/String.hpp12
-rw-r--r--include/godot_cpp/core/Transform.hpp12
-rw-r--r--include/godot_cpp/core/Transform2D.cpp2
-rw-r--r--include/godot_cpp/core/Transform2D.hpp (renamed from include/godot_cpp/core/Transform2D.hp)12
-rw-r--r--include/godot_cpp/core/Variant.hpp14
-rw-r--r--include/godot_cpp/core/Vector2.hpp12
-rw-r--r--include/godot_cpp/core/Vector3.hpp12
24 files changed, 226 insertions, 31 deletions
diff --git a/include/godot_cpp/core/Array.hpp b/include/godot_cpp/core/Array.hpp
index 1b60788..9a39b35 100644
--- a/include/godot_cpp/core/Array.hpp
+++ b/include/godot_cpp/core/Array.hpp
@@ -1,6 +1,16 @@
#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"
@@ -18,7 +28,7 @@ class PoolColorArray;
class Object;
-class Array {
+class GD_CPP_CORE_API Array {
godot_array _godot_array;
public:
Array();
diff --git a/include/godot_cpp/core/Basis.hpp b/include/godot_cpp/core/Basis.hpp
index 018896a..eda3d09 100644
--- a/include/godot_cpp/core/Basis.hpp
+++ b/include/godot_cpp/core/Basis.hpp
@@ -1,6 +1,16 @@
#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"
@@ -9,7 +19,7 @@ namespace godot {
class Quat;
-class Basis {
+class GD_CPP_CORE_API Basis {
public:
Vector3 elements[3];
diff --git a/include/godot_cpp/core/Color.hpp b/include/godot_cpp/core/Color.hpp
index 528e674..dbaf7aa 100644
--- a/include/godot_cpp/core/Color.hpp
+++ b/include/godot_cpp/core/Color.hpp
@@ -1,6 +1,16 @@
#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>
@@ -10,7 +20,7 @@
namespace godot {
-struct Color {
+struct GD_CPP_CORE_API Color {
private:
diff --git a/include/godot_cpp/core/CoreTypes.hpp b/include/godot_cpp/core/CoreTypes.hpp
index 5142b4f..c82243a 100644
--- a/include/godot_cpp/core/CoreTypes.hpp
+++ b/include/godot_cpp/core/CoreTypes.hpp
@@ -18,7 +18,7 @@
#include "RID.hpp"
#include "String.hpp"
#include "Transform.hpp"
-#include "Transform2D.hp"
+#include "Transform2D.hpp"
#include "Variant.hpp"
#include "Vector2.hpp"
#include "Vector3.hpp"
diff --git a/include/godot_cpp/core/Dictionary.hpp b/include/godot_cpp/core/Dictionary.hpp
index 73a7966..139e3ff 100644
--- a/include/godot_cpp/core/Dictionary.hpp
+++ b/include/godot_cpp/core/Dictionary.hpp
@@ -1,6 +1,16 @@
#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"
@@ -9,7 +19,7 @@
namespace godot {
-class Dictionary {
+class GD_CPP_CORE_API Dictionary {
godot_dictionary _godot_dictionary;
public:
Dictionary();
diff --git a/include/godot_cpp/core/Image.hpp b/include/godot_cpp/core/Image.hpp
index 5b1322e..cbe3c72 100644
--- a/include/godot_cpp/core/Image.hpp
+++ b/include/godot_cpp/core/Image.hpp
@@ -1,6 +1,16 @@
#ifndef IMAGE_H
#define IMAGE_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 "Vector2.hpp"
@@ -14,7 +24,7 @@ namespace godot {
class PoolByteArray;
-class Image {
+class GD_CPP_CORE_API Image {
godot_image _godot_image;
public:
diff --git a/include/godot_cpp/core/InputEvent.cpp b/include/godot_cpp/core/InputEvent.cpp
index b21bca6..b0080c4 100644
--- a/include/godot_cpp/core/InputEvent.cpp
+++ b/include/godot_cpp/core/InputEvent.cpp
@@ -4,7 +4,7 @@
#include <memory.h>
#include "Vector2.hpp"
-#include "Transform2D.hp"
+#include "Transform2D.hpp"
#include <cmath>
diff --git a/include/godot_cpp/core/InputEvent.hpp b/include/godot_cpp/core/InputEvent.hpp
index ef67817..f4fb33d 100644
--- a/include/godot_cpp/core/InputEvent.hpp
+++ b/include/godot_cpp/core/InputEvent.hpp
@@ -1,6 +1,16 @@
#ifndef INPUTEVENT_H
#define INPUTEVENT_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 <cstdint>
#include <memory.h>
@@ -119,7 +129,7 @@ enum {
* Input Modifier Status
* for keyboard/mouse events.
*/
-struct InputModifierState {
+struct GD_CPP_CORE_API InputModifierState {
bool shift;
bool alt;
@@ -223,7 +233,7 @@ struct InputEventAction {
class Transform2D;
-struct InputEvent {
+struct GD_CPP_CORE_API InputEvent {
enum Type {
NONE,
diff --git a/include/godot_cpp/core/NodePath.hpp b/include/godot_cpp/core/NodePath.hpp
index 180b8a1..c941ad0 100644
--- a/include/godot_cpp/core/NodePath.hpp
+++ b/include/godot_cpp/core/NodePath.hpp
@@ -1,6 +1,16 @@
#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>
@@ -8,7 +18,7 @@
namespace godot {
-class NodePath
+class GD_CPP_CORE_API NodePath
{
godot_node_path _node_path;
public:
diff --git a/include/godot_cpp/core/Plane.hpp b/include/godot_cpp/core/Plane.hpp
index 5ad5fcd..dbcf448 100644
--- a/include/godot_cpp/core/Plane.hpp
+++ b/include/godot_cpp/core/Plane.hpp
@@ -1,6 +1,16 @@
#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>
@@ -15,7 +25,7 @@ enum ClockDirection {
COUNTERCLOCKWISE
};
-class Plane {
+class GD_CPP_CORE_API Plane {
public:
Vector3 normal;
real_t d;
diff --git a/include/godot_cpp/core/PoolArrays.hpp b/include/godot_cpp/core/PoolArrays.hpp
index e2a51f1..ebbd61d 100644
--- a/include/godot_cpp/core/PoolArrays.hpp
+++ b/include/godot_cpp/core/PoolArrays.hpp
@@ -1,6 +1,16 @@
#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"
@@ -14,7 +24,7 @@ namespace godot {
class Array;
-class PoolByteArray {
+class GD_CPP_CORE_API PoolByteArray {
godot_pool_byte_array _godot_array;
public:
PoolByteArray();
@@ -45,7 +55,7 @@ public:
};
-class PoolIntArray {
+class GD_CPP_CORE_API PoolIntArray {
godot_pool_int_array _godot_array;
public:
PoolIntArray();
@@ -76,7 +86,7 @@ public:
};
-class PoolRealArray {
+class GD_CPP_CORE_API PoolRealArray {
godot_pool_real_array _godot_array;
public:
PoolRealArray();
@@ -107,7 +117,7 @@ public:
};
-class PoolStringArray {
+class GD_CPP_CORE_API PoolStringArray {
godot_pool_string_array _godot_array;
public:
PoolStringArray();
@@ -139,7 +149,7 @@ public:
-class PoolVector2Array {
+class GD_CPP_CORE_API PoolVector2Array {
godot_pool_vector2_array _godot_array;
public:
PoolVector2Array();
@@ -170,7 +180,7 @@ public:
};
-class PoolVector3Array {
+class GD_CPP_CORE_API PoolVector3Array {
godot_pool_vector3_array _godot_array;
public:
PoolVector3Array();
@@ -201,7 +211,7 @@ public:
};
-class PoolColorArray {
+class GD_CPP_CORE_API PoolColorArray {
godot_pool_color_array _godot_array;
public:
PoolColorArray();
diff --git a/include/godot_cpp/core/Quat.hpp b/include/godot_cpp/core/Quat.hpp
index 927d4a3..03bb015 100644
--- a/include/godot_cpp/core/Quat.hpp
+++ b/include/godot_cpp/core/Quat.hpp
@@ -1,6 +1,16 @@
#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"
@@ -9,7 +19,7 @@
namespace godot {
-class Quat{
+class GD_CPP_CORE_API Quat{
public:
real_t x,y,z,w;
diff --git a/include/godot_cpp/core/RID.hpp b/include/godot_cpp/core/RID.hpp
index 7584581..634b7f0 100644
--- a/include/godot_cpp/core/RID.hpp
+++ b/include/godot_cpp/core/RID.hpp
@@ -1,13 +1,23 @@
#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 RID {
+class GD_CPP_CORE_API RID {
godot_rid _godot_rid;
public:
diff --git a/include/godot_cpp/core/Rect2.cpp b/include/godot_cpp/core/Rect2.cpp
index 2b32506..6d13cff 100644
--- a/include/godot_cpp/core/Rect2.cpp
+++ b/include/godot_cpp/core/Rect2.cpp
@@ -6,7 +6,7 @@
#include <cmath>
-#include "Transform2D.hp"
+#include "Transform2D.hpp"
namespace godot {
diff --git a/include/godot_cpp/core/Rect2.hpp b/include/godot_cpp/core/Rect2.hpp
index 792972d..849fa68 100644
--- a/include/godot_cpp/core/Rect2.hpp
+++ b/include/godot_cpp/core/Rect2.hpp
@@ -1,6 +1,16 @@
#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>
@@ -16,7 +26,7 @@ typedef Vector2 Point2;
class Transform2D;
-struct Rect2 {
+struct GD_CPP_CORE_API Rect2 {
Point2 pos;
Size2 size;
diff --git a/include/godot_cpp/core/Rect3.hpp b/include/godot_cpp/core/Rect3.hpp
index acd674f..b04195c 100644
--- a/include/godot_cpp/core/Rect3.hpp
+++ b/include/godot_cpp/core/Rect3.hpp
@@ -1,6 +1,16 @@
#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"
@@ -9,7 +19,7 @@
namespace godot {
-class Rect3 {
+class GD_CPP_CORE_API Rect3 {
public:
Vector3 pos;
Vector3 size;
diff --git a/include/godot_cpp/core/String.cpp b/include/godot_cpp/core/String.cpp
index 52923ff..c3c78e4 100644
--- a/include/godot_cpp/core/String.cpp
+++ b/include/godot_cpp/core/String.cpp
@@ -120,6 +120,11 @@ const wchar_t *String::c_string() const
}
+String operator +(const char *a, const String& b)
+{
+ return String(a) + b;
+}
+
}
diff --git a/include/godot_cpp/core/String.hpp b/include/godot_cpp/core/String.hpp
index 6de7037..ec14242 100644
--- a/include/godot_cpp/core/String.hpp
+++ b/include/godot_cpp/core/String.hpp
@@ -1,11 +1,21 @@
#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 String
+class GD_CPP_CORE_API String
{
godot_string _godot_string;
public:
diff --git a/include/godot_cpp/core/Transform.hpp b/include/godot_cpp/core/Transform.hpp
index bb47693..74b2ef0 100644
--- a/include/godot_cpp/core/Transform.hpp
+++ b/include/godot_cpp/core/Transform.hpp
@@ -1,6 +1,16 @@
#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"
@@ -8,7 +18,7 @@
namespace godot {
-class Transform {
+class GD_CPP_CORE_API Transform {
public:
Basis basis;
diff --git a/include/godot_cpp/core/Transform2D.cpp b/include/godot_cpp/core/Transform2D.cpp
index 9dfbb22..1f4b5ca 100644
--- a/include/godot_cpp/core/Transform2D.cpp
+++ b/include/godot_cpp/core/Transform2D.cpp
@@ -1,4 +1,4 @@
-#include "Transform2D.hp"
+#include "Transform2D.hpp"
#include "Vector2.hpp"
diff --git a/include/godot_cpp/core/Transform2D.hp b/include/godot_cpp/core/Transform2D.hpp
index f3bc5fb..553c324 100644
--- a/include/godot_cpp/core/Transform2D.hp
+++ b/include/godot_cpp/core/Transform2D.hpp
@@ -1,6 +1,16 @@
#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"
@@ -10,7 +20,7 @@ typedef Vector2 Size2;
class Rect2;
-struct Transform2D {
+struct GD_CPP_CORE_API 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/godot_cpp/core/Variant.hpp b/include/godot_cpp/core/Variant.hpp
index 2fe0fed..68e1210 100644
--- a/include/godot_cpp/core/Variant.hpp
+++ b/include/godot_cpp/core/Variant.hpp
@@ -1,6 +1,16 @@
#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"
@@ -18,7 +28,7 @@
#include "RID.hpp"
#include "String.hpp"
#include "Transform.hpp"
-#include "Transform2D.hp"
+#include "Transform2D.hpp"
#include "Vector2.hpp"
#include "Vector3.hpp"
@@ -30,7 +40,7 @@ class Dictionary;
class Array;
-class Variant {
+class GD_CPP_CORE_API Variant {
godot_variant _godot_variant;
public:
enum Type {
diff --git a/include/godot_cpp/core/Vector2.hpp b/include/godot_cpp/core/Vector2.hpp
index b62ddfd..73dd562 100644
--- a/include/godot_cpp/core/Vector2.hpp
+++ b/include/godot_cpp/core/Vector2.hpp
@@ -2,6 +2,16 @@
#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"
@@ -10,7 +20,7 @@ namespace godot {
class String;
-struct Vector2 {
+struct GD_CPP_CORE_API Vector2 {
union {
real_t x;
diff --git a/include/godot_cpp/core/Vector3.hpp b/include/godot_cpp/core/Vector3.hpp
index d1db4e1..52a5d73 100644
--- a/include/godot_cpp/core/Vector3.hpp
+++ b/include/godot_cpp/core/Vector3.hpp
@@ -1,6 +1,16 @@
#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"
@@ -8,7 +18,7 @@
namespace godot {
-struct Vector3 {
+struct GD_CPP_CORE_API Vector3 {
enum Axis {
AXIS_X,