Skip to content

Commit

Permalink
Fix compiling with latest Godot 4.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Zylann committed Feb 26, 2024
1 parent f94e348 commit 2e91857
Show file tree
Hide file tree
Showing 7 changed files with 49 additions and 0 deletions.
7 changes: 7 additions & 0 deletions util/godot/classes/box_mesh.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,14 @@
#define ZN_GODOT_BOX_MESH_H

#if defined(ZN_GODOT)
#include <core/version.h>

#if VERSION_MAJOR == 4 && VERSION_MINOR <= 2
#include <scene/resources/primitive_meshes.h>
#else
#include <scene/resources/3d/primitive_meshes.h>
#endif

#elif defined(ZN_GODOT_EXTENSION)
#include <godot_cpp/classes/box_mesh.hpp>
using namespace godot;
Expand Down
7 changes: 7 additions & 0 deletions util/godot/classes/box_shape_3d.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,14 @@
#define ZN_GODOT_BOX_SHAPE_3D_H

#if defined(ZN_GODOT)
#include <core/version.h>

#if VERSION_MAJOR == 4 && VERSION_MINOR <= 2
#include <scene/resources/box_shape_3d.h>
#else
#include <scene/resources/3d/box_shape_3d.h>
#endif

#elif defined(ZN_GODOT_EXTENSION)
#include <godot_cpp/classes/box_shape3d.h>
using namespace godot;
Expand Down
7 changes: 7 additions & 0 deletions util/godot/classes/concave_polygon_shape_3d.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,14 @@
#include "../../math/vector3f.h"

#if defined(ZN_GODOT)
#include <core/version.h>

#if VERSION_MAJOR == 4 && VERSION_MINOR <= 2
#include <scene/resources/concave_polygon_shape_3d.h>
#else
#include <scene/resources/3d/concave_polygon_shape_3d.h>
#endif

#elif defined(ZN_GODOT_EXTENSION)
#include <godot_cpp/classes/concave_polygon_shape3d.hpp>
using namespace godot;
Expand Down
7 changes: 7 additions & 0 deletions util/godot/classes/convex_polygon_shape_3d.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,14 @@
#define ZN_GODOT_CONVEX_POLYGON_SHAPE_3D_H

#if defined(ZN_GODOT)
#include <core/version.h>

#if VERSION_MAJOR == 4 && VERSION_MINOR <= 2
#include <scene/resources/convex_polygon_shape_3d.h>
#else
#include <scene/resources/3d/convex_polygon_shape_3d.h>
#endif

#elif defined(ZN_GODOT_EXTENSION)
#include <godot_cpp/classes/convex_polygon_shape3d.hpp>
using namespace godot;
Expand Down
7 changes: 7 additions & 0 deletions util/godot/classes/point_mesh.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,14 @@
#define ZN_GODOT_POINT_MESH_H

#if defined(ZN_GODOT)
#include <core/version.h>

#if VERSION_MAJOR == 4 && VERSION_MINOR <= 2
#include <scene/resources/primitive_meshes.h>
#else
#include <scene/resources/3d/primitive_meshes.h>
#endif

#elif defined(ZN_GODOT_EXTENSION)
#include <godot_cpp/classes/point_mesh.hpp>
using namespace godot;
Expand Down
7 changes: 7 additions & 0 deletions util/godot/classes/shape_3d.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,14 @@
#define ZN_GODOT_SHAPE_3D_H

#if defined(ZN_GODOT)
#include <core/version.h>

#if VERSION_MAJOR == 4 && VERSION_MINOR <= 2
#include <scene/resources/shape_3d.h>
#else
#include <scene/resources/3d/shape_3d.h>
#endif

#elif defined(ZN_GODOT_EXTENSION)
#include <godot_cpp/classes/shape3d.hpp>
using namespace godot;
Expand Down
7 changes: 7 additions & 0 deletions util/godot/classes/world_3d.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,14 @@
#define ZN_GODOT_WORLD_3D_H

#if defined(ZN_GODOT)
#include <core/version.h>

#if VERSION_MAJOR == 4 && VERSION_MINOR <= 2
#include <scene/resources/world_3d.h>
#else
#include <scene/resources/3d/world_3d.h>
#endif

#elif defined(ZN_GODOT_EXTENSION)
#include <godot_cpp/classes/world3d.hpp>
using namespace godot;
Expand Down

0 comments on commit 2e91857

Please sign in to comment.