Skip to content

Commit 4bd0aac

Browse files
committed
Support compiling with Godot 4.7-dev
1 parent 410d216 commit 4bd0aac

3 files changed

Lines changed: 17 additions & 0 deletions

File tree

godot_1d_defines.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,16 @@
1414
#define GODOT_VERSION_PATCH VERSION_PATCH
1515
#endif
1616

17+
#if GODOT_VERSION_MAJOR > 4 || (GODOT_VERSION_MAJOR == 4 && GODOT_VERSION_MINOR > 6)
18+
// In Godot 4.7, callable_mp was moved to its own header.
19+
#include "core/object/callable_mp.h"
20+
#endif
21+
22+
#if GODOT_VERSION_MAJOR == 4 && GODOT_VERSION_MINOR < 5
23+
// In Godot 4.5 and later, namespaces were capitalized: core_bind -> CoreBind.
24+
#define CoreBind core_bind
25+
#endif
26+
1727
#if GODOT_VERSION_MAJOR == 4 && GODOT_VERSION_MINOR > 4
1828
// In Godot 4.5 and later, Math_TAU was replaced with Math::TAU, and a few other things also moved to the Math namespace.
1929
#define ABS Math::abs

nodes/audio_player_1d.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
#include "audio_listener_1d.h"
44
#include "camera_1d.h"
55

6+
#include "core/config/engine.h"
67
#include "scene/2d/audio_listener_2d.h"
78
#include "scene/2d/camera_2d.h"
89
#include "scene/main/viewport.h"

nodes/node_1d.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
#include "node_1d.h"
22

3+
#if GODOT_VERSION_MAJOR == 4 && GODOT_VERSION_MINOR < 6
4+
#include "servers/rendering_server.h"
5+
#else
6+
#include "servers/rendering/rendering_server.h"
7+
#endif
8+
39
#ifdef TOOLS_ENABLED
410
Dictionary Node1D::_edit_get_state() const {
511
Dictionary state;

0 commit comments

Comments
 (0)