From 73baa5545afefd186c85021de9f7f7fb51b9bb65 Mon Sep 17 00:00:00 2001 From: Relintai Date: Wed, 16 Mar 2022 20:29:43 +0100 Subject: [PATCH] Move lots of includes from the h files to cpp files in files under scene/2d. --- PATCHES.md | 65 +++++++++++++++++++++++++++++ editor/plugins/script_text_editor.h | 2 + scene/2d/animated_sprite.cpp | 1 + scene/2d/animated_sprite.h | 3 +- scene/2d/audio_stream_player_2d.cpp | 2 + scene/2d/audio_stream_player_2d.h | 9 ++-- scene/2d/camera_2d.cpp | 1 + scene/2d/camera_2d.h | 3 +- scene/2d/canvas_item.cpp | 5 +++ scene/2d/canvas_item.h | 8 +--- scene/2d/collision_polygon_2d.cpp | 1 + scene/2d/collision_polygon_2d.h | 1 - scene/2d/collision_shape_2d.cpp | 1 + scene/2d/collision_shape_2d.h | 3 +- scene/2d/cpu_particles_2d.cpp | 2 + scene/2d/cpu_particles_2d.h | 5 ++- scene/2d/line_builder.cpp | 4 ++ scene/2d/line_builder.h | 8 ++-- scene/2d/listener_2d.cpp | 2 + scene/2d/listener_2d.h | 1 - scene/2d/multimesh_instance_2d.cpp | 2 + scene/2d/multimesh_instance_2d.h | 3 +- scene/2d/navigation_2d.cpp | 1 + scene/2d/navigation_2d.h | 1 - scene/2d/navigation_agent_2d.cpp | 1 + scene/2d/navigation_agent_2d.h | 1 - scene/2d/navigation_obstacle_2d.cpp | 1 + scene/2d/navigation_obstacle_2d.h | 2 +- scene/2d/navigation_polygon.cpp | 1 + scene/2d/navigation_polygon.h | 4 +- scene/2d/parallax_background.cpp | 2 + scene/2d/parallax_background.h | 2 - scene/2d/path_2d.cpp | 1 + scene/2d/path_2d.h | 3 +- scene/2d/physics_body_2d.cpp | 2 + scene/2d/physics_body_2d.h | 3 +- scene/2d/sprite.cpp | 1 + scene/2d/sprite.h | 2 +- scene/2d/touch_screen_button.cpp | 3 ++ scene/2d/touch_screen_button.h | 9 ++-- scene/register_scene_types.cpp | 1 + 41 files changed, 140 insertions(+), 33 deletions(-) create mode 100644 PATCHES.md diff --git a/PATCHES.md b/PATCHES.md new file mode 100644 index 000000000..f88cb1606 --- /dev/null +++ b/PATCHES.md @@ -0,0 +1,65 @@ +Applied / backported patches / prs +================================== + +Skeleton Editor +--------------- + +The engine contains TokageItLab's SkeletonEditor prs 3.2 version from the godot engine repository. + +Original pr: https://github.com/godotengine/godot/pull/45699 +3.2 version: https://github.com/TokageItLab/godot/commits/pose-edit-mode + +In order to simplify merging upstream godot commits I decided to port the necessary engine side changes by hand, (hopefully) in a way which minimalizes merge conflicts later. The editor plugins themselves are available via an engine module (modules/skeleton_editor). + +Core Changing Commits: +cb6f4aea984ab782608b91a7c5be215ab262e349 +66a93366886b46e0b7fab4e3b54e0b59737c8d19 + + +Patches that I'm considering +============================ + +- https://github.com/godotengine/godot/pull/52391 - Added Viewport canvas cull mask / CanvasItem rendering layers. +- https://github.com/godotengine/godot/pull/51840 - Add an option to preview the 3D scene as a background to the 2D editor +- https://github.com/godotengine/godot/pull/50718 - Drag multiple resources onto exported array variable at once +- https://github.com/godotengine/godot/pull/48965 - Tell rpc target method/property when node is not found +- https://github.com/godotengine/godot/pull/47170 - print_stray_nodes() also prints node's script +- https://github.com/godotengine/godot/pull/44420 - Added ability to have Tabs in TabContainer at bottom +- https://github.com/godotengine/godot/pull/42681 - (Either) Improve performance when apply bone transform in get_bone_global_pose() +- https://github.com/godotengine/godot/pull/41322 - (Or) PhysicsBone3D and Skeleton Improvements +- https://github.com/godotengine/godot/pull/42642 - Ensure KinematicBodies only interact with other Bodies with layers in their mask +- https://github.com/godotengine/godot/pull/42365 - Increment index when populating PhysicsShapeQueryParameters exclude array. +- https://github.com/godotengine/godot/pull/41699 - Fix Area monitorable in 2D and 3D Godot physics. +- https://github.com/godotengine/godot/pull/40981 - Always disable low-processor usage mode on mobile platforms - (Or fix it) +- https://github.com/godotengine/godot/pull/39362 - Fix PlaneShape in Godot physics +- https://github.com/godotengine/godot/pull/37680 - Editor Debugger: auto scrolling is activated at every log start. + +- https://github.com/godotengine/godot/pull/36776 - [WIP] Editor Android Port +-- 3.x version - https://github.com/thebestnom/godot/commits/android_editor_3.2 + +- The full 4.0 TileMap + TileMap Editor rework. (Like the skeleton editor it would become a module) + +Maybe, Probably later + +- https://github.com/godotengine/godot/pull/37200 - NetworkedController & SceneRewinder + +Not as important, but would be cool + +- https://github.com/godotengine/godot/pull/50622 - Add highlight to the relationship lines of selected Tree items +- https://github.com/godotengine/godot/pull/48395 - Backport nav server to 3.x +- https://github.com/godotengine/godot/pull/50156 - Some fixes to runtime navmesh baking (prev pr might need it) + +Might get merged soon, not sure + +- https://github.com/godotengine/godot/pull/37765 - control node global rect scale fix + +Not sure + +- Backport polygon2D Editor + https://github.com/godotengine/godot/pull/40152 - Enable addition of points directly in Polygon2D UV Editor +- https://github.com/godotengine/godot/pull/44845 - Add optional ANGLE support for Windows desktop. + +These will probably get merged eventually on upstream, it might be worth considering them again later + +- https://github.com/godotengine/godot/pull/52793 - added ninja tool for scons +- https://github.com/godotengine/godot/pull/52912 - added scons ccache tool +- https://github.com/godotengine/godot/pull/52566 - Added support for building shared libraries on linuxbsd diff --git a/editor/plugins/script_text_editor.h b/editor/plugins/script_text_editor.h index 98adb3e33..dd4a83954 100644 --- a/editor/plugins/script_text_editor.h +++ b/editor/plugins/script_text_editor.h @@ -31,6 +31,8 @@ #ifndef SCRIPT_TEXT_EDITOR_H #define SCRIPT_TEXT_EDITOR_H +#include "core/vector.h" +#include "core/reference.h" #include "scene/gui/color_picker.h" #include "scene/gui/dialogs.h" #include "scene/gui/tree.h" diff --git a/scene/2d/animated_sprite.cpp b/scene/2d/animated_sprite.cpp index f18265ba8..67aca1748 100644 --- a/scene/2d/animated_sprite.cpp +++ b/scene/2d/animated_sprite.cpp @@ -32,6 +32,7 @@ #include "core/os/os.h" #include "scene/scene_string_names.h" +#include "scene/resources/texture.h" #define NORMAL_SUFFIX "_normal" diff --git a/scene/2d/animated_sprite.h b/scene/2d/animated_sprite.h index 6b838f311..7e4ab5680 100644 --- a/scene/2d/animated_sprite.h +++ b/scene/2d/animated_sprite.h @@ -32,7 +32,8 @@ #define ANIMATED_SPRITE_H #include "scene/2d/node_2d.h" -#include "scene/resources/texture.h" + +class Texture; class SpriteFrames : public Resource { GDCLASS(SpriteFrames, Resource); diff --git a/scene/2d/audio_stream_player_2d.cpp b/scene/2d/audio_stream_player_2d.cpp index 7377b1428..7c43e5b96 100644 --- a/scene/2d/audio_stream_player_2d.cpp +++ b/scene/2d/audio_stream_player_2d.cpp @@ -34,6 +34,8 @@ #include "scene/2d/area_2d.h" #include "scene/2d/listener_2d.h" #include "scene/main/viewport.h" +#include "servers/audio_server.h" +#include "servers/audio/audio_stream.h" void AudioStreamPlayer2D::_mix_audio() { if (!stream_playback.is_valid() || !active.is_set() || diff --git a/scene/2d/audio_stream_player_2d.h b/scene/2d/audio_stream_player_2d.h index 43ae6588e..6c196d396 100644 --- a/scene/2d/audio_stream_player_2d.h +++ b/scene/2d/audio_stream_player_2d.h @@ -31,10 +31,13 @@ #ifndef AUDIO_STREAM_PLAYER_2D_H #define AUDIO_STREAM_PLAYER_2D_H -#include "core/safe_refcount.h" #include "scene/2d/node_2d.h" -#include "servers/audio/audio_stream.h" -#include "servers/audio_server.h" +#include "core/safe_refcount.h" +#include "core/reference.h" +#include "core/math/audio_frame.h" + +class AudioStreamPlayback; +class AudioStream; class AudioStreamPlayer2D : public Node2D { GDCLASS(AudioStreamPlayer2D, Node2D); diff --git a/scene/2d/camera_2d.cpp b/scene/2d/camera_2d.cpp index cb8577dd2..77c531c1f 100644 --- a/scene/2d/camera_2d.cpp +++ b/scene/2d/camera_2d.cpp @@ -34,6 +34,7 @@ #include "core/math/math_funcs.h" #include "scene/scene_string_names.h" #include "servers/visual_server.h" +#include "scene/main/viewport.h" void Camera2D::_update_scroll() { if (!is_inside_tree()) { diff --git a/scene/2d/camera_2d.h b/scene/2d/camera_2d.h index 80b77d686..616274860 100644 --- a/scene/2d/camera_2d.h +++ b/scene/2d/camera_2d.h @@ -32,7 +32,8 @@ #define CAMERA_2D_H #include "scene/2d/node_2d.h" -#include "scene/main/viewport.h" + +class Viewport; class Camera2D : public Node2D { GDCLASS(Camera2D, Node2D); diff --git a/scene/2d/canvas_item.cpp b/scene/2d/canvas_item.cpp index 936ec558d..e0e8f6f38 100644 --- a/scene/2d/canvas_item.cpp +++ b/scene/2d/canvas_item.cpp @@ -42,6 +42,11 @@ #include "servers/visual/visual_server_raster.h" #include "servers/visual_server.h" +#include "scene/main/scene_tree.h" +#include "scene/resources/multimesh.h" +#include "scene/resources/shader.h" +#include "scene/resources/texture.h" + Mutex CanvasItemMaterial::material_mutex; SelfList::List *CanvasItemMaterial::dirty_materials = nullptr; Map CanvasItemMaterial::shader_map; diff --git a/scene/2d/canvas_item.h b/scene/2d/canvas_item.h index 072b4aed1..83a1d9b20 100644 --- a/scene/2d/canvas_item.h +++ b/scene/2d/canvas_item.h @@ -31,17 +31,13 @@ #ifndef CANVAS_ITEM_H #define CANVAS_ITEM_H -#include "scene/main/node.h" -#include "scene/main/scene_tree.h" #include "scene/resources/material.h" -#include "scene/resources/multimesh.h" -#include "scene/resources/shader.h" -#include "scene/resources/texture.h" +#include "scene/main/node.h" class CanvasLayer; class Viewport; class Font; - +class MultiMesh; class StyleBox; class CanvasItemMaterial : public Material { diff --git a/scene/2d/collision_polygon_2d.cpp b/scene/2d/collision_polygon_2d.cpp index ab1cfedc5..439dbc4c2 100644 --- a/scene/2d/collision_polygon_2d.cpp +++ b/scene/2d/collision_polygon_2d.cpp @@ -34,6 +34,7 @@ #include "core/engine.h" #include "scene/resources/concave_polygon_shape_2d.h" #include "scene/resources/convex_polygon_shape_2d.h" +#include "scene/resources/shape_2d.h" #include "thirdparty/misc/triangulator.h" diff --git a/scene/2d/collision_polygon_2d.h b/scene/2d/collision_polygon_2d.h index 24ade8517..befddd510 100644 --- a/scene/2d/collision_polygon_2d.h +++ b/scene/2d/collision_polygon_2d.h @@ -32,7 +32,6 @@ #define COLLISION_POLYGON_2D_H #include "scene/2d/node_2d.h" -#include "scene/resources/shape_2d.h" class CollisionObject2D; diff --git a/scene/2d/collision_shape_2d.cpp b/scene/2d/collision_shape_2d.cpp index ef867ff9f..5830af648 100644 --- a/scene/2d/collision_shape_2d.cpp +++ b/scene/2d/collision_shape_2d.cpp @@ -39,6 +39,7 @@ #include "scene/resources/line_shape_2d.h" #include "scene/resources/rectangle_shape_2d.h" #include "scene/resources/segment_shape_2d.h" +#include "scene/resources/shape_2d.h" void CollisionShape2D::_shape_changed() { update(); diff --git a/scene/2d/collision_shape_2d.h b/scene/2d/collision_shape_2d.h index 395b6e10a..30d38652b 100644 --- a/scene/2d/collision_shape_2d.h +++ b/scene/2d/collision_shape_2d.h @@ -32,8 +32,9 @@ #define COLLISION_SHAPE_2D_H #include "scene/2d/node_2d.h" -#include "scene/resources/shape_2d.h" +#include "core/reference.h" +class Shape2D; class CollisionObject2D; class CollisionShape2D : public Node2D { diff --git a/scene/2d/cpu_particles_2d.cpp b/scene/2d/cpu_particles_2d.cpp index 88c2e6c61..ec45b29b7 100644 --- a/scene/2d/cpu_particles_2d.cpp +++ b/scene/2d/cpu_particles_2d.cpp @@ -34,6 +34,8 @@ #include "scene/2d/canvas_item.h" #include "scene/resources/particles_material.h" #include "servers/visual_server.h" +#include "core/rid.h" +#include "scene/resources/texture.h" void CPUParticles2D::set_emitting(bool p_emitting) { if (emitting == p_emitting) { diff --git a/scene/2d/cpu_particles_2d.h b/scene/2d/cpu_particles_2d.h index 688293f1b..571a611ec 100644 --- a/scene/2d/cpu_particles_2d.h +++ b/scene/2d/cpu_particles_2d.h @@ -31,9 +31,10 @@ #ifndef CPU_PARTICLES_2D_H #define CPU_PARTICLES_2D_H -#include "core/rid.h" #include "scene/2d/node_2d.h" -#include "scene/resources/texture.h" + +class RID; +class Texture; class CPUParticles2D : public Node2D { private: diff --git a/scene/2d/line_builder.cpp b/scene/2d/line_builder.cpp index addf6c49d..7e2580437 100644 --- a/scene/2d/line_builder.cpp +++ b/scene/2d/line_builder.cpp @@ -30,6 +30,10 @@ #include "line_builder.h" +#include "core/color.h" +#include "core/math/vector2.h" +#include "scene/resources/gradient.h" + //---------------------------------------------------------------------------- // Util //---------------------------------------------------------------------------- diff --git a/scene/2d/line_builder.h b/scene/2d/line_builder.h index c937cfe74..3fa2fc1e5 100644 --- a/scene/2d/line_builder.h +++ b/scene/2d/line_builder.h @@ -31,10 +31,12 @@ #ifndef LINE_BUILDER_H #define LINE_BUILDER_H -#include "core/color.h" -#include "core/math/vector2.h" #include "line_2d.h" -#include "scene/resources/gradient.h" + +struct Vector2; +class Curve; +class Gradient; +struct Color; class LineBuilder { public: diff --git a/scene/2d/listener_2d.cpp b/scene/2d/listener_2d.cpp index 7c5f9c2d4..689e46766 100644 --- a/scene/2d/listener_2d.cpp +++ b/scene/2d/listener_2d.cpp @@ -30,6 +30,8 @@ #include "listener_2d.h" +#include "scene/main/viewport.h" + bool Listener2D::_set(const StringName &p_name, const Variant &p_value) { if (p_name == "current") { if (p_value.operator bool()) { diff --git a/scene/2d/listener_2d.h b/scene/2d/listener_2d.h index 115bbba82..f374a071b 100644 --- a/scene/2d/listener_2d.h +++ b/scene/2d/listener_2d.h @@ -32,7 +32,6 @@ #define LISTENER_2D_H #include "scene/2d/node_2d.h" -#include "scene/main/viewport.h" class Listener2D : public Node2D { GDCLASS(Listener2D, Node2D); diff --git a/scene/2d/multimesh_instance_2d.cpp b/scene/2d/multimesh_instance_2d.cpp index faae3bed6..1c8e00054 100644 --- a/scene/2d/multimesh_instance_2d.cpp +++ b/scene/2d/multimesh_instance_2d.cpp @@ -31,6 +31,8 @@ #include "multimesh_instance_2d.h" #include "core/core_string_names.h" +#include "scene/resources/multimesh.h" + void MultiMeshInstance2D::_notification(int p_what) { if (p_what == NOTIFICATION_DRAW) { if (multimesh.is_valid()) { diff --git a/scene/2d/multimesh_instance_2d.h b/scene/2d/multimesh_instance_2d.h index bcc02cfd8..853a313af 100644 --- a/scene/2d/multimesh_instance_2d.h +++ b/scene/2d/multimesh_instance_2d.h @@ -32,7 +32,8 @@ #define MULTIMESH_INSTANCE_2D_H #include "scene/2d/node_2d.h" -#include "scene/resources/multimesh.h" + +class MultiMesh; class MultiMeshInstance2D : public Node2D { GDCLASS(MultiMeshInstance2D, Node2D); diff --git a/scene/2d/navigation_2d.cpp b/scene/2d/navigation_2d.cpp index 87fe05bce..408b58e5b 100644 --- a/scene/2d/navigation_2d.cpp +++ b/scene/2d/navigation_2d.cpp @@ -30,6 +30,7 @@ #include "navigation_2d.h" +#include "scene/2d/navigation_polygon.h" #include "servers/navigation_2d_server.h" void Navigation2D::_bind_methods() { diff --git a/scene/2d/navigation_2d.h b/scene/2d/navigation_2d.h index f4d916e1d..4da1702ce 100644 --- a/scene/2d/navigation_2d.h +++ b/scene/2d/navigation_2d.h @@ -31,7 +31,6 @@ #ifndef NAVIGATION_2D_H #define NAVIGATION_2D_H -#include "scene/2d/navigation_polygon.h" #include "scene/2d/node_2d.h" class Navigation2D : public Node2D { diff --git a/scene/2d/navigation_agent_2d.cpp b/scene/2d/navigation_agent_2d.cpp index 4d7b5d896..1c7ef0c1a 100644 --- a/scene/2d/navigation_agent_2d.cpp +++ b/scene/2d/navigation_agent_2d.cpp @@ -30,6 +30,7 @@ #include "navigation_agent_2d.h" +#include "core/vector.h" #include "core/engine.h" #include "scene/2d/navigation_2d.h" #include "servers/navigation_2d_server.h" diff --git a/scene/2d/navigation_agent_2d.h b/scene/2d/navigation_agent_2d.h index 232298012..942c23584 100644 --- a/scene/2d/navigation_agent_2d.h +++ b/scene/2d/navigation_agent_2d.h @@ -31,7 +31,6 @@ #ifndef NAVIGATION_AGENT_2D_H #define NAVIGATION_AGENT_2D_H -#include "core/vector.h" #include "scene/main/node.h" class Node2D; diff --git a/scene/2d/navigation_obstacle_2d.cpp b/scene/2d/navigation_obstacle_2d.cpp index e0547d3e9..b0c26713c 100644 --- a/scene/2d/navigation_obstacle_2d.cpp +++ b/scene/2d/navigation_obstacle_2d.cpp @@ -34,6 +34,7 @@ #include "scene/2d/navigation_2d.h" #include "scene/2d/physics_body_2d.h" #include "servers/navigation_2d_server.h" +#include "scene/2d/node_2d.h" void NavigationObstacle2D::_bind_methods() { ClassDB::bind_method(D_METHOD("set_navigation", "navigation"), &NavigationObstacle2D::set_navigation_node); diff --git a/scene/2d/navigation_obstacle_2d.h b/scene/2d/navigation_obstacle_2d.h index af11b0a63..f88750824 100644 --- a/scene/2d/navigation_obstacle_2d.h +++ b/scene/2d/navigation_obstacle_2d.h @@ -31,10 +31,10 @@ #ifndef NAVIGATION_OBSTACLE_2D_H #define NAVIGATION_OBSTACLE_2D_H -#include "scene/2d/node_2d.h" #include "scene/main/node.h" class Navigation2D; +class Node2D; class NavigationObstacle2D : public Node { GDCLASS(NavigationObstacle2D, Node); diff --git a/scene/2d/navigation_polygon.cpp b/scene/2d/navigation_polygon.cpp index 2d45dae19..8e3e6b9c2 100644 --- a/scene/2d/navigation_polygon.cpp +++ b/scene/2d/navigation_polygon.cpp @@ -35,6 +35,7 @@ #include "core/os/mutex.h" #include "navigation_2d.h" #include "servers/navigation_2d_server.h" +#include "scene/resources/navigation_mesh.h" #include "thirdparty/misc/triangulator.h" diff --git a/scene/2d/navigation_polygon.h b/scene/2d/navigation_polygon.h index ed857f990..a4346f418 100644 --- a/scene/2d/navigation_polygon.h +++ b/scene/2d/navigation_polygon.h @@ -31,8 +31,10 @@ #ifndef NAVIGATION_POLYGON_H #define NAVIGATION_POLYGON_H +#include "core/resource.h" #include "scene/2d/node_2d.h" -#include "scene/resources/navigation_mesh.h" + +class NavigationMesh; class NavigationPolygon : public Resource { GDCLASS(NavigationPolygon, Resource); diff --git a/scene/2d/parallax_background.cpp b/scene/2d/parallax_background.cpp index 167ba7716..45125e27d 100644 --- a/scene/2d/parallax_background.cpp +++ b/scene/2d/parallax_background.cpp @@ -30,6 +30,8 @@ #include "parallax_background.h" #include "parallax_layer.h" +#include "scene/2d/camera_2d.h" +#include "scene/2d/node_2d.h" void ParallaxBackground::_notification(int p_what) { switch (p_what) { diff --git a/scene/2d/parallax_background.h b/scene/2d/parallax_background.h index 72845d443..1ff0662ae 100644 --- a/scene/2d/parallax_background.h +++ b/scene/2d/parallax_background.h @@ -31,8 +31,6 @@ #ifndef PARALLAX_BACKGROUND_H #define PARALLAX_BACKGROUND_H -#include "scene/2d/camera_2d.h" -#include "scene/2d/node_2d.h" #include "scene/main/canvas_layer.h" class ParallaxBackground : public CanvasLayer { diff --git a/scene/2d/path_2d.cpp b/scene/2d/path_2d.cpp index 6e86c9ff0..b3bc1816c 100644 --- a/scene/2d/path_2d.cpp +++ b/scene/2d/path_2d.cpp @@ -32,6 +32,7 @@ #include "core/engine.h" #include "scene/scene_string_names.h" +#include "scene/resources/curve.h" #ifdef TOOLS_ENABLED #include "editor/editor_scale.h" diff --git a/scene/2d/path_2d.h b/scene/2d/path_2d.h index b180b3b01..71937529c 100644 --- a/scene/2d/path_2d.h +++ b/scene/2d/path_2d.h @@ -32,7 +32,8 @@ #define PATH_2D_H #include "scene/2d/node_2d.h" -#include "scene/resources/curve.h" + +class Curve2D; class Path2D : public Node2D { GDCLASS(Path2D, Node2D); diff --git a/scene/2d/physics_body_2d.cpp b/scene/2d/physics_body_2d.cpp index 7fff0d37f..df08bb3a7 100644 --- a/scene/2d/physics_body_2d.cpp +++ b/scene/2d/physics_body_2d.cpp @@ -38,6 +38,8 @@ #include "core/object.h" #include "core/rid.h" #include "scene/scene_string_names.h" +#include "scene/resources/physics_material.h" +#include "servers/physics_2d_server.h" void PhysicsBody2D::_notification(int p_what) { } diff --git a/scene/2d/physics_body_2d.h b/scene/2d/physics_body_2d.h index 2b858b8d1..2ca044a78 100644 --- a/scene/2d/physics_body_2d.h +++ b/scene/2d/physics_body_2d.h @@ -33,9 +33,8 @@ #include "core/vset.h" #include "scene/2d/collision_object_2d.h" -#include "scene/resources/physics_material.h" -#include "servers/physics_2d_server.h" +class PhysicsMaterial; class KinematicCollision2D; class PhysicsBody2D : public CollisionObject2D { diff --git a/scene/2d/sprite.cpp b/scene/2d/sprite.cpp index fa4f76cd2..42d33e6f6 100644 --- a/scene/2d/sprite.cpp +++ b/scene/2d/sprite.cpp @@ -33,6 +33,7 @@ #include "core/os/os.h" #include "scene/main/viewport.h" #include "scene/scene_string_names.h" +#include "scene/resources/texture.h" #ifdef TOOLS_ENABLED Dictionary Sprite::_edit_get_state() const { diff --git a/scene/2d/sprite.h b/scene/2d/sprite.h index 1c67892d6..359851018 100644 --- a/scene/2d/sprite.h +++ b/scene/2d/sprite.h @@ -32,7 +32,7 @@ #define SPRITE_H #include "scene/2d/node_2d.h" -#include "scene/resources/texture.h" +#include "core/reference.h" class Sprite : public Node2D { GDCLASS(Sprite, Node2D); diff --git a/scene/2d/touch_screen_button.cpp b/scene/2d/touch_screen_button.cpp index 7243c911f..b1e33fc38 100644 --- a/scene/2d/touch_screen_button.cpp +++ b/scene/2d/touch_screen_button.cpp @@ -30,6 +30,9 @@ #include "touch_screen_button.h" +#include "scene/resources/bit_map.h" +#include "scene/resources/rectangle_shape_2d.h" +#include "scene/resources/texture.h" #include "core/input_map.h" #include "core/os/input.h" #include "core/os/os.h" diff --git a/scene/2d/touch_screen_button.h b/scene/2d/touch_screen_button.h index b8aed8e8f..e27cbb387 100644 --- a/scene/2d/touch_screen_button.h +++ b/scene/2d/touch_screen_button.h @@ -32,9 +32,12 @@ #define TOUCH_SCREEN_BUTTON_H #include "scene/2d/node_2d.h" -#include "scene/resources/bit_map.h" -#include "scene/resources/rectangle_shape_2d.h" -#include "scene/resources/texture.h" +#include "core/reference.h" + +class Texture; +class BitMap; +class Shape2D; +class RectangleShape2D; class TouchScreenButton : public Node2D { GDCLASS(TouchScreenButton, Node2D); diff --git a/scene/register_scene_types.cpp b/scene/register_scene_types.cpp index 732bdc239..6efd7a70e 100644 --- a/scene/register_scene_types.cpp +++ b/scene/register_scene_types.cpp @@ -66,6 +66,7 @@ #include "scene/2d/touch_screen_button.h" #include "scene/2d/visibility_notifier_2d.h" #include "scene/2d/y_sort.h" +#include "scene/2d/navigation_polygon.h" #include "scene/3d/spatial.h" #include "scene/3d/world_environment.h" #include "scene/animation/animation_blend_space_1d.h"