| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
#pragma once |
| 32 |
|
| 33 |
#include "core/math/math_defs.h" |
| 34 |
|
| 35 |
#ifdef __cplusplus |
| 36 |
extern "C" { |
| 37 |
#endif |
| 38 |
|
| 39 |
|
| 40 |
|
| 41 |
#define GODOT_VARIANT_SIZE (sizeof(real_t) * 4 + sizeof(int64_t)) |
| 42 |
|
| 43 |
typedef struct { |
| 44 |
uint8_t _dont_touch_that[GODOT_VARIANT_SIZE]; |
| 45 |
} godot_variant; |
| 46 |
|
| 47 |
#define GODOT_ARRAY_SIZE sizeof(void *) |
| 48 |
|
| 49 |
typedef struct { |
| 50 |
uint8_t _dont_touch_that[GODOT_ARRAY_SIZE]; |
| 51 |
} godot_array; |
| 52 |
|
| 53 |
#define GODOT_DICTIONARY_SIZE sizeof(void *) |
| 54 |
|
| 55 |
typedef struct { |
| 56 |
uint8_t _dont_touch_that[GODOT_DICTIONARY_SIZE]; |
| 57 |
} godot_dictionary; |
| 58 |
|
| 59 |
#define GODOT_STRING_SIZE sizeof(void *) |
| 60 |
|
| 61 |
typedef struct { |
| 62 |
uint8_t _dont_touch_that[GODOT_STRING_SIZE]; |
| 63 |
} godot_string; |
| 64 |
|
| 65 |
#define GODOT_STRING_NAME_SIZE sizeof(void *) |
| 66 |
|
| 67 |
typedef struct { |
| 68 |
uint8_t _dont_touch_that[GODOT_STRING_NAME_SIZE]; |
| 69 |
} godot_string_name; |
| 70 |
|
| 71 |
#define GODOT_PACKED_ARRAY_SIZE (2 * sizeof(void *)) |
| 72 |
|
| 73 |
typedef struct { |
| 74 |
uint8_t _dont_touch_that[GODOT_PACKED_ARRAY_SIZE]; |
| 75 |
} godot_packed_array; |
| 76 |
|
| 77 |
#define GODOT_VECTOR2_SIZE (sizeof(real_t) * 2) |
| 78 |
|
| 79 |
typedef struct { |
| 80 |
uint8_t _dont_touch_that[GODOT_VECTOR2_SIZE]; |
| 81 |
} godot_vector2; |
| 82 |
|
| 83 |
#define GODOT_VECTOR2I_SIZE (sizeof(int32_t) * 2) |
| 84 |
|
| 85 |
typedef struct { |
| 86 |
uint8_t _dont_touch_that[GODOT_VECTOR2I_SIZE]; |
| 87 |
} godot_vector2i; |
| 88 |
|
| 89 |
#define GODOT_RECT2_SIZE (sizeof(real_t) * 4) |
| 90 |
|
| 91 |
typedef struct godot_rect2 { |
| 92 |
uint8_t _dont_touch_that[GODOT_RECT2_SIZE]; |
| 93 |
} godot_rect2; |
| 94 |
|
| 95 |
#define GODOT_RECT2I_SIZE (sizeof(int32_t) * 4) |
| 96 |
|
| 97 |
typedef struct godot_rect2i { |
| 98 |
uint8_t _dont_touch_that[GODOT_RECT2I_SIZE]; |
| 99 |
} godot_rect2i; |
| 100 |
|
| 101 |
#define GODOT_VECTOR3_SIZE (sizeof(real_t) * 3) |
| 102 |
|
| 103 |
typedef struct { |
| 104 |
uint8_t _dont_touch_that[GODOT_VECTOR3_SIZE]; |
| 105 |
} godot_vector3; |
| 106 |
|
| 107 |
#define GODOT_VECTOR3I_SIZE (sizeof(int32_t) * 3) |
| 108 |
|
| 109 |
typedef struct { |
| 110 |
uint8_t _dont_touch_that[GODOT_VECTOR3I_SIZE]; |
| 111 |
} godot_vector3i; |
| 112 |
|
| 113 |
#define GODOT_TRANSFORM2D_SIZE (sizeof(real_t) * 6) |
| 114 |
|
| 115 |
typedef struct { |
| 116 |
uint8_t _dont_touch_that[GODOT_TRANSFORM2D_SIZE]; |
| 117 |
} godot_transform2d; |
| 118 |
|
| 119 |
#define GODOT_VECTOR4_SIZE (sizeof(real_t) * 4) |
| 120 |
|
| 121 |
typedef struct { |
| 122 |
uint8_t _dont_touch_that[GODOT_VECTOR4_SIZE]; |
| 123 |
} godot_vector4; |
| 124 |
|
| 125 |
#define GODOT_VECTOR4I_SIZE (sizeof(int32_t) * 4) |
| 126 |
|
| 127 |
typedef struct { |
| 128 |
uint8_t _dont_touch_that[GODOT_VECTOR4I_SIZE]; |
| 129 |
} godot_vector4i; |
| 130 |
|
| 131 |
#define GODOT_PLANE_SIZE (sizeof(real_t) * 4) |
| 132 |
|
| 133 |
typedef struct { |
| 134 |
uint8_t _dont_touch_that[GODOT_PLANE_SIZE]; |
| 135 |
} godot_plane; |
| 136 |
|
| 137 |
#define GODOT_QUATERNION_SIZE (sizeof(real_t) * 4) |
| 138 |
|
| 139 |
typedef struct { |
| 140 |
uint8_t _dont_touch_that[GODOT_QUATERNION_SIZE]; |
| 141 |
} godot_quaternion; |
| 142 |
|
| 143 |
#define GODOT_AABB_SIZE (sizeof(real_t) * 6) |
| 144 |
|
| 145 |
typedef struct { |
| 146 |
uint8_t _dont_touch_that[GODOT_AABB_SIZE]; |
| 147 |
} godot_aabb; |
| 148 |
|
| 149 |
#define GODOT_BASIS_SIZE (sizeof(real_t) * 9) |
| 150 |
|
| 151 |
typedef struct { |
| 152 |
uint8_t _dont_touch_that[GODOT_BASIS_SIZE]; |
| 153 |
} godot_basis; |
| 154 |
|
| 155 |
#define GODOT_TRANSFORM3D_SIZE (sizeof(real_t) * 12) |
| 156 |
|
| 157 |
typedef struct { |
| 158 |
uint8_t _dont_touch_that[GODOT_TRANSFORM3D_SIZE]; |
| 159 |
} godot_transform3d; |
| 160 |
|
| 161 |
#define GODOT_PROJECTION_SIZE (sizeof(real_t) * 4 * 4) |
| 162 |
|
| 163 |
typedef struct { |
| 164 |
uint8_t _dont_touch_that[GODOT_PROJECTION_SIZE]; |
| 165 |
} godot_projection; |
| 166 |
|
| 167 |
|
| 168 |
#define GODOT_COLOR_SIZE (sizeof(float) * 4) |
| 169 |
|
| 170 |
typedef struct { |
| 171 |
uint8_t _dont_touch_that[GODOT_COLOR_SIZE]; |
| 172 |
} godot_color; |
| 173 |
|
| 174 |
#define GODOT_NODE_PATH_SIZE sizeof(void *) |
| 175 |
|
| 176 |
typedef struct { |
| 177 |
uint8_t _dont_touch_that[GODOT_NODE_PATH_SIZE]; |
| 178 |
} godot_node_path; |
| 179 |
|
| 180 |
#define GODOT_RID_SIZE sizeof(uint64_t) |
| 181 |
|
| 182 |
typedef struct { |
| 183 |
uint8_t _dont_touch_that[GODOT_RID_SIZE]; |
| 184 |
} godot_rid; |
| 185 |
|
| 186 |
|
| 187 |
#define GODOT_CALLABLE_SIZE (16) |
| 188 |
|
| 189 |
typedef struct { |
| 190 |
uint8_t _dont_touch_that[GODOT_CALLABLE_SIZE]; |
| 191 |
} godot_callable; |
| 192 |
|
| 193 |
|
| 194 |
#define GODOT_SIGNAL_SIZE (16) |
| 195 |
|
| 196 |
typedef struct { |
| 197 |
uint8_t _dont_touch_that[GODOT_SIGNAL_SIZE]; |
| 198 |
} godot_signal; |
| 199 |
|
| 200 |
#ifdef __cplusplus |
| 201 |
} |
| 202 |
#endif |