Skip to content

Commit d346a2b

Browse files
committed
Adapt Godot 3.x defines
1 parent 78d9b66 commit d346a2b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/defs.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,13 @@ Useful for minimizing changes to implementation files between targets e.g. GDExt
4444
#define FLOAT REAL
4545
#define RefCounted Reference
4646
#define PackedByteArray PoolByteArray
47+
#define PackedStringArray PoolStringArray
48+
#define PACKED_STRING_ARRAY POOL_STRING_ARRAY
4749
#define FAIL(message, ret) do { PRINT_ERROR(message); return ret; } while (0)
4850
#define FAIL_IF(cond, message, ret) if (unlikely(cond)) FAIL(message, ret)
4951
#define INSTANTIATE_REF(ref) ref.instance()
5052
#define BYTE_ARRAY_POINTER(array) array.read().ptr()
51-
#define PACKED_ARRAY_HAS(array, value) array.has(value)
53+
#define PACKED_ARRAY_HAS(array, value) array.read().ptr()->find(value) != -1
5254
#define CMDLINE_ARGS PoolStringArray() // User CLI args unsupported in Godot 3
5355
#define TIME_REALTIME OS::get_singleton()->get_system_time_msecs() * 1000000
5456
#define TIME_MONOTONIC OS::get_singleton()->get_ticks_usec() * 1000

0 commit comments

Comments
 (0)