diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2023-06-13 16:56:21 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2023-06-15 14:35:45 +0200 |
commit | 25b2f1780a9c7d7ae5579cc87c89b0c7e2baa14d (patch) | |
tree | 40d2d50d34c175da3b7c5123e8918cc5816bd32b | |
parent | 773414606079fa745d1c37fce49324ab6a09e972 (diff) | |
download | redot-engine-25b2f1780a9c7d7ae5579cc87c89b0c7e2baa14d.tar.gz |
Style: Harmonize header includes in modules
This applies our existing style guide, and adds a new rule to that style
guide for modular components such as platform ports and modules:
Includes from the platform port or module ("local" includes) should be listed
first in their own block using relative paths, before Godot's "core" includes
which use "absolute" (project folder relative) paths, and finally thirdparty
includes.
Includes in `#ifdef`s come after their relevant section, i.e. the overall
structure is:
- Local includes
* Conditional local includes
- Core includes
* Conditional core includes
- Thirdparty includes
* Conditional thirdparty includes
217 files changed, 562 insertions, 405 deletions
diff --git a/modules/basis_universal/register_types.cpp b/modules/basis_universal/register_types.cpp index f7bdaf389e..3eb0dc9631 100644 --- a/modules/basis_universal/register_types.cpp +++ b/modules/basis_universal/register_types.cpp @@ -33,12 +33,12 @@ #include "core/os/os.h" #include "servers/rendering_server.h" +#include <transcoder/basisu_transcoder.h> + #ifdef TOOLS_ENABLED #include <encoder/basisu_comp.h> #endif -#include <transcoder/basisu_transcoder.h> - enum BasisDecompressFormat { BASIS_DECOMPRESS_RG, BASIS_DECOMPRESS_RGB, diff --git a/modules/camera/camera_macos.mm b/modules/camera/camera_macos.mm index eca8adbfcf..c0d8dc2cef 100644 --- a/modules/camera/camera_macos.mm +++ b/modules/camera/camera_macos.mm @@ -32,6 +32,7 @@ // If you fix something here, make sure you fix it there as well! #include "camera_macos.h" + #include "servers/camera/camera_feed.h" #import <AVFoundation/AVFoundation.h> diff --git a/modules/csg/csg_shape.h b/modules/csg/csg_shape.h index d0e4d0c8cd..6ac71b6946 100644 --- a/modules/csg/csg_shape.h +++ b/modules/csg/csg_shape.h @@ -31,12 +31,12 @@ #ifndef CSG_SHAPE_H #define CSG_SHAPE_H -#define CSGJS_HEADER_ONLY - #include "csg.h" + #include "scene/3d/path_3d.h" #include "scene/3d/visual_instance_3d.h" #include "scene/resources/concave_polygon_shape_3d.h" + #include "thirdparty/misc/mikktspace.h" class CSGShape3D : public GeometryInstance3D { diff --git a/modules/csg/editor/csg_gizmos.h b/modules/csg/editor/csg_gizmos.h index 89a4305683..deac1d428d 100644 --- a/modules/csg/editor/csg_gizmos.h +++ b/modules/csg/editor/csg_gizmos.h @@ -34,6 +34,7 @@ #ifdef TOOLS_ENABLED #include "../csg_shape.h" + #include "editor/editor_plugin.h" #include "editor/plugins/node_3d_editor_gizmos.h" diff --git a/modules/cvtt/register_types.cpp b/modules/cvtt/register_types.cpp index c22aedb0fc..211d419349 100644 --- a/modules/cvtt/register_types.cpp +++ b/modules/cvtt/register_types.cpp @@ -49,4 +49,4 @@ void uninitialize_cvtt_module(ModuleInitializationLevel p_level) { } } -#endif +#endif // TOOLS_ENABLED diff --git a/modules/denoise/denoise_wrapper.cpp b/modules/denoise/denoise_wrapper.cpp index 9effb60202..87f02cb4c6 100644 --- a/modules/denoise/denoise_wrapper.cpp +++ b/modules/denoise/denoise_wrapper.cpp @@ -29,7 +29,9 @@ /**************************************************************************/ #include "denoise_wrapper.h" -#include "thirdparty/oidn/include/OpenImageDenoise/oidn.h" + +#include <OpenImageDenoise/oidn.h> + #include <stdio.h> void *oidn_denoiser_init() { diff --git a/modules/denoise/lightmap_denoiser.cpp b/modules/denoise/lightmap_denoiser.cpp index 8419b7e52a..72764036e1 100644 --- a/modules/denoise/lightmap_denoiser.cpp +++ b/modules/denoise/lightmap_denoiser.cpp @@ -29,6 +29,7 @@ /**************************************************************************/ #include "lightmap_denoiser.h" + #include "denoise_wrapper.h" #include "core/io/image.h" diff --git a/modules/denoise/register_types.cpp b/modules/denoise/register_types.cpp index 9448776529..a4264b07c5 100644 --- a/modules/denoise/register_types.cpp +++ b/modules/denoise/register_types.cpp @@ -29,9 +29,11 @@ /**************************************************************************/ #include "register_types.h" -#include "core/config/engine.h" + #include "lightmap_denoiser.h" +#include "core/config/engine.h" + void initialize_denoise_module(ModuleInitializationLevel p_level) { if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) { return; diff --git a/modules/enet/enet_connection.h b/modules/enet/enet_connection.h index ee0cd831de..616402be20 100644 --- a/modules/enet/enet_connection.h +++ b/modules/enet/enet_connection.h @@ -31,10 +31,10 @@ #ifndef ENET_CONNECTION_H #define ENET_CONNECTION_H -#include "core/object/ref_counted.h" +#include "enet_packet_peer.h" #include "core/crypto/crypto.h" -#include "enet_packet_peer.h" +#include "core/object/ref_counted.h" #include <enet/enet.h> diff --git a/modules/enet/enet_multiplayer_peer.cpp b/modules/enet/enet_multiplayer_peer.cpp index 93a20ab1f8..af5bd2929c 100644 --- a/modules/enet/enet_multiplayer_peer.cpp +++ b/modules/enet/enet_multiplayer_peer.cpp @@ -29,6 +29,7 @@ /**************************************************************************/ #include "enet_multiplayer_peer.h" + #include "core/io/ip.h" #include "core/io/marshalls.h" #include "core/os/os.h" diff --git a/modules/enet/enet_multiplayer_peer.h b/modules/enet/enet_multiplayer_peer.h index f0d157cbf8..930af2d8cb 100644 --- a/modules/enet/enet_multiplayer_peer.h +++ b/modules/enet/enet_multiplayer_peer.h @@ -31,10 +31,11 @@ #ifndef ENET_MULTIPLAYER_PEER_H #define ENET_MULTIPLAYER_PEER_H +#include "enet_connection.h" + #include "core/crypto/crypto.h" #include "scene/main/multiplayer_peer.h" -#include "enet_connection.h" #include <enet/enet.h> class ENetMultiplayerPeer : public MultiplayerPeer { diff --git a/modules/enet/register_types.cpp b/modules/enet/register_types.cpp index 9c287a4f40..5787f9c2da 100644 --- a/modules/enet/register_types.cpp +++ b/modules/enet/register_types.cpp @@ -29,11 +29,13 @@ /**************************************************************************/ #include "register_types.h" -#include "core/error/error_macros.h" + #include "enet_connection.h" #include "enet_multiplayer_peer.h" #include "enet_packet_peer.h" +#include "core/error/error_macros.h" + static bool enet_ok = false; void initialize_enet_module(ModuleInitializationLevel p_level) { diff --git a/modules/etcpak/register_types.h b/modules/etcpak/register_types.h index 2580ae2f97..4967f3c3f5 100644 --- a/modules/etcpak/register_types.h +++ b/modules/etcpak/register_types.h @@ -33,8 +33,6 @@ #include "modules/register_module_types.h" -#include "modules/register_module_types.h" - void initialize_etcpak_module(ModuleInitializationLevel p_level); void uninitialize_etcpak_module(ModuleInitializationLevel p_level); diff --git a/modules/gdscript/editor/gdscript_docgen.cpp b/modules/gdscript/editor/gdscript_docgen.cpp index ce64d79747..df17581ad1 100644 --- a/modules/gdscript/editor/gdscript_docgen.cpp +++ b/modules/gdscript/editor/gdscript_docgen.cpp @@ -29,6 +29,7 @@ /**************************************************************************/ #include "gdscript_docgen.h" + #include "../gdscript.h" using GDP = GDScriptParser; diff --git a/modules/gdscript/editor/gdscript_docgen.h b/modules/gdscript/editor/gdscript_docgen.h index bb3647196a..3357fb680c 100644 --- a/modules/gdscript/editor/gdscript_docgen.h +++ b/modules/gdscript/editor/gdscript_docgen.h @@ -32,6 +32,7 @@ #define GDSCRIPT_DOCGEN_H #include "../gdscript_parser.h" + #include "core/doc_data.h" class GDScriptDocGen { diff --git a/modules/gdscript/editor/gdscript_highlighter.cpp b/modules/gdscript/editor/gdscript_highlighter.cpp index bba11363d5..b54dc502ae 100644 --- a/modules/gdscript/editor/gdscript_highlighter.cpp +++ b/modules/gdscript/editor/gdscript_highlighter.cpp @@ -29,8 +29,10 @@ /**************************************************************************/ #include "gdscript_highlighter.h" + #include "../gdscript.h" #include "../gdscript_tokenizer.h" + #include "core/config/project_settings.h" #include "editor/editor_settings.h" diff --git a/modules/gdscript/editor/gdscript_translation_parser_plugin.cpp b/modules/gdscript/editor/gdscript_translation_parser_plugin.cpp index 3458eb43b5..e17e748d7b 100644 --- a/modules/gdscript/editor/gdscript_translation_parser_plugin.cpp +++ b/modules/gdscript/editor/gdscript_translation_parser_plugin.cpp @@ -30,8 +30,9 @@ #include "gdscript_translation_parser_plugin.h" +#include "../gdscript.h" + #include "core/io/resource_loader.h" -#include "modules/gdscript/gdscript.h" void GDScriptEditorTranslationParserPlugin::get_recognized_extensions(List<String> *r_extensions) const { GDScriptLanguage::get_singleton()->get_recognized_extensions(r_extensions); diff --git a/modules/gdscript/editor/gdscript_translation_parser_plugin.h b/modules/gdscript/editor/gdscript_translation_parser_plugin.h index 7e6e381e3f..421030e49a 100644 --- a/modules/gdscript/editor/gdscript_translation_parser_plugin.h +++ b/modules/gdscript/editor/gdscript_translation_parser_plugin.h @@ -31,9 +31,10 @@ #ifndef GDSCRIPT_TRANSLATION_PARSER_PLUGIN_H #define GDSCRIPT_TRANSLATION_PARSER_PLUGIN_H +#include "../gdscript_parser.h" + #include "core/templates/hash_set.h" #include "editor/editor_translation_parser.h" -#include "modules/gdscript/gdscript_parser.h" class GDScriptEditorTranslationParserPlugin : public EditorTranslationParserPlugin { GDCLASS(GDScriptEditorTranslationParserPlugin, EditorTranslationParserPlugin); diff --git a/modules/gdscript/gdscript.cpp b/modules/gdscript/gdscript.cpp index 945dfc9862..c3547e3db7 100644 --- a/modules/gdscript/gdscript.cpp +++ b/modules/gdscript/gdscript.cpp @@ -30,15 +30,6 @@ #include "gdscript.h" -#include <stdint.h> - -#include "core/config/engine.h" -#include "core/config/project_settings.h" -#include "core/core_constants.h" -#include "core/core_string_names.h" -#include "core/io/file_access.h" -#include "core/io/file_access_encrypted.h" -#include "core/os/os.h" #include "gdscript_analyzer.h" #include "gdscript_cache.h" #include "gdscript_compiler.h" @@ -46,15 +37,28 @@ #include "gdscript_rpc_callable.h" #include "gdscript_warning.h" +#ifdef TOOLS_ENABLED +#include "editor/gdscript_docgen.h" +#endif + #ifdef TESTS_ENABLED #include "tests/gdscript_test_runner.h" #endif +#include "core/config/engine.h" +#include "core/config/project_settings.h" +#include "core/core_constants.h" +#include "core/core_string_names.h" +#include "core/io/file_access.h" +#include "core/io/file_access_encrypted.h" +#include "core/os/os.h" + #ifdef TOOLS_ENABLED #include "editor/editor_paths.h" -#include "editor/gdscript_docgen.h" #endif +#include <stdint.h> + /////////////////////////// GDScriptNativeClass::GDScriptNativeClass(const StringName &p_name) { diff --git a/modules/gdscript/gdscript.h b/modules/gdscript/gdscript.h index 60bd9eef53..1d6ff6406a 100644 --- a/modules/gdscript/gdscript.h +++ b/modules/gdscript/gdscript.h @@ -31,6 +31,8 @@ #ifndef GDSCRIPT_H #define GDSCRIPT_H +#include "gdscript_function.h" + #include "core/debugger/engine_debugger.h" #include "core/debugger/script_debugger.h" #include "core/doc_data.h" @@ -38,7 +40,6 @@ #include "core/io/resource_saver.h" #include "core/object/script_language.h" #include "core/templates/rb_set.h" -#include "gdscript_function.h" class GDScriptNativeClass : public RefCounted { GDCLASS(GDScriptNativeClass, RefCounted); diff --git a/modules/gdscript/gdscript_analyzer.cpp b/modules/gdscript/gdscript_analyzer.cpp index 8251de2956..2c96aac99d 100644 --- a/modules/gdscript/gdscript_analyzer.cpp +++ b/modules/gdscript/gdscript_analyzer.cpp @@ -30,6 +30,9 @@ #include "gdscript_analyzer.h" +#include "gdscript.h" +#include "gdscript_utility_functions.h" + #include "core/config/engine.h" #include "core/config/project_settings.h" #include "core/core_constants.h" @@ -39,8 +42,6 @@ #include "core/object/class_db.h" #include "core/object/script_language.h" #include "core/templates/hash_map.h" -#include "gdscript.h" -#include "gdscript_utility_functions.h" #include "scene/resources/packed_scene.h" #if defined(TOOLS_ENABLED) && !defined(DISABLE_DEPRECATED) diff --git a/modules/gdscript/gdscript_analyzer.h b/modules/gdscript/gdscript_analyzer.h index 0c7bf4125b..6a80fc272d 100644 --- a/modules/gdscript/gdscript_analyzer.h +++ b/modules/gdscript/gdscript_analyzer.h @@ -31,11 +31,12 @@ #ifndef GDSCRIPT_ANALYZER_H #define GDSCRIPT_ANALYZER_H +#include "gdscript_cache.h" +#include "gdscript_parser.h" + #include "core/object/object.h" #include "core/object/ref_counted.h" #include "core/templates/hash_set.h" -#include "gdscript_cache.h" -#include "gdscript_parser.h" class GDScriptAnalyzer { GDScriptParser *parser = nullptr; diff --git a/modules/gdscript/gdscript_byte_codegen.cpp b/modules/gdscript/gdscript_byte_codegen.cpp index 1414075ba8..3239f64cb2 100644 --- a/modules/gdscript/gdscript_byte_codegen.cpp +++ b/modules/gdscript/gdscript_byte_codegen.cpp @@ -30,9 +30,10 @@ #include "gdscript_byte_codegen.h" -#include "core/debugger/engine_debugger.h" #include "gdscript.h" +#include "core/debugger/engine_debugger.h" + uint32_t GDScriptByteCodeGenerator::add_parameter(const StringName &p_name, bool p_is_optional, const GDScriptDataType &p_type) { #ifdef TOOLS_ENABLED function->arg_names.push_back(p_name); diff --git a/modules/gdscript/gdscript_byte_codegen.h b/modules/gdscript/gdscript_byte_codegen.h index fc684e4d8f..bed5cc2405 100644 --- a/modules/gdscript/gdscript_byte_codegen.h +++ b/modules/gdscript/gdscript_byte_codegen.h @@ -32,7 +32,6 @@ #define GDSCRIPT_BYTE_CODEGEN_H #include "gdscript_codegen.h" - #include "gdscript_function.h" #include "gdscript_utility_functions.h" diff --git a/modules/gdscript/gdscript_cache.cpp b/modules/gdscript/gdscript_cache.cpp index 126fccbbf0..79f26e529c 100644 --- a/modules/gdscript/gdscript_cache.cpp +++ b/modules/gdscript/gdscript_cache.cpp @@ -30,12 +30,13 @@ #include "gdscript_cache.h" -#include "core/io/file_access.h" -#include "core/templates/vector.h" #include "gdscript.h" #include "gdscript_analyzer.h" #include "gdscript_compiler.h" #include "gdscript_parser.h" + +#include "core/io/file_access.h" +#include "core/templates/vector.h" #include "scene/resources/packed_scene.h" bool GDScriptParserRef::is_valid() const { diff --git a/modules/gdscript/gdscript_cache.h b/modules/gdscript/gdscript_cache.h index 28266a1c0b..0a0f403e44 100644 --- a/modules/gdscript/gdscript_cache.h +++ b/modules/gdscript/gdscript_cache.h @@ -31,11 +31,12 @@ #ifndef GDSCRIPT_CACHE_H #define GDSCRIPT_CACHE_H +#include "gdscript.h" + #include "core/object/ref_counted.h" #include "core/os/mutex.h" #include "core/templates/hash_map.h" #include "core/templates/hash_set.h" -#include "gdscript.h" #include "scene/resources/packed_scene.h" class GDScriptAnalyzer; diff --git a/modules/gdscript/gdscript_codegen.h b/modules/gdscript/gdscript_codegen.h index dbc2466393..fa1732d58f 100644 --- a/modules/gdscript/gdscript_codegen.h +++ b/modules/gdscript/gdscript_codegen.h @@ -31,11 +31,12 @@ #ifndef GDSCRIPT_CODEGEN_H #define GDSCRIPT_CODEGEN_H -#include "core/string/string_name.h" -#include "core/variant/variant.h" #include "gdscript_function.h" #include "gdscript_utility_functions.h" +#include "core/string/string_name.h" +#include "core/variant/variant.h" + class GDScriptCodeGenerator { public: struct Address { diff --git a/modules/gdscript/gdscript_compiler.h b/modules/gdscript/gdscript_compiler.h index 2d15d461fb..494eef41d9 100644 --- a/modules/gdscript/gdscript_compiler.h +++ b/modules/gdscript/gdscript_compiler.h @@ -31,12 +31,13 @@ #ifndef GDSCRIPT_COMPILER_H #define GDSCRIPT_COMPILER_H -#include "core/templates/hash_set.h" #include "gdscript.h" #include "gdscript_codegen.h" #include "gdscript_function.h" #include "gdscript_parser.h" +#include "core/templates/hash_set.h" + class GDScriptCompiler { const GDScriptParser *parser = nullptr; HashSet<GDScript *> parsed_classes; diff --git a/modules/gdscript/gdscript_disassembler.cpp b/modules/gdscript/gdscript_disassembler.cpp index 45ad8792d9..cf33f12e3a 100644 --- a/modules/gdscript/gdscript_disassembler.cpp +++ b/modules/gdscript/gdscript_disassembler.cpp @@ -30,10 +30,10 @@ #ifdef DEBUG_ENABLED +#include "gdscript.h" #include "gdscript_function.h" #include "core/string/string_builder.h" -#include "gdscript.h" static String _get_variant_string(const Variant &p_variant) { String txt; @@ -1130,4 +1130,4 @@ void GDScriptFunction::disassemble(const Vector<String> &p_code_lines) const { } } -#endif +#endif // DEBUG_ENABLED diff --git a/modules/gdscript/gdscript_editor.cpp b/modules/gdscript/gdscript_editor.cpp index 09af51656c..07122ed594 100644 --- a/modules/gdscript/gdscript_editor.cpp +++ b/modules/gdscript/gdscript_editor.cpp @@ -30,9 +30,6 @@ #include "gdscript.h" -#include "core/config/engine.h" -#include "core/core_constants.h" -#include "core/io/file_access.h" #include "gdscript_analyzer.h" #include "gdscript_compiler.h" #include "gdscript_parser.h" @@ -40,10 +37,17 @@ #include "gdscript_utility_functions.h" #ifdef TOOLS_ENABLED +#include "editor/script_templates/templates.gen.h" +#endif + +#include "core/config/engine.h" +#include "core/core_constants.h" +#include "core/io/file_access.h" + +#ifdef TOOLS_ENABLED #include "core/config/project_settings.h" #include "editor/editor_file_system.h" #include "editor/editor_settings.h" -#include "editor/script_templates/templates.gen.h" #endif void GDScriptLanguage::get_comment_delimiters(List<String> *p_delimiters) const { diff --git a/modules/gdscript/gdscript_function.h b/modules/gdscript/gdscript_function.h index 390e562e6f..b6f3e7cc87 100644 --- a/modules/gdscript/gdscript_function.h +++ b/modules/gdscript/gdscript_function.h @@ -31,6 +31,8 @@ #ifndef GDSCRIPT_FUNCTION_H #define GDSCRIPT_FUNCTION_H +#include "gdscript_utility_functions.h" + #include "core/object/ref_counted.h" #include "core/object/script_language.h" #include "core/os/thread.h" @@ -38,7 +40,6 @@ #include "core/templates/pair.h" #include "core/templates/self_list.h" #include "core/variant/variant.h" -#include "gdscript_utility_functions.h" class GDScriptInstance; class GDScript; diff --git a/modules/gdscript/gdscript_lambda_callable.cpp b/modules/gdscript/gdscript_lambda_callable.cpp index e9fe17bb17..9e14e43a58 100644 --- a/modules/gdscript/gdscript_lambda_callable.cpp +++ b/modules/gdscript/gdscript_lambda_callable.cpp @@ -30,9 +30,10 @@ #include "gdscript_lambda_callable.h" -#include "core/templates/hashfuncs.h" #include "gdscript.h" +#include "core/templates/hashfuncs.h" + bool GDScriptLambdaCallable::compare_equal(const CallableCustom *p_a, const CallableCustom *p_b) { // Lambda callables are only compared by reference. return p_a == p_b; diff --git a/modules/gdscript/gdscript_parser.cpp b/modules/gdscript/gdscript_parser.cpp index d90503c658..de8a5c66f4 100644 --- a/modules/gdscript/gdscript_parser.cpp +++ b/modules/gdscript/gdscript_parser.cpp @@ -30,23 +30,27 @@ #include "gdscript_parser.h" +#include "gdscript.h" + +#ifdef DEBUG_ENABLED +#include "gdscript_warning.h" +#endif + #include "core/config/project_settings.h" #include "core/io/file_access.h" #include "core/io/resource_loader.h" #include "core/math/math_defs.h" -#include "gdscript.h" #include "scene/main/multiplayer_api.h" #ifdef DEBUG_ENABLED #include "core/os/os.h" #include "core/string/string_builder.h" -#include "gdscript_warning.h" #include "servers/text_server.h" -#endif // DEBUG_ENABLED +#endif #ifdef TOOLS_ENABLED #include "editor/editor_settings.h" -#endif // TOOLS_ENABLED +#endif static HashMap<StringName, Variant::Type> builtin_types; Variant::Type GDScriptParser::get_builtin_type(const StringName &p_type) { diff --git a/modules/gdscript/gdscript_parser.h b/modules/gdscript/gdscript_parser.h index 8f0265510f..ad08c3bfd6 100644 --- a/modules/gdscript/gdscript_parser.h +++ b/modules/gdscript/gdscript_parser.h @@ -31,6 +31,13 @@ #ifndef GDSCRIPT_PARSER_H #define GDSCRIPT_PARSER_H +#include "gdscript_cache.h" +#include "gdscript_tokenizer.h" + +#ifdef DEBUG_ENABLED +#include "gdscript_warning.h" +#endif + #include "core/io/resource.h" #include "core/object/ref_counted.h" #include "core/object/script_language.h" @@ -41,13 +48,10 @@ #include "core/templates/rb_map.h" #include "core/templates/vector.h" #include "core/variant/variant.h" -#include "gdscript_cache.h" -#include "gdscript_tokenizer.h" #ifdef DEBUG_ENABLED #include "core/string/string_builder.h" -#include "gdscript_warning.h" -#endif // DEBUG_ENABLED +#endif class GDScriptParser { struct AnnotationInfo; diff --git a/modules/gdscript/gdscript_tokenizer.cpp b/modules/gdscript/gdscript_tokenizer.cpp index a45a73a8d5..c77783e5a3 100644 --- a/modules/gdscript/gdscript_tokenizer.cpp +++ b/modules/gdscript/gdscript_tokenizer.cpp @@ -33,13 +33,14 @@ #include "core/error/error_macros.h" #include "core/string/char_utils.h" -#ifdef TOOLS_ENABLED -#include "editor/editor_settings.h" -#endif #ifdef DEBUG_ENABLED #include "servers/text_server.h" #endif +#ifdef TOOLS_ENABLED +#include "editor/editor_settings.h" +#endif + static const char *token_names[] = { "Empty", // EMPTY, // Basic diff --git a/modules/gdscript/gdscript_utility_functions.cpp b/modules/gdscript/gdscript_utility_functions.cpp index 8862450121..030950267d 100644 --- a/modules/gdscript/gdscript_utility_functions.cpp +++ b/modules/gdscript/gdscript_utility_functions.cpp @@ -30,6 +30,8 @@ #include "gdscript_utility_functions.h" +#include "gdscript.h" + #include "core/io/resource_loader.h" #include "core/object/class_db.h" #include "core/object/method_bind.h" @@ -37,7 +39,6 @@ #include "core/templates/oa_hash_map.h" #include "core/templates/vector.h" #include "core/variant/typed_array.h" -#include "gdscript.h" #ifdef DEBUG_ENABLED diff --git a/modules/gdscript/gdscript_vm.cpp b/modules/gdscript/gdscript_vm.cpp index bebf34cbb3..0ffc025c24 100644 --- a/modules/gdscript/gdscript_vm.cpp +++ b/modules/gdscript/gdscript_vm.cpp @@ -28,12 +28,12 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ +#include "gdscript.h" #include "gdscript_function.h" +#include "gdscript_lambda_callable.h" #include "core/core_string_names.h" #include "core/os/os.h" -#include "gdscript.h" -#include "gdscript_lambda_callable.h" #ifdef DEBUG_ENABLED static String _get_script_name(const Ref<Script> p_script) { diff --git a/modules/gdscript/language_server/gdscript_extend_parser.h b/modules/gdscript/language_server/gdscript_extend_parser.h index 4500cb01f3..4fd27de081 100644 --- a/modules/gdscript/language_server/gdscript_extend_parser.h +++ b/modules/gdscript/language_server/gdscript_extend_parser.h @@ -32,9 +32,10 @@ #define GDSCRIPT_EXTEND_PARSER_H #include "../gdscript_parser.h" -#include "core/variant/variant.h" #include "godot_lsp.h" +#include "core/variant/variant.h" + #ifndef LINE_NUMBER_TO_INDEX #define LINE_NUMBER_TO_INDEX(p_line) ((p_line)-1) #endif diff --git a/modules/gdscript/language_server/gdscript_language_protocol.h b/modules/gdscript/language_server/gdscript_language_protocol.h index d25814f8aa..a4d9dc6b1d 100644 --- a/modules/gdscript/language_server/gdscript_language_protocol.h +++ b/modules/gdscript/language_server/gdscript_language_protocol.h @@ -31,13 +31,14 @@ #ifndef GDSCRIPT_LANGUAGE_PROTOCOL_H #define GDSCRIPT_LANGUAGE_PROTOCOL_H -#include "core/io/stream_peer.h" -#include "core/io/stream_peer_tcp.h" -#include "core/io/tcp_server.h" #include "gdscript_text_document.h" #include "gdscript_workspace.h" #include "godot_lsp.h" +#include "core/io/stream_peer.h" +#include "core/io/stream_peer_tcp.h" +#include "core/io/tcp_server.h" + #include "modules/modules_enabled.gen.h" // For jsonrpc. #ifdef MODULE_JSONRPC_ENABLED #include "modules/jsonrpc/jsonrpc.h" diff --git a/modules/gdscript/language_server/gdscript_language_server.h b/modules/gdscript/language_server/gdscript_language_server.h index a130dc3ac8..75f9403a74 100644 --- a/modules/gdscript/language_server/gdscript_language_server.h +++ b/modules/gdscript/language_server/gdscript_language_server.h @@ -32,9 +32,10 @@ #define GDSCRIPT_LANGUAGE_SERVER_H #include "../gdscript_parser.h" -#include "editor/editor_plugin.h" #include "gdscript_language_protocol.h" +#include "editor/editor_plugin.h" + class GDScriptLanguageServer : public EditorPlugin { GDCLASS(GDScriptLanguageServer, EditorPlugin); diff --git a/modules/gdscript/language_server/gdscript_text_document.cpp b/modules/gdscript/language_server/gdscript_text_document.cpp index 35fbdca949..92a5f55978 100644 --- a/modules/gdscript/language_server/gdscript_text_document.cpp +++ b/modules/gdscript/language_server/gdscript_text_document.cpp @@ -31,11 +31,12 @@ #include "gdscript_text_document.h" #include "../gdscript.h" +#include "gdscript_extend_parser.h" +#include "gdscript_language_protocol.h" + #include "core/os/os.h" #include "editor/editor_settings.h" #include "editor/plugins/script_text_editor.h" -#include "gdscript_extend_parser.h" -#include "gdscript_language_protocol.h" #include "servers/display_server.h" void GDScriptTextDocument::_bind_methods() { diff --git a/modules/gdscript/language_server/gdscript_text_document.h b/modules/gdscript/language_server/gdscript_text_document.h index aeda10de89..0121101db2 100644 --- a/modules/gdscript/language_server/gdscript_text_document.h +++ b/modules/gdscript/language_server/gdscript_text_document.h @@ -31,9 +31,10 @@ #ifndef GDSCRIPT_TEXT_DOCUMENT_H #define GDSCRIPT_TEXT_DOCUMENT_H +#include "godot_lsp.h" + #include "core/io/file_access.h" #include "core/object/ref_counted.h" -#include "godot_lsp.h" class GDScriptTextDocument : public RefCounted { GDCLASS(GDScriptTextDocument, RefCounted) diff --git a/modules/gdscript/language_server/gdscript_workspace.cpp b/modules/gdscript/language_server/gdscript_workspace.cpp index 7fc2962341..9f848b02f5 100644 --- a/modules/gdscript/language_server/gdscript_workspace.cpp +++ b/modules/gdscript/language_server/gdscript_workspace.cpp @@ -32,6 +32,8 @@ #include "../gdscript.h" #include "../gdscript_parser.h" +#include "gdscript_language_protocol.h" + #include "core/config/project_settings.h" #include "core/object/script_language.h" #include "editor/doc_tools.h" @@ -39,7 +41,6 @@ #include "editor/editor_help.h" #include "editor/editor_node.h" #include "editor/editor_settings.h" -#include "gdscript_language_protocol.h" #include "scene/resources/packed_scene.h" void GDScriptWorkspace::_bind_methods() { diff --git a/modules/gdscript/language_server/gdscript_workspace.h b/modules/gdscript/language_server/gdscript_workspace.h index a849ef8a8d..80653778fb 100644 --- a/modules/gdscript/language_server/gdscript_workspace.h +++ b/modules/gdscript/language_server/gdscript_workspace.h @@ -32,11 +32,12 @@ #define GDSCRIPT_WORKSPACE_H #include "../gdscript_parser.h" -#include "core/variant/variant.h" -#include "editor/editor_file_system.h" #include "gdscript_extend_parser.h" #include "godot_lsp.h" +#include "core/variant/variant.h" +#include "editor/editor_file_system.h" + class GDScriptWorkspace : public RefCounted { GDCLASS(GDScriptWorkspace, RefCounted); diff --git a/modules/gdscript/register_types.cpp b/modules/gdscript/register_types.cpp index b6feaadccf..e23bd50b8b 100644 --- a/modules/gdscript/register_types.cpp +++ b/modules/gdscript/register_types.cpp @@ -30,39 +30,51 @@ #include "register_types.h" -#include "core/io/dir_access.h" -#include "core/io/file_access.h" -#include "core/io/file_access_encrypted.h" -#include "core/io/resource_loader.h" #include "gdscript.h" #include "gdscript_analyzer.h" #include "gdscript_cache.h" #include "gdscript_tokenizer.h" #include "gdscript_utility_functions.h" +#ifdef TOOLS_ENABLED +#include "editor/gdscript_highlighter.h" +#include "editor/gdscript_translation_parser_plugin.h" + +#ifndef GDSCRIPT_NO_LSP +#include "language_server/gdscript_language_server.h" +#endif +#endif // TOOLS_ENABLED + #ifdef TESTS_ENABLED #include "tests/test_gdscript.h" -#include "tests/test_macros.h" #endif -GDScriptLanguage *script_language_gd = nullptr; -Ref<ResourceFormatLoaderGDScript> resource_loader_gd; -Ref<ResourceFormatSaverGDScript> resource_saver_gd; -GDScriptCache *gdscript_cache = nullptr; +#include "core/io/dir_access.h" +#include "core/io/file_access.h" +#include "core/io/file_access_encrypted.h" +#include "core/io/resource_loader.h" #ifdef TOOLS_ENABLED - #include "editor/editor_node.h" #include "editor/editor_settings.h" #include "editor/editor_translation_parser.h" #include "editor/export/editor_export.h" -#include "editor/gdscript_highlighter.h" -#include "editor/gdscript_translation_parser_plugin.h" #ifndef GDSCRIPT_NO_LSP #include "core/config/engine.h" -#include "language_server/gdscript_language_server.h" -#endif // !GDSCRIPT_NO_LSP +#endif +#endif // TOOLS_ENABLED + +#ifdef TESTS_ENABLED +#include "tests/test_macros.h" +#endif + +GDScriptLanguage *script_language_gd = nullptr; +Ref<ResourceFormatLoaderGDScript> resource_loader_gd; +Ref<ResourceFormatSaverGDScript> resource_saver_gd; +GDScriptCache *gdscript_cache = nullptr; + +#ifdef TOOLS_ENABLED Ref<GDScriptEditorTranslationParserPlugin> gdscript_translation_parser_plugin; diff --git a/modules/gdscript/tests/gdscript_test_runner.h b/modules/gdscript/tests/gdscript_test_runner.h index 60b48c6a57..b1190604ad 100644 --- a/modules/gdscript/tests/gdscript_test_runner.h +++ b/modules/gdscript/tests/gdscript_test_runner.h @@ -32,6 +32,7 @@ #define GDSCRIPT_TEST_RUNNER_H #include "../gdscript.h" + #include "core/error/error_macros.h" #include "core/string/print_string.h" #include "core/string/ustring.h" diff --git a/modules/gdscript/tests/gdscript_test_runner_suite.h b/modules/gdscript/tests/gdscript_test_runner_suite.h index e27b6218f1..5fd7d942d2 100644 --- a/modules/gdscript/tests/gdscript_test_runner_suite.h +++ b/modules/gdscript/tests/gdscript_test_runner_suite.h @@ -32,6 +32,7 @@ #define GDSCRIPT_TEST_RUNNER_SUITE_H #include "gdscript_test_runner.h" + #include "tests/test_macros.h" namespace GDScriptTests { diff --git a/modules/gdscript/tests/test_gdscript.cpp b/modules/gdscript/tests/test_gdscript.cpp index ad38312abe..0446a7aad6 100644 --- a/modules/gdscript/tests/test_gdscript.cpp +++ b/modules/gdscript/tests/test_gdscript.cpp @@ -30,6 +30,11 @@ #include "test_gdscript.h" +#include "../gdscript_analyzer.h" +#include "../gdscript_compiler.h" +#include "../gdscript_parser.h" +#include "../gdscript_tokenizer.h" + #include "core/config/project_settings.h" #include "core/io/file_access.h" #include "core/io/file_access_pack.h" @@ -38,11 +43,6 @@ #include "core/string/string_builder.h" #include "scene/resources/packed_scene.h" -#include "modules/gdscript/gdscript_analyzer.h" -#include "modules/gdscript/gdscript_compiler.h" -#include "modules/gdscript/gdscript_parser.h" -#include "modules/gdscript/gdscript_tokenizer.h" - #ifdef TOOLS_ENABLED #include "editor/editor_settings.h" #endif diff --git a/modules/gdscript/tests/test_gdscript.h b/modules/gdscript/tests/test_gdscript.h index d719e3d94a..b39dfe2b5a 100644 --- a/modules/gdscript/tests/test_gdscript.h +++ b/modules/gdscript/tests/test_gdscript.h @@ -32,6 +32,7 @@ #define TEST_GDSCRIPT_H #include "gdscript_test_runner.h" + #include "tests/test_macros.h" namespace GDScriptTests { diff --git a/modules/glslang/register_types.cpp b/modules/glslang/register_types.cpp index f96d2c50b7..622910761d 100644 --- a/modules/glslang/register_types.cpp +++ b/modules/glslang/register_types.cpp @@ -30,10 +30,10 @@ #include "register_types.h" -#include "servers/rendering/rendering_device.h" - #include "glslang_resource_limits.h" +#include "servers/rendering/rendering_device.h" + #include <glslang/Include/Types.h> #include <glslang/Public/ShaderLang.h> #include <glslang/SPIRV/GlslangToSpv.h> diff --git a/modules/gltf/editor/editor_scene_exporter_gltf_plugin.cpp b/modules/gltf/editor/editor_scene_exporter_gltf_plugin.cpp index af870ed13c..83c7f463df 100644 --- a/modules/gltf/editor/editor_scene_exporter_gltf_plugin.cpp +++ b/modules/gltf/editor/editor_scene_exporter_gltf_plugin.cpp @@ -28,10 +28,10 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifdef TOOLS_ENABLED - #include "editor_scene_exporter_gltf_plugin.h" +#ifdef TOOLS_ENABLED + #include "../gltf_document.h" #include "editor/editor_file_system.h" diff --git a/modules/gltf/editor/editor_scene_exporter_gltf_plugin.h b/modules/gltf/editor/editor_scene_exporter_gltf_plugin.h index 0da010ec4b..f92b3c5180 100644 --- a/modules/gltf/editor/editor_scene_exporter_gltf_plugin.h +++ b/modules/gltf/editor/editor_scene_exporter_gltf_plugin.h @@ -33,9 +33,10 @@ #ifdef TOOLS_ENABLED -#include "editor/editor_plugin.h" #include "editor_scene_importer_gltf.h" +#include "editor/editor_plugin.h" + class EditorFileDialog; class SceneExporterGLTFPlugin : public EditorPlugin { diff --git a/modules/gltf/editor/editor_scene_importer_gltf.cpp b/modules/gltf/editor/editor_scene_importer_gltf.cpp index 5339275439..b63a938e64 100644 --- a/modules/gltf/editor/editor_scene_importer_gltf.cpp +++ b/modules/gltf/editor/editor_scene_importer_gltf.cpp @@ -28,10 +28,10 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifdef TOOLS_ENABLED - #include "editor_scene_importer_gltf.h" +#ifdef TOOLS_ENABLED + #include "../gltf_defines.h" #include "../gltf_document.h" diff --git a/modules/gltf/extensions/physics/gltf_collider.cpp b/modules/gltf/extensions/physics/gltf_collider.cpp index 1a42a84874..0f0c361d0f 100644 --- a/modules/gltf/extensions/physics/gltf_collider.cpp +++ b/modules/gltf/extensions/physics/gltf_collider.cpp @@ -31,6 +31,7 @@ #include "gltf_collider.h" #include "../../gltf_state.h" + #include "core/math/convex_hull.h" #include "scene/3d/area_3d.h" #include "scene/resources/box_shape_3d.h" diff --git a/modules/gltf/extensions/physics/gltf_collider.h b/modules/gltf/extensions/physics/gltf_collider.h index 94c7011618..1ca27cbacc 100644 --- a/modules/gltf/extensions/physics/gltf_collider.h +++ b/modules/gltf/extensions/physics/gltf_collider.h @@ -32,6 +32,7 @@ #define GLTF_COLLIDER_H #include "../../gltf_defines.h" + #include "scene/3d/collision_shape_3d.h" class ImporterMesh; diff --git a/modules/gltf/extensions/physics/gltf_document_extension_physics.h b/modules/gltf/extensions/physics/gltf_document_extension_physics.h index 5c4e739dba..785e0f50df 100644 --- a/modules/gltf/extensions/physics/gltf_document_extension_physics.h +++ b/modules/gltf/extensions/physics/gltf_document_extension_physics.h @@ -32,7 +32,6 @@ #define GLTF_DOCUMENT_EXTENSION_PHYSICS_H #include "../gltf_document_extension.h" - #include "gltf_collider.h" #include "gltf_physics_body.h" diff --git a/modules/gltf/register_types.cpp b/modules/gltf/register_types.cpp index 42e3476ff3..663ac7eaef 100644 --- a/modules/gltf/register_types.cpp +++ b/modules/gltf/register_types.cpp @@ -37,13 +37,14 @@ #include "gltf_document.h" #ifdef TOOLS_ENABLED -#include "core/config/project_settings.h" #include "editor/editor_import_blend_runner.h" -#include "editor/editor_node.h" #include "editor/editor_scene_exporter_gltf_plugin.h" #include "editor/editor_scene_importer_blend.h" #include "editor/editor_scene_importer_fbx.h" #include "editor/editor_scene_importer_gltf.h" + +#include "core/config/project_settings.h" +#include "editor/editor_node.h" #include "editor/editor_settings.h" static void _editor_init() { diff --git a/modules/gltf/structures/gltf_accessor.h b/modules/gltf/structures/gltf_accessor.h index 1a5a910048..6b1734601a 100644 --- a/modules/gltf/structures/gltf_accessor.h +++ b/modules/gltf/structures/gltf_accessor.h @@ -32,6 +32,7 @@ #define GLTF_ACCESSOR_H #include "../gltf_defines.h" + #include "core/io/resource.h" struct GLTFAccessor : public Resource { diff --git a/modules/gltf/structures/gltf_buffer_view.h b/modules/gltf/structures/gltf_buffer_view.h index 93626a182b..6d138dbf11 100644 --- a/modules/gltf/structures/gltf_buffer_view.h +++ b/modules/gltf/structures/gltf_buffer_view.h @@ -32,6 +32,7 @@ #define GLTF_BUFFER_VIEW_H #include "../gltf_defines.h" + #include "core/io/resource.h" class GLTFBufferView : public Resource { diff --git a/modules/gltf/structures/gltf_mesh.h b/modules/gltf/structures/gltf_mesh.h index 1e14c1ac7f..639f28980e 100644 --- a/modules/gltf/structures/gltf_mesh.h +++ b/modules/gltf/structures/gltf_mesh.h @@ -32,6 +32,7 @@ #define GLTF_MESH_H #include "../gltf_defines.h" + #include "scene/resources/importer_mesh.h" class GLTFMesh : public Resource { diff --git a/modules/gltf/structures/gltf_node.h b/modules/gltf/structures/gltf_node.h index 95c80861de..c2d2f64495 100644 --- a/modules/gltf/structures/gltf_node.h +++ b/modules/gltf/structures/gltf_node.h @@ -32,6 +32,7 @@ #define GLTF_NODE_H #include "../gltf_defines.h" + #include "core/io/resource.h" class GLTFNode : public Resource { diff --git a/modules/gltf/structures/gltf_skeleton.cpp b/modules/gltf/structures/gltf_skeleton.cpp index d7a7315062..b18aa759a5 100644 --- a/modules/gltf/structures/gltf_skeleton.cpp +++ b/modules/gltf/structures/gltf_skeleton.cpp @@ -31,6 +31,7 @@ #include "gltf_skeleton.h" #include "../gltf_template_convert.h" + #include "scene/3d/bone_attachment_3d.h" void GLTFSkeleton::_bind_methods() { diff --git a/modules/gltf/structures/gltf_skeleton.h b/modules/gltf/structures/gltf_skeleton.h index 044d67d299..72a4a06e5c 100644 --- a/modules/gltf/structures/gltf_skeleton.h +++ b/modules/gltf/structures/gltf_skeleton.h @@ -32,6 +32,7 @@ #define GLTF_SKELETON_H #include "../gltf_defines.h" + #include "core/io/resource.h" class GLTFSkeleton : public Resource { diff --git a/modules/gltf/structures/gltf_skin.cpp b/modules/gltf/structures/gltf_skin.cpp index f0fb71c75d..2827bc3e78 100644 --- a/modules/gltf/structures/gltf_skin.cpp +++ b/modules/gltf/structures/gltf_skin.cpp @@ -31,6 +31,7 @@ #include "gltf_skin.h" #include "../gltf_template_convert.h" + #include "core/variant/typed_array.h" #include "scene/resources/skin.h" diff --git a/modules/gltf/structures/gltf_skin.h b/modules/gltf/structures/gltf_skin.h index c943c42083..164cabfe12 100644 --- a/modules/gltf/structures/gltf_skin.h +++ b/modules/gltf/structures/gltf_skin.h @@ -32,6 +32,7 @@ #define GLTF_SKIN_H #include "../gltf_defines.h" + #include "core/io/resource.h" template <typename T> diff --git a/modules/gltf/structures/gltf_texture.h b/modules/gltf/structures/gltf_texture.h index a9e19e65ea..03d07b3b56 100644 --- a/modules/gltf/structures/gltf_texture.h +++ b/modules/gltf/structures/gltf_texture.h @@ -32,6 +32,7 @@ #define GLTF_TEXTURE_H #include "../gltf_defines.h" + #include "core/io/resource.h" class GLTFTexture : public Resource { diff --git a/modules/gridmap/editor/grid_map_editor_plugin.h b/modules/gridmap/editor/grid_map_editor_plugin.h index 6fedcd9c99..fd9daa7c29 100644 --- a/modules/gridmap/editor/grid_map_editor_plugin.h +++ b/modules/gridmap/editor/grid_map_editor_plugin.h @@ -34,6 +34,7 @@ #ifdef TOOLS_ENABLED #include "../grid_map.h" + #include "editor/editor_plugin.h" #include "scene/gui/box_container.h" #include "scene/gui/item_list.h" diff --git a/modules/gridmap/register_types.cpp b/modules/gridmap/register_types.cpp index bc486bbdc2..76d24310e9 100644 --- a/modules/gridmap/register_types.cpp +++ b/modules/gridmap/register_types.cpp @@ -32,13 +32,14 @@ #include "register_types.h" -#include "core/object/class_db.h" #include "grid_map.h" #ifdef TOOLS_ENABLED #include "editor/grid_map_editor_plugin.h" #endif +#include "core/object/class_db.h" + void initialize_gridmap_module(ModuleInitializationLevel p_level) { if (p_level == MODULE_INITIALIZATION_LEVEL_SCENE) { GDREGISTER_CLASS(GridMap); diff --git a/modules/jpg/image_loader_jpegd.cpp b/modules/jpg/image_loader_jpegd.cpp index c6a1ca6630..0b9fcf4455 100644 --- a/modules/jpg/image_loader_jpegd.cpp +++ b/modules/jpg/image_loader_jpegd.cpp @@ -35,6 +35,7 @@ #include <jpgd.h> #include <jpge.h> + #include <string.h> Error jpeg_load_image_from_buffer(Image *p_image, const uint8_t *p_buffer, int p_buffer_len) { diff --git a/modules/jsonrpc/register_types.cpp b/modules/jsonrpc/register_types.cpp index 2a0457d5a3..d3a7cdaf27 100644 --- a/modules/jsonrpc/register_types.cpp +++ b/modules/jsonrpc/register_types.cpp @@ -29,9 +29,11 @@ /**************************************************************************/ #include "register_types.h" -#include "core/object/class_db.h" + #include "jsonrpc.h" +#include "core/object/class_db.h" + void initialize_jsonrpc_module(ModuleInitializationLevel p_level) { if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) { return; diff --git a/modules/lightmapper_rd/lightmapper_rd.cpp b/modules/lightmapper_rd/lightmapper_rd.cpp index bcb32d77c3..748e8ae50c 100644 --- a/modules/lightmapper_rd/lightmapper_rd.cpp +++ b/modules/lightmapper_rd/lightmapper_rd.cpp @@ -30,11 +30,12 @@ #include "lightmapper_rd.h" -#include "core/config/project_settings.h" -#include "core/math/geometry_2d.h" #include "lm_blendseams.glsl.gen.h" #include "lm_compute.glsl.gen.h" #include "lm_raster.glsl.gen.h" + +#include "core/config/project_settings.h" +#include "core/math/geometry_2d.h" #include "servers/rendering/rendering_device_binds.h" //uncomment this if you want to see textures from all the process saved diff --git a/modules/lightmapper_rd/register_types.cpp b/modules/lightmapper_rd/register_types.cpp index af89aa167c..7ec4a40766 100644 --- a/modules/lightmapper_rd/register_types.cpp +++ b/modules/lightmapper_rd/register_types.cpp @@ -30,8 +30,9 @@ #include "register_types.h" -#include "core/config/project_settings.h" #include "lightmapper_rd.h" + +#include "core/config/project_settings.h" #include "scene/3d/lightmapper.h" #ifndef _3D_DISABLED diff --git a/modules/mbedtls/crypto_mbedtls.cpp b/modules/mbedtls/crypto_mbedtls.cpp index 68b213d79e..50a6909d1a 100644 --- a/modules/mbedtls/crypto_mbedtls.cpp +++ b/modules/mbedtls/crypto_mbedtls.cpp @@ -30,25 +30,25 @@ #include "crypto_mbedtls.h" -#include "core/io/file_access.h" - #include "core/config/engine.h" #include "core/config/project_settings.h" #include "core/io/certs_compressed.gen.h" #include "core/io/compression.h" +#include "core/io/file_access.h" #include "core/os/os.h" #ifdef TOOLS_ENABLED #include "editor/editor_settings.h" #endif -#define PEM_BEGIN_CRT "-----BEGIN CERTIFICATE-----\n" -#define PEM_END_CRT "-----END CERTIFICATE-----\n" -#define PEM_MIN_SIZE 54 #include <mbedtls/debug.h> #include <mbedtls/md.h> #include <mbedtls/pem.h> +#define PEM_BEGIN_CRT "-----BEGIN CERTIFICATE-----\n" +#define PEM_END_CRT "-----END CERTIFICATE-----\n" +#define PEM_MIN_SIZE 54 + CryptoKey *CryptoKeyMbedTLS::create() { return memnew(CryptoKeyMbedTLS); } diff --git a/modules/mbedtls/dtls_server_mbedtls.cpp b/modules/mbedtls/dtls_server_mbedtls.cpp index 62513929ea..e466fe15d6 100644 --- a/modules/mbedtls/dtls_server_mbedtls.cpp +++ b/modules/mbedtls/dtls_server_mbedtls.cpp @@ -29,6 +29,7 @@ /**************************************************************************/ #include "dtls_server_mbedtls.h" + #include "packet_peer_mbed_dtls.h" Error DTLSServerMbedTLS::setup(Ref<TLSOptions> p_options) { diff --git a/modules/mbedtls/dtls_server_mbedtls.h b/modules/mbedtls/dtls_server_mbedtls.h index d5841a45fa..59befecf43 100644 --- a/modules/mbedtls/dtls_server_mbedtls.h +++ b/modules/mbedtls/dtls_server_mbedtls.h @@ -31,9 +31,10 @@ #ifndef DTLS_SERVER_MBEDTLS_H #define DTLS_SERVER_MBEDTLS_H -#include "core/io/dtls_server.h" #include "tls_context_mbedtls.h" +#include "core/io/dtls_server.h" + class DTLSServerMbedTLS : public DTLSServer { private: static DTLSServer *_create_func(); diff --git a/modules/mbedtls/packet_peer_mbed_dtls.h b/modules/mbedtls/packet_peer_mbed_dtls.h index 05decec783..2cff7a3589 100644 --- a/modules/mbedtls/packet_peer_mbed_dtls.h +++ b/modules/mbedtls/packet_peer_mbed_dtls.h @@ -31,9 +31,10 @@ #ifndef PACKET_PEER_MBED_DTLS_H #define PACKET_PEER_MBED_DTLS_H -#include "core/io/packet_peer_dtls.h" #include "tls_context_mbedtls.h" +#include "core/io/packet_peer_dtls.h" + #include <mbedtls/timing.h> class PacketPeerMbedDTLS : public PacketPeerDTLS { diff --git a/modules/mbedtls/stream_peer_mbedtls.h b/modules/mbedtls/stream_peer_mbedtls.h index ec0446c380..a8080f0960 100644 --- a/modules/mbedtls/stream_peer_mbedtls.h +++ b/modules/mbedtls/stream_peer_mbedtls.h @@ -31,9 +31,10 @@ #ifndef STREAM_PEER_MBEDTLS_H #define STREAM_PEER_MBEDTLS_H -#include "core/io/stream_peer_tls.h" #include "tls_context_mbedtls.h" +#include "core/io/stream_peer_tls.h" + class StreamPeerMbedTLS : public StreamPeerTLS { private: Status status = STATUS_DISCONNECTED; diff --git a/modules/mbedtls/tests/test_crypto_mbedtls.cpp b/modules/mbedtls/tests/test_crypto_mbedtls.cpp index 598e1d972e..22d79b79f9 100644 --- a/modules/mbedtls/tests/test_crypto_mbedtls.cpp +++ b/modules/mbedtls/tests/test_crypto_mbedtls.cpp @@ -30,7 +30,8 @@ #include "test_crypto_mbedtls.h" -#include "modules/mbedtls/crypto_mbedtls.h" +#include "../crypto_mbedtls.h" + #include "tests/test_macros.h" namespace TestCryptoMbedTLS { diff --git a/modules/mbedtls/tls_context_mbedtls.h b/modules/mbedtls/tls_context_mbedtls.h index f1bad6a40c..29323688fb 100644 --- a/modules/mbedtls/tls_context_mbedtls.h +++ b/modules/mbedtls/tls_context_mbedtls.h @@ -34,7 +34,6 @@ #include "crypto_mbedtls.h" #include "core/io/file_access.h" - #include "core/object/ref_counted.h" #include <mbedtls/config.h> diff --git a/modules/meshoptimizer/register_types.cpp b/modules/meshoptimizer/register_types.cpp index d807fd9517..781f928f66 100644 --- a/modules/meshoptimizer/register_types.cpp +++ b/modules/meshoptimizer/register_types.cpp @@ -29,7 +29,9 @@ /**************************************************************************/ #include "register_types.h" + #include "scene/resources/surface_tool.h" + #include "thirdparty/meshoptimizer/meshoptimizer.h" void initialize_meshoptimizer_module(ModuleInitializationLevel p_level) { diff --git a/modules/minimp3/audio_stream_mp3.cpp b/modules/minimp3/audio_stream_mp3.cpp index 6af86a96dc..9631b29a52 100644 --- a/modules/minimp3/audio_stream_mp3.cpp +++ b/modules/minimp3/audio_stream_mp3.cpp @@ -32,7 +32,6 @@ #define MINIMP3_FLOAT_OUTPUT #define MINIMP3_IMPLEMENTATION #define MINIMP3_NO_STDIO - #include "audio_stream_mp3.h" #include "core/io/file_access.h" diff --git a/modules/minimp3/audio_stream_mp3.h b/modules/minimp3/audio_stream_mp3.h index c14db28460..30760703e3 100644 --- a/modules/minimp3/audio_stream_mp3.h +++ b/modules/minimp3/audio_stream_mp3.h @@ -34,7 +34,7 @@ #include "core/io/resource_loader.h" #include "servers/audio/audio_stream.h" -#include "minimp3_ex.h" +#include <minimp3_ex.h> class AudioStreamMP3; diff --git a/modules/minimp3/register_types.cpp b/modules/minimp3/register_types.cpp index c9e05c44e1..da89321018 100644 --- a/modules/minimp3/register_types.cpp +++ b/modules/minimp3/register_types.cpp @@ -33,10 +33,13 @@ #include "audio_stream_mp3.h" #ifdef TOOLS_ENABLED -#include "core/config/engine.h" #include "resource_importer_mp3.h" #endif +#ifdef TOOLS_ENABLED +#include "core/config/engine.h" +#endif + void initialize_minimp3_module(ModuleInitializationLevel p_level) { if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) { return; diff --git a/modules/minimp3/resource_importer_mp3.h b/modules/minimp3/resource_importer_mp3.h index b887963050..2df44deaea 100644 --- a/modules/minimp3/resource_importer_mp3.h +++ b/modules/minimp3/resource_importer_mp3.h @@ -32,6 +32,7 @@ #define RESOURCE_IMPORTER_MP3_H #include "audio_stream_mp3.h" + #include "core/io/resource_importer.h" class ResourceImporterMP3 : public ResourceImporter { diff --git a/modules/mono/csharp_script.cpp b/modules/mono/csharp_script.cpp index 28331288d3..f46bb7ee84 100644 --- a/modules/mono/csharp_script.cpp +++ b/modules/mono/csharp_script.cpp @@ -30,7 +30,23 @@ #include "csharp_script.h" -#include <stdint.h> +#include "godotsharp_dirs.h" +#include "managed_callable.h" +#include "mono_gd/gd_mono_cache.h" +#include "signal_awaiter_utils.h" +#include "utils/macros.h" +#include "utils/naming_utils.h" +#include "utils/path_utils.h" +#include "utils/string_utils.h" + +#ifdef DEBUG_METHODS_ENABLED +#include "class_db_api_json.h" +#endif + +#ifdef TOOLS_ENABLED +#include "editor/editor_internal_calls.h" +#include "editor/script_templates/templates.gen.h" +#endif #include "core/config/project_settings.h" #include "core/debugger/engine_debugger.h" @@ -39,31 +55,18 @@ #include "core/os/mutex.h" #include "core/os/os.h" #include "core/os/thread.h" +#include "servers/text_server.h" #ifdef TOOLS_ENABLED #include "core/os/keyboard.h" #include "editor/editor_file_system.h" -#include "editor/editor_internal_calls.h" #include "editor/editor_node.h" #include "editor/editor_settings.h" #include "editor/inspector_dock.h" #include "editor/node_dock.h" -#include "editor/script_templates/templates.gen.h" #endif -#ifdef DEBUG_METHODS_ENABLED -#include "class_db_api_json.h" -#endif - -#include "godotsharp_dirs.h" -#include "managed_callable.h" -#include "mono_gd/gd_mono_cache.h" -#include "servers/text_server.h" -#include "signal_awaiter_utils.h" -#include "utils/macros.h" -#include "utils/naming_utils.h" -#include "utils/path_utils.h" -#include "utils/string_utils.h" +#include <stdint.h> #define CACHED_STRING_NAME(m_var) (CSharpLanguage::get_singleton()->get_string_names().m_var) diff --git a/modules/mono/csharp_script.h b/modules/mono/csharp_script.h index 13c7c4b412..cfdf8ae6f8 100644 --- a/modules/mono/csharp_script.h +++ b/modules/mono/csharp_script.h @@ -31,15 +31,15 @@ #ifndef CSHARP_SCRIPT_H #define CSHARP_SCRIPT_H +#include "mono_gc_handle.h" +#include "mono_gd/gd_mono.h" + #include "core/doc_data.h" #include "core/io/resource_loader.h" #include "core/io/resource_saver.h" #include "core/object/script_language.h" #include "core/templates/self_list.h" -#include "mono_gc_handle.h" -#include "mono_gd/gd_mono.h" - #ifdef TOOLS_ENABLED #include "editor/editor_plugin.h" #endif diff --git a/modules/mono/editor/bindings_generator.cpp b/modules/mono/editor/bindings_generator.cpp index d4472f4722..15bb574f4d 100644 --- a/modules/mono/editor/bindings_generator.cpp +++ b/modules/mono/editor/bindings_generator.cpp @@ -32,6 +32,11 @@ #if defined(DEBUG_METHODS_ENABLED) && defined(TOOLS_ENABLED) +#include "../godotsharp_defs.h" +#include "../utils/naming_utils.h" +#include "../utils/path_utils.h" +#include "../utils/string_utils.h" + #include "core/config/engine.h" #include "core/core_constants.h" #include "core/io/compression.h" @@ -40,11 +45,6 @@ #include "core/os/os.h" #include "main/main.h" -#include "../godotsharp_defs.h" -#include "../utils/naming_utils.h" -#include "../utils/path_utils.h" -#include "../utils/string_utils.h" - StringBuilder &operator<<(StringBuilder &r_sb, const String &p_string) { r_sb.append(p_string); return r_sb; diff --git a/modules/mono/editor/bindings_generator.h b/modules/mono/editor/bindings_generator.h index eac281ddb4..38347a5181 100644 --- a/modules/mono/editor/bindings_generator.h +++ b/modules/mono/editor/bindings_generator.h @@ -31,16 +31,17 @@ #ifndef BINDINGS_GENERATOR_H #define BINDINGS_GENERATOR_H +#include "core/typedefs.h" // DEBUG_METHODS_ENABLED + +#if defined(DEBUG_METHODS_ENABLED) && defined(TOOLS_ENABLED) + #include "core/doc_data.h" #include "core/object/class_db.h" #include "core/string/string_builder.h" +#include "core/string/ustring.h" #include "editor/doc_tools.h" #include "editor/editor_help.h" -#if defined(DEBUG_METHODS_ENABLED) && defined(TOOLS_ENABLED) - -#include "core/string/ustring.h" - class BindingsGenerator { struct ConstantInterface { String name; diff --git a/modules/mono/editor/editor_internal_calls.cpp b/modules/mono/editor/editor_internal_calls.cpp index 527543bb5e..ba6b91b704 100644 --- a/modules/mono/editor/editor_internal_calls.cpp +++ b/modules/mono/editor/editor_internal_calls.cpp @@ -30,9 +30,12 @@ #include "editor_internal_calls.h" -#ifdef UNIX_ENABLED -#include <unistd.h> // access -#endif +#include "../csharp_script.h" +#include "../godotsharp_dirs.h" +#include "../interop_types.h" +#include "../utils/macos_utils.h" +#include "../utils/path_utils.h" +#include "code_completion.h" #include "core/config/project_settings.h" #include "core/os/os.h" @@ -46,13 +49,9 @@ #include "editor/plugins/script_editor_plugin.h" #include "main/main.h" -#include "../csharp_script.h" -#include "../godotsharp_dirs.h" -#include "../utils/macos_utils.h" -#include "../utils/path_utils.h" -#include "code_completion.h" - -#include "../interop_types.h" +#ifdef UNIX_ENABLED +#include <unistd.h> // access +#endif #ifdef __cplusplus extern "C" { diff --git a/modules/mono/editor/hostfxr_resolver.cpp b/modules/mono/editor/hostfxr_resolver.cpp index 786272b28c..e08823bbf7 100644 --- a/modules/mono/editor/hostfxr_resolver.cpp +++ b/modules/mono/editor/hostfxr_resolver.cpp @@ -60,6 +60,9 @@ SOFTWARE. #include "hostfxr_resolver.h" +#include "../utils/path_utils.h" +#include "semver.h" + #include "core/config/engine.h" #include "core/io/dir_access.h" #include "core/io/file_access.h" @@ -70,9 +73,6 @@ SOFTWARE. #include <windows.h> #endif -#include "../utils/path_utils.h" -#include "semver.h" - // We don't use libnethost as it gives us issues with some compilers. // This file tries to mimic libnethost's hostfxr_resolver search logic. We try to use the // same function names for easier comparing in case we need to update this in the future. diff --git a/modules/mono/glue/runtime_interop.cpp b/modules/mono/glue/runtime_interop.cpp index 56fc467b77..ee4de4e9f5 100644 --- a/modules/mono/glue/runtime_interop.cpp +++ b/modules/mono/glue/runtime_interop.cpp @@ -30,6 +30,13 @@ #include "runtime_interop.h" +#include "../csharp_script.h" +#include "../interop_types.h" +#include "../managed_callable.h" +#include "../mono_gd/gd_mono_cache.h" +#include "../signal_awaiter_utils.h" +#include "../utils/path_utils.h" + #include "core/config/engine.h" #include "core/config/project_settings.h" #include "core/debugger/engine_debugger.h" @@ -44,14 +51,6 @@ #include "editor/editor_file_system.h" #endif -#include "../interop_types.h" - -#include "modules/mono/csharp_script.h" -#include "modules/mono/managed_callable.h" -#include "modules/mono/mono_gd/gd_mono_cache.h" -#include "modules/mono/signal_awaiter_utils.h" -#include "modules/mono/utils/path_utils.h" - #ifdef __cplusplus extern "C" { #endif diff --git a/modules/mono/godotsharp_dirs.cpp b/modules/mono/godotsharp_dirs.cpp index 9b487992b5..159cb91d1b 100644 --- a/modules/mono/godotsharp_dirs.cpp +++ b/modules/mono/godotsharp_dirs.cpp @@ -30,6 +30,13 @@ #include "godotsharp_dirs.h" +#include "mono_gd/gd_mono.h" +#include "utils/path_utils.h" + +#ifdef ANDROID_ENABLED +#include "mono_gd/support/android_support.h" +#endif + #include "core/config/project_settings.h" #include "core/io/dir_access.h" #include "core/os/os.h" @@ -39,13 +46,6 @@ #include "editor/editor_paths.h" #endif -#ifdef ANDROID_ENABLED -#include "mono_gd/support/android_support.h" -#endif - -#include "mono_gd/gd_mono.h" -#include "utils/path_utils.h" - namespace GodotSharpDirs { String _get_expected_build_config() { diff --git a/modules/mono/managed_callable.h b/modules/mono/managed_callable.h index 4936e69323..290d49be14 100644 --- a/modules/mono/managed_callable.h +++ b/modules/mono/managed_callable.h @@ -31,12 +31,12 @@ #ifndef MANAGED_CALLABLE_H #define MANAGED_CALLABLE_H +#include "mono_gc_handle.h" + #include "core/os/mutex.h" #include "core/templates/self_list.h" #include "core/variant/callable.h" -#include "mono_gc_handle.h" - class ManagedCallable : public CallableCustom { friend class CSharpLanguage; GCHandleIntPtr delegate_handle; diff --git a/modules/mono/mono_gd/gd_mono.cpp b/modules/mono/mono_gd/gd_mono.cpp index 0aef45c128..92fa30e5e8 100644 --- a/modules/mono/mono_gd/gd_mono.cpp +++ b/modules/mono/mono_gd/gd_mono.cpp @@ -30,26 +30,25 @@ #include "gd_mono.h" -#include "core/config/project_settings.h" -#include "core/debugger/engine_debugger.h" -#include "core/io/dir_access.h" -#include "core/io/file_access.h" -#include "core/os/os.h" -#include "core/os/thread.h" - #include "../csharp_script.h" #include "../glue/runtime_interop.h" #include "../godotsharp_dirs.h" -#include "../utils/path_utils.h" -#include "gd_mono_cache.h" - #include "../thirdparty/coreclr_delegates.h" #include "../thirdparty/hostfxr.h" +#include "../utils/path_utils.h" +#include "gd_mono_cache.h" #ifdef TOOLS_ENABLED #include "../editor/hostfxr_resolver.h" #endif +#include "core/config/project_settings.h" +#include "core/debugger/engine_debugger.h" +#include "core/io/dir_access.h" +#include "core/io/file_access.h" +#include "core/os/os.h" +#include "core/os/thread.h" + #ifdef UNIX_ENABLED #include <dlfcn.h> #endif diff --git a/modules/mono/mono_gd/gd_mono.h b/modules/mono/mono_gd/gd_mono.h index 04c375059d..398f94d924 100644 --- a/modules/mono/mono_gd/gd_mono.h +++ b/modules/mono/mono_gd/gd_mono.h @@ -31,10 +31,10 @@ #ifndef GD_MONO_H #define GD_MONO_H -#include "core/io/config_file.h" - #include "../godotsharp_defs.h" +#include "core/io/config_file.h" + #ifndef GD_CLR_STDCALL #ifdef WIN32 #define GD_CLR_STDCALL __stdcall diff --git a/modules/mono/mono_gd/gd_mono_cache.h b/modules/mono/mono_gd/gd_mono_cache.h index e4cddce1d2..9201da7cae 100644 --- a/modules/mono/mono_gd/gd_mono_cache.h +++ b/modules/mono/mono_gd/gd_mono_cache.h @@ -31,11 +31,10 @@ #ifndef GD_MONO_CACHE_H #define GD_MONO_CACHE_H -#include <stdint.h> - #include "../csharp_script.h" #include "../interop_types.h" #include "../mono_gc_handle.h" + #include "core/object/object.h" #include "core/string/string_name.h" #include "core/string/ustring.h" @@ -43,6 +42,8 @@ #include "core/variant/dictionary.h" #include "core/variant/variant.h" +#include <stdint.h> + class CSharpScript; namespace GDMonoCache { diff --git a/modules/mono/mono_gd/support/android_support.cpp b/modules/mono/mono_gd/support/android_support.cpp index 6e8a5ce5c1..14b442516e 100644 --- a/modules/mono/mono_gd/support/android_support.cpp +++ b/modules/mono/mono_gd/support/android_support.cpp @@ -32,8 +32,21 @@ #if defined(ANDROID_ENABLED) -#include <dlfcn.h> // dlopen, dlsym +#include "../../utils/path_utils.h" +#include "../../utils/string_utils.h" +#include "../gd_mono_cache.h" +#include "../gd_mono_marshal.h" + +#include "core/os/os.h" +#include "core/string/ustring.h" + +#include "java_godot_wrapper.h" +#include "os_android.h" +#include "thread_jandroid.h" + #include <mono/utils/mono-dl-fallback.h> + +#include <dlfcn.h> // dlopen, dlsym #include <sys/system_properties.h> #include <cstddef> @@ -43,17 +56,6 @@ #include <ifaddrs.h> #endif -#include "core/os/os.h" -#include "core/string/ustring.h" -#include "platform/android/java_godot_wrapper.h" -#include "platform/android/os_android.h" -#include "platform/android/thread_jandroid.h" - -#include "../../utils/path_utils.h" -#include "../../utils/string_utils.h" -#include "../gd_mono_cache.h" -#include "../gd_mono_marshal.h" - // Warning: JNI boilerplate ahead... continue at your own risk namespace gdmono { diff --git a/modules/mono/mono_gd/support/ios_support.mm b/modules/mono/mono_gd/support/ios_support.mm index f4abf636b1..df8b3e2626 100644 --- a/modules/mono/mono_gd/support/ios_support.mm +++ b/modules/mono/mono_gd/support/ios_support.mm @@ -32,12 +32,12 @@ #if defined(IOS_ENABLED) -#import <Foundation/Foundation.h> -#include <os/log.h> +#include "../gd_mono_marshal.h" #include "core/ustring.h" -#include "../gd_mono_marshal.h" +#import <Foundation/Foundation.h> +#include <os/log.h> // Implemented mostly following: https://github.com/mono/mono/blob/master/sdks/ios/app/runtime.m diff --git a/modules/mono/register_types.cpp b/modules/mono/register_types.cpp index 7dab4b037f..beaa50ecb2 100644 --- a/modules/mono/register_types.cpp +++ b/modules/mono/register_types.cpp @@ -30,10 +30,10 @@ #include "register_types.h" -#include "core/config/engine.h" - #include "csharp_script.h" +#include "core/config/engine.h" + CSharpLanguage *script_language_cs = nullptr; Ref<ResourceFormatLoaderCSharpScript> resource_loader_cs; Ref<ResourceFormatSaverCSharpScript> resource_saver_cs; diff --git a/modules/mono/signal_awaiter_utils.h b/modules/mono/signal_awaiter_utils.h index 635771f3dc..ed1907afa0 100644 --- a/modules/mono/signal_awaiter_utils.h +++ b/modules/mono/signal_awaiter_utils.h @@ -31,11 +31,11 @@ #ifndef SIGNAL_AWAITER_UTILS_H #define SIGNAL_AWAITER_UTILS_H -#include "core/object/ref_counted.h" - #include "csharp_script.h" #include "mono_gc_handle.h" +#include "core/object/ref_counted.h" + Error gd_mono_connect_signal_awaiter(Object *p_source, const StringName &p_signal, Object *p_target, GCHandleIntPtr p_awaiter_handle_ptr); class BaseSignalCallable : public CallableCustom { diff --git a/modules/mono/utils/path_utils.cpp b/modules/mono/utils/path_utils.cpp index 7b3f212734..be5578c1d0 100644 --- a/modules/mono/utils/path_utils.cpp +++ b/modules/mono/utils/path_utils.cpp @@ -35,6 +35,8 @@ #include "core/io/file_access.h" #include "core/os/os.h" +#include <stdlib.h> + #ifdef WINDOWS_ENABLED #define WIN32_LEAN_AND_MEAN #include <windows.h> @@ -47,8 +49,6 @@ #define ENV_PATH_SEP ":" #endif -#include <stdlib.h> - namespace path { String find_executable(const String &p_name) { diff --git a/modules/multiplayer/editor/editor_network_profiler.h b/modules/multiplayer/editor/editor_network_profiler.h index 1a38890574..b4f8ffa724 100644 --- a/modules/multiplayer/editor/editor_network_profiler.h +++ b/modules/multiplayer/editor/editor_network_profiler.h @@ -31,6 +31,8 @@ #ifndef EDITOR_NETWORK_PROFILER_H #define EDITOR_NETWORK_PROFILER_H +#include "../multiplayer_debugger.h" + #include "scene/debugger/scene_debugger.h" #include "scene/gui/box_container.h" #include "scene/gui/button.h" @@ -38,8 +40,6 @@ #include "scene/gui/split_container.h" #include "scene/gui/tree.h" -#include "../multiplayer_debugger.h" - class EditorNetworkProfiler : public VBoxContainer { GDCLASS(EditorNetworkProfiler, VBoxContainer) diff --git a/modules/multiplayer/editor/multiplayer_editor_plugin.h b/modules/multiplayer/editor/multiplayer_editor_plugin.h index 310653585a..a22144cdcf 100644 --- a/modules/multiplayer/editor/multiplayer_editor_plugin.h +++ b/modules/multiplayer/editor/multiplayer_editor_plugin.h @@ -32,7 +32,6 @@ #define MULTIPLAYER_EDITOR_PLUGIN_H #include "editor/editor_plugin.h" - #include "editor/plugins/editor_debugger_plugin.h" class EditorNetworkProfiler; diff --git a/modules/multiplayer/editor/replication_editor.h b/modules/multiplayer/editor/replication_editor.h index 262c10ea81..208eaabff5 100644 --- a/modules/multiplayer/editor/replication_editor.h +++ b/modules/multiplayer/editor/replication_editor.h @@ -31,8 +31,9 @@ #ifndef REPLICATION_EDITOR_H #define REPLICATION_EDITOR_H +#include "../scene_replication_config.h" + #include "editor/editor_plugin.h" -#include "modules/multiplayer/scene_replication_config.h" #include "scene/gui/box_container.h" class ConfirmationDialog; diff --git a/modules/multiplayer/multiplayer_debugger.h b/modules/multiplayer/multiplayer_debugger.h index 7d2eaa4584..96764ced06 100644 --- a/modules/multiplayer/multiplayer_debugger.h +++ b/modules/multiplayer/multiplayer_debugger.h @@ -32,7 +32,6 @@ #define MULTIPLAYER_DEBUGGER_H #include "core/debugger/engine_profiler.h" - #include "core/os/os.h" class MultiplayerSynchronizer; diff --git a/modules/multiplayer/multiplayer_spawner.h b/modules/multiplayer/multiplayer_spawner.h index 8a54140e32..0e94b781ea 100644 --- a/modules/multiplayer/multiplayer_spawner.h +++ b/modules/multiplayer/multiplayer_spawner.h @@ -31,14 +31,13 @@ #ifndef MULTIPLAYER_SPAWNER_H #define MULTIPLAYER_SPAWNER_H -#include "scene/main/node.h" +#include "scene_replication_config.h" #include "core/templates/local_vector.h" #include "core/variant/typed_array.h" +#include "scene/main/node.h" #include "scene/resources/packed_scene.h" -#include "scene_replication_config.h" - class MultiplayerSpawner : public Node { GDCLASS(MultiplayerSpawner, Node); diff --git a/modules/multiplayer/multiplayer_synchronizer.h b/modules/multiplayer/multiplayer_synchronizer.h index 6fb249d199..7b77e691d1 100644 --- a/modules/multiplayer/multiplayer_synchronizer.h +++ b/modules/multiplayer/multiplayer_synchronizer.h @@ -31,10 +31,10 @@ #ifndef MULTIPLAYER_SYNCHRONIZER_H #define MULTIPLAYER_SYNCHRONIZER_H -#include "scene/main/node.h" - #include "scene_replication_config.h" +#include "scene/main/node.h" + class MultiplayerSynchronizer : public Node { GDCLASS(MultiplayerSynchronizer, Node); diff --git a/modules/multiplayer/register_types.cpp b/modules/multiplayer/register_types.cpp index ea562af43f..fe29b4bdd8 100644 --- a/modules/multiplayer/register_types.cpp +++ b/modules/multiplayer/register_types.cpp @@ -30,14 +30,13 @@ #include "register_types.h" +#include "multiplayer_debugger.h" #include "multiplayer_spawner.h" #include "multiplayer_synchronizer.h" #include "scene_multiplayer.h" #include "scene_replication_interface.h" #include "scene_rpc_interface.h" -#include "multiplayer_debugger.h" - #ifdef TOOLS_ENABLED #include "editor/multiplayer_editor_plugin.h" #endif diff --git a/modules/multiplayer/scene_cache_interface.cpp b/modules/multiplayer/scene_cache_interface.cpp index fed124c41a..90e6ac7c2c 100644 --- a/modules/multiplayer/scene_cache_interface.cpp +++ b/modules/multiplayer/scene_cache_interface.cpp @@ -30,12 +30,12 @@ #include "scene_cache_interface.h" +#include "scene_multiplayer.h" + #include "core/io/marshalls.h" #include "scene/main/node.h" #include "scene/main/window.h" -#include "scene_multiplayer.h" - void SceneCacheInterface::on_peer_change(int p_id, bool p_connected) { if (p_connected) { path_get_cache.insert(p_id, PathGetCache()); diff --git a/modules/multiplayer/scene_multiplayer.cpp b/modules/multiplayer/scene_multiplayer.cpp index 7a424e83f8..3e3118b1cd 100644 --- a/modules/multiplayer/scene_multiplayer.cpp +++ b/modules/multiplayer/scene_multiplayer.cpp @@ -33,12 +33,12 @@ #include "core/debugger/engine_debugger.h" #include "core/io/marshalls.h" -#include <stdint.h> - #ifdef DEBUG_ENABLED #include "core/os/os.h" #endif +#include <stdint.h> + #ifdef DEBUG_ENABLED _FORCE_INLINE_ void SceneMultiplayer::_profile_bandwidth(const String &p_what, int p_value) { if (EngineDebugger::is_profiling("multiplayer:bandwidth")) { diff --git a/modules/multiplayer/scene_multiplayer.h b/modules/multiplayer/scene_multiplayer.h index 678ae932f1..a61e505689 100644 --- a/modules/multiplayer/scene_multiplayer.h +++ b/modules/multiplayer/scene_multiplayer.h @@ -31,12 +31,12 @@ #ifndef SCENE_MULTIPLAYER_H #define SCENE_MULTIPLAYER_H -#include "scene/main/multiplayer_api.h" - #include "scene_cache_interface.h" #include "scene_replication_interface.h" #include "scene_rpc_interface.h" +#include "scene/main/multiplayer_api.h" + class OfflineMultiplayerPeer : public MultiplayerPeer { GDCLASS(OfflineMultiplayerPeer, MultiplayerPeer); diff --git a/modules/multiplayer/scene_replication_config.h b/modules/multiplayer/scene_replication_config.h index d4b0a611bc..44f8259904 100644 --- a/modules/multiplayer/scene_replication_config.h +++ b/modules/multiplayer/scene_replication_config.h @@ -32,7 +32,6 @@ #define SCENE_REPLICATION_CONFIG_H #include "core/io/resource.h" - #include "core/variant/typed_array.h" class SceneReplicationConfig : public Resource { diff --git a/modules/multiplayer/scene_replication_interface.h b/modules/multiplayer/scene_replication_interface.h index 0af45c16b4..267d329ca7 100644 --- a/modules/multiplayer/scene_replication_interface.h +++ b/modules/multiplayer/scene_replication_interface.h @@ -31,11 +31,11 @@ #ifndef SCENE_REPLICATION_INTERFACE_H #define SCENE_REPLICATION_INTERFACE_H -#include "core/object/ref_counted.h" - #include "multiplayer_spawner.h" #include "multiplayer_synchronizer.h" +#include "core/object/ref_counted.h" + class SceneMultiplayer; class SceneReplicationInterface : public RefCounted { diff --git a/modules/multiplayer/scene_rpc_interface.cpp b/modules/multiplayer/scene_rpc_interface.cpp index 4e20e8fd3a..da1a044c9d 100644 --- a/modules/multiplayer/scene_rpc_interface.cpp +++ b/modules/multiplayer/scene_rpc_interface.cpp @@ -30,14 +30,14 @@ #include "scene_rpc_interface.h" +#include "scene_multiplayer.h" + #include "core/debugger/engine_debugger.h" #include "core/io/marshalls.h" #include "scene/main/multiplayer_api.h" #include "scene/main/node.h" #include "scene/main/window.h" -#include "scene_multiplayer.h" - // The RPC meta is composed by a single byte that contains (starting from the least significant bit): // - `NetworkCommands` in the first four bits. // - `NetworkNodeIdCompression` in the next 2 bits. diff --git a/modules/navigation/editor/navigation_mesh_editor_plugin.cpp b/modules/navigation/editor/navigation_mesh_editor_plugin.cpp index bf6a75cce8..634d70d3bd 100644 --- a/modules/navigation/editor/navigation_mesh_editor_plugin.cpp +++ b/modules/navigation/editor/navigation_mesh_editor_plugin.cpp @@ -33,6 +33,7 @@ #ifdef TOOLS_ENABLED #include "../navigation_mesh_generator.h" + #include "core/io/marshalls.h" #include "core/io/resource_saver.h" #include "editor/editor_node.h" diff --git a/modules/navigation/godot_navigation_server.cpp b/modules/navigation/godot_navigation_server.cpp index 3783c001f1..5ac0c333a8 100644 --- a/modules/navigation/godot_navigation_server.cpp +++ b/modules/navigation/godot_navigation_server.cpp @@ -30,12 +30,12 @@ #include "godot_navigation_server.h" -#include "core/os/mutex.h" - #ifndef _3D_DISABLED #include "navigation_mesh_generator.h" #endif +#include "core/os/mutex.h" + using namespace NavigationUtilities; /// Creates a struct for each function and a function that once called creates diff --git a/modules/navigation/godot_navigation_server.h b/modules/navigation/godot_navigation_server.h index 7bf5bab477..db5379a1f1 100644 --- a/modules/navigation/godot_navigation_server.h +++ b/modules/navigation/godot_navigation_server.h @@ -31,17 +31,17 @@ #ifndef GODOT_NAVIGATION_SERVER_H #define GODOT_NAVIGATION_SERVER_H -#include "core/templates/local_vector.h" -#include "core/templates/rid.h" -#include "core/templates/rid_owner.h" -#include "servers/navigation_server_3d.h" - #include "nav_agent.h" #include "nav_link.h" #include "nav_map.h" #include "nav_obstacle.h" #include "nav_region.h" +#include "core/templates/local_vector.h" +#include "core/templates/rid.h" +#include "core/templates/rid_owner.h" +#include "servers/navigation_server_3d.h" + /// The commands are functions executed during the `sync` phase. #define MERGE_INTERNAL(A, B) A##B diff --git a/modules/navigation/nav_agent.h b/modules/navigation/nav_agent.h index 497b239f84..a5f16591b9 100644 --- a/modules/navigation/nav_agent.h +++ b/modules/navigation/nav_agent.h @@ -31,11 +31,12 @@ #ifndef NAV_AGENT_H #define NAV_AGENT_H -#include "core/object/class_db.h" -#include "core/templates/local_vector.h" #include "nav_agent.h" #include "nav_rid.h" +#include "core/object/class_db.h" +#include "core/templates/local_vector.h" + #include <Agent2d.h> #include <Agent3d.h> diff --git a/modules/navigation/nav_base.h b/modules/navigation/nav_base.h index b5cdc117f2..c28392acf7 100644 --- a/modules/navigation/nav_base.h +++ b/modules/navigation/nav_base.h @@ -33,6 +33,7 @@ #include "nav_rid.h" #include "nav_utils.h" + #include "servers/navigation/navigation_utilities.h" class NavMap; diff --git a/modules/navigation/nav_map.cpp b/modules/navigation/nav_map.cpp index 7fd8f3c073..c8a1bb0e7a 100644 --- a/modules/navigation/nav_map.cpp +++ b/modules/navigation/nav_map.cpp @@ -30,13 +30,14 @@ #include "nav_map.h" -#include "core/config/project_settings.h" -#include "core/object/worker_thread_pool.h" #include "nav_agent.h" #include "nav_link.h" #include "nav_obstacle.h" #include "nav_region.h" +#include "core/config/project_settings.h" +#include "core/object/worker_thread_pool.h" + #include <Obstacle2d.h> #define THREE_POINTS_CROSS_PRODUCT(m_a, m_b, m_c) (((m_c) - (m_a)).cross((m_b) - (m_a))) diff --git a/modules/navigation/nav_map.h b/modules/navigation/nav_map.h index 8d529f464e..5d78c14627 100644 --- a/modules/navigation/nav_map.h +++ b/modules/navigation/nav_map.h @@ -32,16 +32,14 @@ #define NAV_MAP_H #include "nav_rid.h" +#include "nav_utils.h" #include "core/math/math_defs.h" #include "core/object/worker_thread_pool.h" -#include "core/templates/rb_map.h" -#include "nav_utils.h" #include <KdTree2d.h> -#include <RVOSimulator2d.h> - #include <KdTree3d.h> +#include <RVOSimulator2d.h> #include <RVOSimulator3d.h> class NavLink; diff --git a/modules/navigation/nav_obstacle.h b/modules/navigation/nav_obstacle.h index 93910898e9..2b1b9dcd04 100644 --- a/modules/navigation/nav_obstacle.h +++ b/modules/navigation/nav_obstacle.h @@ -31,9 +31,10 @@ #ifndef NAV_OBSTACLE_H #define NAV_OBSTACLE_H +#include "nav_rid.h" + #include "core/object/class_db.h" #include "core/templates/local_vector.h" -#include "nav_rid.h" class NavAgent; class NavMap; diff --git a/modules/navigation/nav_region.h b/modules/navigation/nav_region.h index 72299e8874..0c3c1b56b6 100644 --- a/modules/navigation/nav_region.h +++ b/modules/navigation/nav_region.h @@ -31,11 +31,11 @@ #ifndef NAV_REGION_H #define NAV_REGION_H -#include "scene/resources/navigation_mesh.h" - #include "nav_base.h" #include "nav_utils.h" +#include "scene/resources/navigation_mesh.h" + class NavRegion : public NavBase { NavMap *map = nullptr; Transform3D transform; diff --git a/modules/navigation/register_types.cpp b/modules/navigation/register_types.cpp index 6ba5e90c2e..1401833d0e 100644 --- a/modules/navigation/register_types.cpp +++ b/modules/navigation/register_types.cpp @@ -30,9 +30,6 @@ #include "register_types.h" -#include "core/config/engine.h" -#include "servers/navigation_server_3d.h" - #include "godot_navigation_server.h" #ifndef _3D_DISABLED @@ -43,6 +40,9 @@ #include "editor/navigation_mesh_editor_plugin.h" #endif +#include "core/config/engine.h" +#include "servers/navigation_server_3d.h" + #ifndef _3D_DISABLED NavigationMeshGenerator *_nav_mesh_generator = nullptr; #endif diff --git a/modules/noise/editor/noise_editor_plugin.cpp b/modules/noise/editor/noise_editor_plugin.cpp index 462cc50112..91e9f7d477 100644 --- a/modules/noise/editor/noise_editor_plugin.cpp +++ b/modules/noise/editor/noise_editor_plugin.cpp @@ -32,14 +32,14 @@ #ifdef TOOLS_ENABLED +#include "../noise.h" +#include "../noise_texture_2d.h" + #include "editor/editor_inspector.h" #include "editor/editor_scale.h" #include "scene/gui/button.h" #include "scene/gui/texture_rect.h" -#include "modules/noise/noise.h" -#include "modules/noise/noise_texture_2d.h" - class NoisePreview : public Control { GDCLASS(NoisePreview, Control) diff --git a/modules/noise/fastnoise_lite.h b/modules/noise/fastnoise_lite.h index 0e6a4606ac..c63f7d7d29 100644 --- a/modules/noise/fastnoise_lite.h +++ b/modules/noise/fastnoise_lite.h @@ -31,9 +31,10 @@ #ifndef FASTNOISE_LITE_H #define FASTNOISE_LITE_H +#include "noise.h" + #include "core/io/image.h" #include "core/object/ref_counted.h" -#include "noise.h" #include "scene/resources/gradient.h" #include <thirdparty/noise/FastNoiseLite.h> diff --git a/modules/noise/noise_texture_2d.cpp b/modules/noise/noise_texture_2d.cpp index e4b2e0b4ac..a7176e0816 100644 --- a/modules/noise/noise_texture_2d.cpp +++ b/modules/noise/noise_texture_2d.cpp @@ -30,9 +30,10 @@ #include "noise_texture_2d.h" -#include "core/core_string_names.h" #include "noise.h" +#include "core/core_string_names.h" + NoiseTexture2D::NoiseTexture2D() { noise = Ref<Noise>(); diff --git a/modules/noise/noise_texture_3d.cpp b/modules/noise/noise_texture_3d.cpp index 25d75b8ffb..f6c67b0f2d 100644 --- a/modules/noise/noise_texture_3d.cpp +++ b/modules/noise/noise_texture_3d.cpp @@ -30,9 +30,10 @@ #include "noise_texture_3d.h" -#include "core/core_string_names.h" #include "noise.h" +#include "core/core_string_names.h" + NoiseTexture3D::NoiseTexture3D() { noise = Ref<Noise>(); diff --git a/modules/noise/register_types.cpp b/modules/noise/register_types.cpp index f48d4e7e4d..29eb42522f 100644 --- a/modules/noise/register_types.cpp +++ b/modules/noise/register_types.cpp @@ -36,10 +36,13 @@ #include "noise_texture_3d.h" #ifdef TOOLS_ENABLED -#include "editor/editor_plugin.h" #include "editor/noise_editor_plugin.h" #endif +#ifdef TOOLS_ENABLED +#include "editor/editor_plugin.h" +#endif + void initialize_noise_module(ModuleInitializationLevel p_level) { if (p_level == MODULE_INITIALIZATION_LEVEL_SCENE) { GDREGISTER_CLASS(NoiseTexture3D); diff --git a/modules/noise/tests/test_fastnoise_lite.h b/modules/noise/tests/test_fastnoise_lite.h index 0a435c6a5c..6e2e263e03 100644 --- a/modules/noise/tests/test_fastnoise_lite.h +++ b/modules/noise/tests/test_fastnoise_lite.h @@ -31,9 +31,9 @@ #ifndef TEST_FASTNOISE_LITE_H #define TEST_FASTNOISE_LITE_H -#include "tests/test_macros.h" +#include "../fastnoise_lite.h" -#include "modules/noise/fastnoise_lite.h" +#include "tests/test_macros.h" namespace TestFastNoiseLite { diff --git a/modules/noise/tests/test_noise_texture_2d.h b/modules/noise/tests/test_noise_texture_2d.h index 9e280b5d97..e2ec39ef48 100644 --- a/modules/noise/tests/test_noise_texture_2d.h +++ b/modules/noise/tests/test_noise_texture_2d.h @@ -31,9 +31,9 @@ #ifndef TEST_NOISE_TEXTURE_2D_H #define TEST_NOISE_TEXTURE_2D_H -#include "tests/test_macros.h" +#include "../noise_texture_2d.h" -#include "modules/noise/noise_texture_2d.h" +#include "tests/test_macros.h" namespace TestNoiseTexture2D { diff --git a/modules/noise/tests/test_noise_texture_3d.h b/modules/noise/tests/test_noise_texture_3d.h index b46d386296..a612f2920a 100644 --- a/modules/noise/tests/test_noise_texture_3d.h +++ b/modules/noise/tests/test_noise_texture_3d.h @@ -31,9 +31,9 @@ #ifndef TEST_NOISE_TEXTURE_3D_H #define TEST_NOISE_TEXTURE_3D_H -#include "tests/test_macros.h" +#include "../noise_texture_3d.h" -#include "modules/noise/noise_texture_3d.h" +#include "tests/test_macros.h" namespace TestNoiseTexture3D { diff --git a/modules/ogg/ogg_packet_sequence.cpp b/modules/ogg/ogg_packet_sequence.cpp index d473f3b4a0..fb29493ca9 100644 --- a/modules/ogg/ogg_packet_sequence.cpp +++ b/modules/ogg/ogg_packet_sequence.cpp @@ -29,6 +29,7 @@ /**************************************************************************/ #include "ogg_packet_sequence.h" + #include "core/variant/typed_array.h" void OggPacketSequence::push_page(int64_t p_granule_pos, const Vector<PackedByteArray> &p_data) { diff --git a/modules/openxr/action_map/openxr_action.cpp b/modules/openxr/action_map/openxr_action.cpp index a768eb2326..8a6b7a8b62 100644 --- a/modules/openxr/action_map/openxr_action.cpp +++ b/modules/openxr/action_map/openxr_action.cpp @@ -29,6 +29,7 @@ /**************************************************************************/ #include "openxr_action.h" + #include "openxr_action_set.h" void OpenXRAction::_bind_methods() { diff --git a/modules/openxr/action_map/openxr_action_map.h b/modules/openxr/action_map/openxr_action_map.h index 0c88fac5ec..678b3d7fbc 100644 --- a/modules/openxr/action_map/openxr_action_map.h +++ b/modules/openxr/action_map/openxr_action_map.h @@ -31,12 +31,12 @@ #ifndef OPENXR_ACTION_MAP_H #define OPENXR_ACTION_MAP_H -#include "core/io/resource.h" - #include "openxr_action.h" #include "openxr_action_set.h" #include "openxr_interaction_profile.h" +#include "core/io/resource.h" + class OpenXRActionMap : public Resource { GDCLASS(OpenXRActionMap, Resource); diff --git a/modules/openxr/action_map/openxr_action_set.h b/modules/openxr/action_map/openxr_action_set.h index 0cb342784a..c63d50bc19 100644 --- a/modules/openxr/action_map/openxr_action_set.h +++ b/modules/openxr/action_map/openxr_action_set.h @@ -31,10 +31,10 @@ #ifndef OPENXR_ACTION_SET_H #define OPENXR_ACTION_SET_H -#include "core/io/resource.h" - #include "openxr_action.h" +#include "core/io/resource.h" + class OpenXRActionSet : public Resource { GDCLASS(OpenXRActionSet, Resource); diff --git a/modules/openxr/action_map/openxr_interaction_profile.h b/modules/openxr/action_map/openxr_interaction_profile.h index d7253af316..4a82785f14 100644 --- a/modules/openxr/action_map/openxr_interaction_profile.h +++ b/modules/openxr/action_map/openxr_interaction_profile.h @@ -31,11 +31,11 @@ #ifndef OPENXR_INTERACTION_PROFILE_H #define OPENXR_INTERACTION_PROFILE_H -#include "core/io/resource.h" - #include "openxr_action.h" #include "openxr_interaction_profile_meta_data.h" +#include "core/io/resource.h" + class OpenXRIPBinding : public Resource { GDCLASS(OpenXRIPBinding, Resource); diff --git a/modules/openxr/action_map/openxr_interaction_profile_meta_data.cpp b/modules/openxr/action_map/openxr_interaction_profile_meta_data.cpp index 70879c6b6b..11449bdfb4 100644 --- a/modules/openxr/action_map/openxr_interaction_profile_meta_data.cpp +++ b/modules/openxr/action_map/openxr_interaction_profile_meta_data.cpp @@ -29,6 +29,7 @@ /**************************************************************************/ #include "openxr_interaction_profile_meta_data.h" + #include "../openxr_api.h" OpenXRInteractionProfileMetaData *OpenXRInteractionProfileMetaData::singleton = nullptr; diff --git a/modules/openxr/action_map/openxr_interaction_profile_meta_data.h b/modules/openxr/action_map/openxr_interaction_profile_meta_data.h index 16ee88bbf9..3eab2139ff 100644 --- a/modules/openxr/action_map/openxr_interaction_profile_meta_data.h +++ b/modules/openxr/action_map/openxr_interaction_profile_meta_data.h @@ -31,8 +31,6 @@ #ifndef OPENXR_INTERACTION_PROFILE_META_DATA_H #define OPENXR_INTERACTION_PROFILE_META_DATA_H -#include "openxr_action.h" - /////////////////////////////////////////////////////////////////////////// // Stores available interaction profile meta data // @@ -53,6 +51,8 @@ // are supported but otherwise action types should match between action and // input/output paths. +#include "openxr_action.h" + #include "core/object/object.h" #define XR_PATH_UNSUPPORTED_NAME "unsupported" diff --git a/modules/openxr/editor/openxr_action_editor.h b/modules/openxr/editor/openxr_action_editor.h index 765b3ef378..11d1fd657a 100644 --- a/modules/openxr/editor/openxr_action_editor.h +++ b/modules/openxr/editor/openxr_action_editor.h @@ -32,6 +32,7 @@ #define OPENXR_ACTION_EDITOR_H #include "../action_map/openxr_action.h" + #include "editor/editor_undo_redo_manager.h" #include "scene/gui/box_container.h" #include "scene/gui/button.h" diff --git a/modules/openxr/editor/openxr_action_map_editor.h b/modules/openxr/editor/openxr_action_map_editor.h index a04bae4a6e..22e8853c8c 100644 --- a/modules/openxr/editor/openxr_action_map_editor.h +++ b/modules/openxr/editor/openxr_action_map_editor.h @@ -32,9 +32,9 @@ #define OPENXR_ACTION_MAP_EDITOR_H #include "../action_map/openxr_action_map.h" -#include "../editor/openxr_action_set_editor.h" -#include "../editor/openxr_interaction_profile_editor.h" -#include "../editor/openxr_select_interaction_profile_dialog.h" +#include "openxr_action_set_editor.h" +#include "openxr_interaction_profile_editor.h" +#include "openxr_select_interaction_profile_dialog.h" #include "editor/editor_plugin.h" #include "editor/editor_undo_redo_manager.h" diff --git a/modules/openxr/editor/openxr_action_set_editor.cpp b/modules/openxr/editor/openxr_action_set_editor.cpp index bcb0f5f8b1..6a63720257 100644 --- a/modules/openxr/editor/openxr_action_set_editor.cpp +++ b/modules/openxr/editor/openxr_action_set_editor.cpp @@ -29,6 +29,7 @@ /**************************************************************************/ #include "openxr_action_set_editor.h" + #include "openxr_action_editor.h" void OpenXRActionSetEditor::_bind_methods() { diff --git a/modules/openxr/editor/openxr_action_set_editor.h b/modules/openxr/editor/openxr_action_set_editor.h index 129f800abe..3261f3a29e 100644 --- a/modules/openxr/editor/openxr_action_set_editor.h +++ b/modules/openxr/editor/openxr_action_set_editor.h @@ -34,6 +34,7 @@ #include "../action_map/openxr_action_map.h" #include "../action_map/openxr_action_set.h" #include "openxr_action_editor.h" + #include "scene/gui/box_container.h" #include "scene/gui/button.h" #include "scene/gui/line_edit.h" diff --git a/modules/openxr/editor/openxr_editor_plugin.cpp b/modules/openxr/editor/openxr_editor_plugin.cpp index 75becf035a..51ebbcf44a 100644 --- a/modules/openxr/editor/openxr_editor_plugin.cpp +++ b/modules/openxr/editor/openxr_editor_plugin.cpp @@ -31,6 +31,7 @@ #include "openxr_editor_plugin.h" #include "../action_map/openxr_action_map.h" + #include "editor/editor_node.h" void OpenXREditorPlugin::edit(Object *p_node) { diff --git a/modules/openxr/editor/openxr_editor_plugin.h b/modules/openxr/editor/openxr_editor_plugin.h index ef75385233..9764f8fe21 100644 --- a/modules/openxr/editor/openxr_editor_plugin.h +++ b/modules/openxr/editor/openxr_editor_plugin.h @@ -31,9 +31,10 @@ #ifndef OPENXR_EDITOR_PLUGIN_H #define OPENXR_EDITOR_PLUGIN_H -#include "editor/editor_plugin.h" #include "openxr_action_map_editor.h" +#include "editor/editor_plugin.h" + class OpenXREditorPlugin : public EditorPlugin { GDCLASS(OpenXREditorPlugin, EditorPlugin); diff --git a/modules/openxr/editor/openxr_interaction_profile_editor.cpp b/modules/openxr/editor/openxr_interaction_profile_editor.cpp index 6a848dd430..1f63399ee7 100644 --- a/modules/openxr/editor/openxr_interaction_profile_editor.cpp +++ b/modules/openxr/editor/openxr_interaction_profile_editor.cpp @@ -29,6 +29,7 @@ /**************************************************************************/ #include "openxr_interaction_profile_editor.h" + #include "scene/gui/box_container.h" #include "scene/gui/button.h" #include "scene/gui/label.h" diff --git a/modules/openxr/editor/openxr_interaction_profile_editor.h b/modules/openxr/editor/openxr_interaction_profile_editor.h index fa25a000a9..b9b3fbd81d 100644 --- a/modules/openxr/editor/openxr_interaction_profile_editor.h +++ b/modules/openxr/editor/openxr_interaction_profile_editor.h @@ -34,11 +34,11 @@ #include "../action_map/openxr_action_map.h" #include "../action_map/openxr_interaction_profile.h" #include "../action_map/openxr_interaction_profile_meta_data.h" +#include "openxr_select_action_dialog.h" + #include "editor/editor_undo_redo_manager.h" #include "scene/gui/scroll_container.h" -#include "openxr_select_action_dialog.h" - class OpenXRInteractionProfileEditorBase : public ScrollContainer { GDCLASS(OpenXRInteractionProfileEditorBase, ScrollContainer); diff --git a/modules/openxr/editor/openxr_select_action_dialog.cpp b/modules/openxr/editor/openxr_select_action_dialog.cpp index b7dd7d5def..8eec54be63 100644 --- a/modules/openxr/editor/openxr_select_action_dialog.cpp +++ b/modules/openxr/editor/openxr_select_action_dialog.cpp @@ -29,7 +29,6 @@ /**************************************************************************/ #include "openxr_select_action_dialog.h" -#include "editor/editor_node.h" void OpenXRSelectActionDialog::_bind_methods() { ADD_SIGNAL(MethodInfo("action_selected", PropertyInfo(Variant::STRING, "action"))); diff --git a/modules/openxr/editor/openxr_select_action_dialog.h b/modules/openxr/editor/openxr_select_action_dialog.h index 4d8eddf3e5..cf7a7a1939 100644 --- a/modules/openxr/editor/openxr_select_action_dialog.h +++ b/modules/openxr/editor/openxr_select_action_dialog.h @@ -32,6 +32,7 @@ #define OPENXR_SELECT_ACTION_DIALOG_H #include "../action_map/openxr_action_map.h" + #include "scene/gui/box_container.h" #include "scene/gui/button.h" #include "scene/gui/dialogs.h" diff --git a/modules/openxr/editor/openxr_select_interaction_profile_dialog.h b/modules/openxr/editor/openxr_select_interaction_profile_dialog.h index 4826a23a78..aae0368f67 100644 --- a/modules/openxr/editor/openxr_select_interaction_profile_dialog.h +++ b/modules/openxr/editor/openxr_select_interaction_profile_dialog.h @@ -32,6 +32,7 @@ #define OPENXR_SELECT_INTERACTION_PROFILE_DIALOG_H #include "../action_map/openxr_interaction_profile_meta_data.h" + #include "scene/gui/box_container.h" #include "scene/gui/button.h" #include "scene/gui/dialogs.h" diff --git a/modules/openxr/extensions/openxr_android_extension.cpp b/modules/openxr/extensions/openxr_android_extension.cpp index 4465daf22a..98687d5f20 100644 --- a/modules/openxr/extensions/openxr_android_extension.cpp +++ b/modules/openxr/extensions/openxr_android_extension.cpp @@ -29,12 +29,14 @@ /**************************************************************************/ #include "openxr_android_extension.h" + +#include "../openxr_api.h" + #include "java_godot_wrapper.h" #include "os_android.h" #include "thread_jandroid.h" #include <jni.h> -#include <modules/openxr/openxr_api.h> #include <openxr/openxr.h> #include <openxr/openxr_platform.h> diff --git a/modules/openxr/extensions/openxr_composition_layer_provider.h b/modules/openxr/extensions/openxr_composition_layer_provider.h index 2f0869374e..d77ae06174 100644 --- a/modules/openxr/extensions/openxr_composition_layer_provider.h +++ b/modules/openxr/extensions/openxr_composition_layer_provider.h @@ -32,6 +32,7 @@ #define OPENXR_COMPOSITION_LAYER_PROVIDER_H #include "openxr_extension_wrapper.h" + #include <openxr/openxr.h> // Interface for OpenXR extensions that provide a composition layer. diff --git a/modules/openxr/extensions/openxr_extension_wrapper.h b/modules/openxr/extensions/openxr_extension_wrapper.h index 2c855c3cde..920bfe74b7 100644 --- a/modules/openxr/extensions/openxr_extension_wrapper.h +++ b/modules/openxr/extensions/openxr_extension_wrapper.h @@ -37,6 +37,7 @@ #include "core/templates/rid.h" #include "thirdparty/openxr/src/common/xr_linear.h" + #include <openxr/openxr.h> class OpenXRAPI; diff --git a/modules/openxr/extensions/openxr_fb_display_refresh_rate_extension.h b/modules/openxr/extensions/openxr_fb_display_refresh_rate_extension.h index 0e814cbb13..d8015fe600 100644 --- a/modules/openxr/extensions/openxr_fb_display_refresh_rate_extension.h +++ b/modules/openxr/extensions/openxr_fb_display_refresh_rate_extension.h @@ -38,7 +38,6 @@ #include "../openxr_api.h" #include "../util.h" - #include "openxr_extension_wrapper.h" class OpenXRDisplayRefreshRateExtension : public OpenXRExtensionWrapper { diff --git a/modules/openxr/extensions/openxr_fb_passthrough_extension_wrapper.h b/modules/openxr/extensions/openxr_fb_passthrough_extension_wrapper.h index c01394529e..619313809d 100644 --- a/modules/openxr/extensions/openxr_fb_passthrough_extension_wrapper.h +++ b/modules/openxr/extensions/openxr_fb_passthrough_extension_wrapper.h @@ -33,7 +33,6 @@ #include "../openxr_api.h" #include "../util.h" - #include "openxr_composition_layer_provider.h" #include "openxr_extension_wrapper.h" diff --git a/modules/openxr/extensions/openxr_hand_tracking_extension.cpp b/modules/openxr/extensions/openxr_hand_tracking_extension.cpp index 4dac7bed4f..6fffa1ed07 100644 --- a/modules/openxr/extensions/openxr_hand_tracking_extension.cpp +++ b/modules/openxr/extensions/openxr_hand_tracking_extension.cpp @@ -29,7 +29,9 @@ /**************************************************************************/ #include "openxr_hand_tracking_extension.h" + #include "../openxr_api.h" + #include "core/string/print_string.h" #include "servers/xr_server.h" diff --git a/modules/openxr/extensions/openxr_hand_tracking_extension.h b/modules/openxr/extensions/openxr_hand_tracking_extension.h index 5ab44ed969..e86831e71b 100644 --- a/modules/openxr/extensions/openxr_hand_tracking_extension.h +++ b/modules/openxr/extensions/openxr_hand_tracking_extension.h @@ -31,9 +31,8 @@ #ifndef OPENXR_HAND_TRACKING_EXTENSION_H #define OPENXR_HAND_TRACKING_EXTENSION_H -#include "openxr_extension_wrapper.h" - #include "../util.h" +#include "openxr_extension_wrapper.h" #define MAX_OPENXR_TRACKED_HANDS 2 diff --git a/modules/openxr/extensions/openxr_htc_controller_extension.cpp b/modules/openxr/extensions/openxr_htc_controller_extension.cpp index 116762ee8d..51364d83d8 100644 --- a/modules/openxr/extensions/openxr_htc_controller_extension.cpp +++ b/modules/openxr/extensions/openxr_htc_controller_extension.cpp @@ -29,6 +29,7 @@ /**************************************************************************/ #include "openxr_htc_controller_extension.h" + #include "../action_map/openxr_interaction_profile_meta_data.h" HashMap<String, bool *> OpenXRHTCControllerExtension::get_requested_extensions() { diff --git a/modules/openxr/extensions/openxr_htc_vive_tracker_extension.cpp b/modules/openxr/extensions/openxr_htc_vive_tracker_extension.cpp index 1d2bd11a00..087631a8b9 100644 --- a/modules/openxr/extensions/openxr_htc_vive_tracker_extension.cpp +++ b/modules/openxr/extensions/openxr_htc_vive_tracker_extension.cpp @@ -29,7 +29,9 @@ /**************************************************************************/ #include "openxr_htc_vive_tracker_extension.h" + #include "../action_map/openxr_interaction_profile_meta_data.h" + #include "core/string/print_string.h" HashMap<String, bool *> OpenXRHTCViveTrackerExtension::get_requested_extensions() { diff --git a/modules/openxr/extensions/openxr_huawei_controller_extension.cpp b/modules/openxr/extensions/openxr_huawei_controller_extension.cpp index aff92ee651..8b8662cfcb 100644 --- a/modules/openxr/extensions/openxr_huawei_controller_extension.cpp +++ b/modules/openxr/extensions/openxr_huawei_controller_extension.cpp @@ -29,6 +29,7 @@ /**************************************************************************/ #include "openxr_huawei_controller_extension.h" + #include "../action_map/openxr_interaction_profile_meta_data.h" HashMap<String, bool *> OpenXRHuaweiControllerExtension::get_requested_extensions() { diff --git a/modules/openxr/extensions/openxr_ml2_controller_extension.cpp b/modules/openxr/extensions/openxr_ml2_controller_extension.cpp index ae372f69b3..7dad8deb8c 100644 --- a/modules/openxr/extensions/openxr_ml2_controller_extension.cpp +++ b/modules/openxr/extensions/openxr_ml2_controller_extension.cpp @@ -29,6 +29,7 @@ /**************************************************************************/ #include "openxr_ml2_controller_extension.h" + #include "../action_map/openxr_interaction_profile_meta_data.h" HashMap<String, bool *> OpenXRML2ControllerExtension::get_requested_extensions() { diff --git a/modules/openxr/extensions/openxr_opengl_extension.cpp b/modules/openxr/extensions/openxr_opengl_extension.cpp index 83d31036a4..39b5c61e8e 100644 --- a/modules/openxr/extensions/openxr_opengl_extension.cpp +++ b/modules/openxr/extensions/openxr_opengl_extension.cpp @@ -28,10 +28,12 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ +#include "openxr_opengl_extension.h" + #ifdef GLES3_ENABLED -#include "../extensions/openxr_opengl_extension.h" #include "../openxr_util.h" + #include "drivers/gles3/effects/copy_effects.h" #include "drivers/gles3/storage/texture_storage.h" #include "servers/rendering/rendering_server_globals.h" diff --git a/modules/openxr/extensions/openxr_opengl_extension.h b/modules/openxr/extensions/openxr_opengl_extension.h index 29a9f35c51..598d3415ad 100644 --- a/modules/openxr/extensions/openxr_opengl_extension.h +++ b/modules/openxr/extensions/openxr_opengl_extension.h @@ -33,11 +33,11 @@ #ifdef GLES3_ENABLED -#include "core/templates/vector.h" -#include "openxr_extension_wrapper.h" - #include "../openxr_api.h" #include "../util.h" +#include "openxr_extension_wrapper.h" + +#include "core/templates/vector.h" #ifdef ANDROID_ENABLED #define XR_USE_GRAPHICS_API_OPENGL_ES @@ -61,6 +61,7 @@ #define GL3_PROTOTYPES 1 #include "thirdparty/glad/glad/gl.h" #include "thirdparty/glad/glad/glx.h" + #include <X11/Xlib.h> #endif @@ -69,7 +70,7 @@ #include <jni.h> #endif -// include platform dependent structs +// Include platform dependent structs. #include <openxr/openxr_platform.h> class OpenXROpenGLExtension : public OpenXRGraphicsExtensionWrapper { diff --git a/modules/openxr/extensions/openxr_palm_pose_extension.cpp b/modules/openxr/extensions/openxr_palm_pose_extension.cpp index 75117e8db3..07446c8def 100644 --- a/modules/openxr/extensions/openxr_palm_pose_extension.cpp +++ b/modules/openxr/extensions/openxr_palm_pose_extension.cpp @@ -29,6 +29,7 @@ /**************************************************************************/ #include "openxr_palm_pose_extension.h" + #include "core/string/print_string.h" OpenXRPalmPoseExtension *OpenXRPalmPoseExtension::singleton = nullptr; diff --git a/modules/openxr/extensions/openxr_pico_controller_extension.cpp b/modules/openxr/extensions/openxr_pico_controller_extension.cpp index f2fcf22ce2..8be961a68e 100644 --- a/modules/openxr/extensions/openxr_pico_controller_extension.cpp +++ b/modules/openxr/extensions/openxr_pico_controller_extension.cpp @@ -29,6 +29,7 @@ /**************************************************************************/ #include "openxr_pico_controller_extension.h" + #include "../action_map/openxr_interaction_profile_meta_data.h" // Pico controllers are not part of the OpenXR spec at the time of writing this diff --git a/modules/openxr/extensions/openxr_vulkan_extension.cpp b/modules/openxr/extensions/openxr_vulkan_extension.cpp index d5739db23f..90c1c62050 100644 --- a/modules/openxr/extensions/openxr_vulkan_extension.cpp +++ b/modules/openxr/extensions/openxr_vulkan_extension.cpp @@ -28,10 +28,11 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#include "core/string/print_string.h" +#include "openxr_vulkan_extension.h" -#include "../extensions/openxr_vulkan_extension.h" #include "../openxr_util.h" + +#include "core/string/print_string.h" #include "servers/rendering/renderer_rd/effects/copy_effects.h" #include "servers/rendering/renderer_rd/storage_rd/texture_storage.h" #include "servers/rendering/rendering_server_globals.h" diff --git a/modules/openxr/extensions/openxr_vulkan_extension.h b/modules/openxr/extensions/openxr_vulkan_extension.h index 013a8d5a51..4add6f6fa2 100644 --- a/modules/openxr/extensions/openxr_vulkan_extension.h +++ b/modules/openxr/extensions/openxr_vulkan_extension.h @@ -31,15 +31,14 @@ #ifndef OPENXR_VULKAN_EXTENSION_H #define OPENXR_VULKAN_EXTENSION_H -#include "core/templates/vector.h" +#include "../openxr_api.h" +#include "../util.h" #include "openxr_extension_wrapper.h" +#include "core/templates/vector.h" #include "drivers/vulkan/vulkan_context.h" -#include "../openxr_api.h" -#include "../util.h" - -// need to include Vulkan so we know of type definitions +// Need to include Vulkan so we know of type definitions. #define XR_USE_GRAPHICS_API_VULKAN #ifdef WINDOWS_ENABLED @@ -53,7 +52,7 @@ #include <jni.h> #endif -// include platform dependent structs +// Include platform dependent structs. #include <openxr/openxr_platform.h> class OpenXRVulkanExtension : public OpenXRGraphicsExtensionWrapper, VulkanHooks { diff --git a/modules/openxr/extensions/openxr_wmr_controller_extension.cpp b/modules/openxr/extensions/openxr_wmr_controller_extension.cpp index 7017496d75..a9b27013f1 100644 --- a/modules/openxr/extensions/openxr_wmr_controller_extension.cpp +++ b/modules/openxr/extensions/openxr_wmr_controller_extension.cpp @@ -29,6 +29,7 @@ /**************************************************************************/ #include "openxr_wmr_controller_extension.h" + #include "../action_map/openxr_interaction_profile_meta_data.h" HashMap<String, bool *> OpenXRWMRControllerExtension::get_requested_extensions() { diff --git a/modules/openxr/openxr_api.cpp b/modules/openxr/openxr_api.cpp index 5879fbd460..21d9203ead 100644 --- a/modules/openxr/openxr_api.cpp +++ b/modules/openxr/openxr_api.cpp @@ -29,6 +29,8 @@ /**************************************************************************/ #include "openxr_api.h" + +#include "openxr_interface.h" #include "openxr_util.h" #include "core/config/engine.h" @@ -40,10 +42,6 @@ #include "editor/editor_settings.h" #endif -#ifdef ANDROID_ENABLED -#define OPENXR_LOADER_NAME "libopenxr_loader.so" -#endif - // We need to have all the graphics API defines before the Vulkan or OpenGL // extensions are included, otherwise we'll only get one graphics API. #ifdef VULKAN_ENABLED @@ -65,6 +63,7 @@ #define GL3_PROTOTYPES 1 #include "thirdparty/glad/glad/gl.h" #include "thirdparty/glad/glad/glx.h" + #include <X11/Xlib.h> #endif // X11_ENABLED #endif // GLES_ENABLED @@ -81,7 +80,9 @@ #include "extensions/openxr_fb_display_refresh_rate_extension.h" #include "extensions/openxr_fb_passthrough_extension_wrapper.h" -#include "modules/openxr/openxr_interface.h" +#ifdef ANDROID_ENABLED +#define OPENXR_LOADER_NAME "libopenxr_loader.so" +#endif OpenXRAPI *OpenXRAPI::singleton = nullptr; Vector<OpenXRExtensionWrapper *> OpenXRAPI::registered_extension_wrappers; diff --git a/modules/openxr/openxr_api.h b/modules/openxr/openxr_api.h index 292e54228d..96af2bfc49 100644 --- a/modules/openxr/openxr_api.h +++ b/modules/openxr/openxr_api.h @@ -31,6 +31,11 @@ #ifndef OPENXR_API_H #define OPENXR_API_H +#include "action_map/openxr_action.h" +#include "extensions/openxr_composition_layer_provider.h" +#include "extensions/openxr_extension_wrapper.h" +#include "util.h" + #include "core/error/error_macros.h" #include "core/math/projection.h" #include "core/math/transform_3d.h" @@ -44,14 +49,8 @@ #include "servers/xr/xr_pose.h" #include "thirdparty/openxr/src/common/xr_linear.h" -#include <openxr/openxr.h> -#include "action_map/openxr_action.h" - -#include "extensions/openxr_composition_layer_provider.h" -#include "extensions/openxr_extension_wrapper.h" - -#include "util.h" +#include <openxr/openxr.h> // Note, OpenXR code that we wrote for our plugin makes use of C++20 notation for initializing structs which ensures zeroing out unspecified members. // Godot is currently restricted to C++17 which doesn't allow this notation. Make sure critical fields are set. diff --git a/modules/openxr/openxr_interface.h b/modules/openxr/openxr_interface.h index f36318530c..39cc68ae9b 100644 --- a/modules/openxr/openxr_interface.h +++ b/modules/openxr/openxr_interface.h @@ -31,13 +31,12 @@ #ifndef OPENXR_INTERFACE_H #define OPENXR_INTERFACE_H -#include "servers/xr/xr_interface.h" -#include "servers/xr/xr_positional_tracker.h" - #include "action_map/openxr_action_map.h" +#include "extensions/openxr_fb_passthrough_extension_wrapper.h" #include "openxr_api.h" -#include "extensions/openxr_fb_passthrough_extension_wrapper.h" +#include "servers/xr/xr_interface.h" +#include "servers/xr/xr_positional_tracker.h" // declare some default strings #define INTERACTION_PROFILE_NONE "/interaction_profiles/none" diff --git a/modules/openxr/openxr_util.cpp b/modules/openxr/openxr_util.cpp index 926e918390..0c5cdd7113 100644 --- a/modules/openxr/openxr_util.cpp +++ b/modules/openxr/openxr_util.cpp @@ -29,6 +29,7 @@ /**************************************************************************/ #include "openxr_util.h" + #include <openxr/openxr_reflection.h> #define XR_ENUM_CASE_STR(name, val) \ diff --git a/modules/openxr/openxr_util.h b/modules/openxr/openxr_util.h index 7e7a6a1880..8ad68c0b02 100644 --- a/modules/openxr/openxr_util.h +++ b/modules/openxr/openxr_util.h @@ -32,6 +32,7 @@ #define OPENXR_UTIL_H #include "core/string/ustring.h" + #include <openxr/openxr.h> class OpenXRUtil { diff --git a/modules/openxr/register_types.cpp b/modules/openxr/register_types.cpp index b7d239fc73..27b179a788 100644 --- a/modules/openxr/register_types.cpp +++ b/modules/openxr/register_types.cpp @@ -29,23 +29,15 @@ /**************************************************************************/ #include "register_types.h" -#include "core/config/project_settings.h" -#include "main/main.h" - -#include "openxr_interface.h" #include "action_map/openxr_action.h" #include "action_map/openxr_action_map.h" #include "action_map/openxr_action_set.h" #include "action_map/openxr_interaction_profile.h" #include "action_map/openxr_interaction_profile_meta_data.h" - +#include "openxr_interface.h" #include "scene/openxr_hand.h" -#ifdef ANDROID_ENABLED -#include "extensions/openxr_android_extension.h" -#endif - #include "extensions/openxr_composition_layer_depth_extension.h" #include "extensions/openxr_fb_display_refresh_rate_extension.h" #include "extensions/openxr_fb_passthrough_extension_wrapper.h" @@ -58,15 +50,26 @@ #include "extensions/openxr_pico_controller_extension.h" #include "extensions/openxr_wmr_controller_extension.h" +#ifdef TOOLS_ENABLED +#include "editor/openxr_editor_plugin.h" +#endif + +#ifdef ANDROID_ENABLED +#include "extensions/openxr_android_extension.h" +#endif + +#include "core/config/project_settings.h" +#include "main/main.h" + +#ifdef TOOLS_ENABLED +#include "editor/editor_node.h" +#endif + static OpenXRAPI *openxr_api = nullptr; static OpenXRInteractionProfileMetaData *openxr_interaction_profile_meta_data = nullptr; static Ref<OpenXRInterface> openxr_interface; #ifdef TOOLS_ENABLED - -#include "editor/editor_node.h" -#include "editor/openxr_editor_plugin.h" - static void _editor_init() { if (OpenXRAPI::openxr_is_enabled(false)) { // Only add our OpenXR action map editor if OpenXR is enabled for our project @@ -81,7 +84,6 @@ static void _editor_init() { EditorNode::get_singleton()->add_editor_plugin(openxr_plugin); } } - #endif void initialize_openxr_module(ModuleInitializationLevel p_level) { diff --git a/modules/openxr/scene/openxr_hand.cpp b/modules/openxr/scene/openxr_hand.cpp index e341d2b1d4..91571a556d 100644 --- a/modules/openxr/scene/openxr_hand.cpp +++ b/modules/openxr/scene/openxr_hand.cpp @@ -28,10 +28,11 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ +#include "openxr_hand.h" + #include "../extensions/openxr_hand_tracking_extension.h" #include "../openxr_api.h" -#include "openxr_hand.h" #include "scene/3d/skeleton_3d.h" #include "servers/xr_server.h" diff --git a/modules/openxr/scene/openxr_hand.h b/modules/openxr/scene/openxr_hand.h index e79cbe2cfe..7bec3959d8 100644 --- a/modules/openxr/scene/openxr_hand.h +++ b/modules/openxr/scene/openxr_hand.h @@ -34,6 +34,8 @@ #include "scene/3d/node_3d.h" #include "scene/3d/skeleton_3d.h" +#include <openxr/openxr.h> + class OpenXRAPI; class OpenXRHandTrackingExtension; diff --git a/modules/raycast/raycast_occlusion_cull.cpp b/modules/raycast/raycast_occlusion_cull.cpp index 8c03115f05..69fbf87483 100644 --- a/modules/raycast/raycast_occlusion_cull.cpp +++ b/modules/raycast/raycast_occlusion_cull.cpp @@ -29,6 +29,7 @@ /**************************************************************************/ #include "raycast_occlusion_cull.h" + #include "core/config/project_settings.h" #include "core/object/worker_thread_pool.h" #include "core/templates/local_vector.h" diff --git a/modules/raycast/static_raycaster_embree.cpp b/modules/raycast/static_raycaster_embree.cpp index b2e58812bd..f9076d30dd 100644 --- a/modules/raycast/static_raycaster_embree.cpp +++ b/modules/raycast/static_raycaster_embree.cpp @@ -28,10 +28,10 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifdef TOOLS_ENABLED - #include "static_raycaster_embree.h" +#ifdef TOOLS_ENABLED + #ifdef __SSE2__ #include <pmmintrin.h> #endif diff --git a/modules/regex/regex.cpp b/modules/regex/regex.cpp index 8d1e92b4e3..704c107f20 100644 --- a/modules/regex/regex.cpp +++ b/modules/regex/regex.cpp @@ -29,6 +29,7 @@ /**************************************************************************/ #include "regex.h" + #include "core/os/memory.h" extern "C" { diff --git a/modules/regex/regex.h b/modules/regex/regex.h index 2ed20c9b14..13476d69de 100644 --- a/modules/regex/regex.h +++ b/modules/regex/regex.h @@ -33,7 +33,7 @@ #include "core/object/ref_counted.h" #include "core/string/ustring.h" -#include "core/templates/rb_map.h" +#include "core/templates/hash_map.h" #include "core/templates/vector.h" #include "core/variant/array.h" #include "core/variant/dictionary.h" diff --git a/modules/regex/register_types.cpp b/modules/regex/register_types.cpp index 715e98a79a..9e3a296ce3 100644 --- a/modules/regex/register_types.cpp +++ b/modules/regex/register_types.cpp @@ -29,9 +29,11 @@ /**************************************************************************/ #include "register_types.h" -#include "core/object/class_db.h" + #include "regex.h" +#include "core/object/class_db.h" + void initialize_regex_module(ModuleInitializationLevel p_level) { if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) { return; diff --git a/modules/regex/tests/test_regex.h b/modules/regex/tests/test_regex.h index ac6192e373..6515d5d130 100644 --- a/modules/regex/tests/test_regex.h +++ b/modules/regex/tests/test_regex.h @@ -31,8 +31,9 @@ #ifndef TEST_REGEX_H #define TEST_REGEX_H +#include "../regex.h" + #include "core/string/ustring.h" -#include "modules/regex/regex.h" #include "tests/test_macros.h" diff --git a/modules/text_server_adv/icu_data/icudata_stub.cpp b/modules/text_server_adv/icu_data/icudata_stub.cpp index a6a9e1cc1d..86448b95bc 100644 --- a/modules/text_server_adv/icu_data/icudata_stub.cpp +++ b/modules/text_server_adv/icu_data/icudata_stub.cpp @@ -28,9 +28,9 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#include "unicode/udata.h" -#include "unicode/utypes.h" -#include "unicode/uversion.h" +#include <unicode/udata.h> +#include <unicode/utypes.h> +#include <unicode/uversion.h> typedef struct { uint16_t header_size; diff --git a/modules/text_server_adv/text_server_adv.cpp b/modules/text_server_adv/text_server_adv.cpp index 6231702e84..eb0cb54caf 100644 --- a/modules/text_server_adv/text_server_adv.cpp +++ b/modules/text_server_adv/text_server_adv.cpp @@ -66,10 +66,10 @@ using namespace godot; // Thirdparty headers. #ifdef MODULE_MSDFGEN_ENABLED -#include "core/ShapeDistanceFinder.h" -#include "core/contour-combiners.h" -#include "core/edge-selectors.h" -#include "msdfgen.h" +#include <core/ShapeDistanceFinder.h> +#include <core/contour-combiners.h> +#include <core/edge-selectors.h> +#include <msdfgen.h> #endif #ifdef MODULE_SVG_ENABLED diff --git a/modules/text_server_adv/text_server_adv.h b/modules/text_server_adv/text_server_adv.h index 74ba657604..aba727edaa 100644 --- a/modules/text_server_adv/text_server_adv.h +++ b/modules/text_server_adv/text_server_adv.h @@ -36,6 +36,8 @@ /* shaping and advanced font features support. */ /*************************************************************************/ +#include "script_iterator.h" + #ifdef GDEXTENSION // Headers for building as GDExtension plug-in. @@ -79,20 +81,17 @@ using namespace godot; #else // Headers for building as built-in module. -#include "servers/text/text_server_extension.h" - #include "core/extension/ext_wrappers.gen.inc" #include "core/object/worker_thread_pool.h" #include "core/templates/hash_map.h" #include "core/templates/rid_owner.h" #include "scene/resources/texture.h" +#include "servers/text/text_server_extension.h" #include "modules/modules_enabled.gen.h" // For freetype, msdfgen, svg. #endif -#include "script_iterator.h" - // Thirdparty headers. #include <unicode/ubidi.h> diff --git a/modules/text_server_adv/thorvg_svg_in_ot.cpp b/modules/text_server_adv/thorvg_svg_in_ot.cpp index 3e6a81c84e..c227f35561 100644 --- a/modules/text_server_adv/thorvg_svg_in_ot.cpp +++ b/modules/text_server_adv/thorvg_svg_in_ot.cpp @@ -55,9 +55,10 @@ using namespace godot; #ifdef MODULE_SVG_ENABLED #ifdef MODULE_FREETYPE_ENABLED -#include "thorvg_bounds_iterator.h" #include "thorvg_svg_in_ot.h" +#include "thorvg_bounds_iterator.h" + #include <freetype/otsvg.h> #include <ft2build.h> diff --git a/modules/text_server_fb/text_server_fb.cpp b/modules/text_server_fb/text_server_fb.cpp index b76214cf94..dc0a7df81a 100644 --- a/modules/text_server_fb/text_server_fb.cpp +++ b/modules/text_server_fb/text_server_fb.cpp @@ -59,10 +59,10 @@ using namespace godot; // Thirdparty headers. #ifdef MODULE_MSDFGEN_ENABLED -#include "core/ShapeDistanceFinder.h" -#include "core/contour-combiners.h" -#include "core/edge-selectors.h" -#include "msdfgen.h" +#include <core/ShapeDistanceFinder.h> +#include <core/contour-combiners.h> +#include <core/edge-selectors.h> +#include <msdfgen.h> #endif #ifdef MODULE_SVG_ENABLED diff --git a/modules/text_server_fb/text_server_fb.h b/modules/text_server_fb/text_server_fb.h index 8abcc41b2a..d81b50779e 100644 --- a/modules/text_server_fb/text_server_fb.h +++ b/modules/text_server_fb/text_server_fb.h @@ -79,13 +79,12 @@ using namespace godot; #else // Headers for building as built-in module. -#include "servers/text/text_server_extension.h" - #include "core/extension/ext_wrappers.gen.inc" #include "core/object/worker_thread_pool.h" #include "core/templates/hash_map.h" #include "core/templates/rid_owner.h" #include "scene/resources/texture.h" +#include "servers/text/text_server_extension.h" #include "modules/modules_enabled.gen.h" // For freetype, msdfgen, svg. diff --git a/modules/text_server_fb/thorvg_svg_in_ot.cpp b/modules/text_server_fb/thorvg_svg_in_ot.cpp index 4c781a5c85..cd0ecd9b90 100644 --- a/modules/text_server_fb/thorvg_svg_in_ot.cpp +++ b/modules/text_server_fb/thorvg_svg_in_ot.cpp @@ -55,9 +55,10 @@ using namespace godot; #ifdef MODULE_SVG_ENABLED #ifdef MODULE_FREETYPE_ENABLED -#include "thorvg_bounds_iterator.h" #include "thorvg_svg_in_ot.h" +#include "thorvg_bounds_iterator.h" + #include <freetype/otsvg.h> #include <ft2build.h> diff --git a/modules/tinyexr/image_saver_tinyexr.cpp b/modules/tinyexr/image_saver_tinyexr.cpp index 315de9b268..31c1e06dee 100644 --- a/modules/tinyexr/image_saver_tinyexr.cpp +++ b/modules/tinyexr/image_saver_tinyexr.cpp @@ -29,6 +29,7 @@ /**************************************************************************/ #include "image_saver_tinyexr.h" + #include "core/math/math_funcs.h" #include <zlib.h> // Should come before including tinyexr. diff --git a/modules/upnp/register_types.cpp b/modules/upnp/register_types.cpp index e8b92964fb..f6a34837a2 100644 --- a/modules/upnp/register_types.cpp +++ b/modules/upnp/register_types.cpp @@ -30,11 +30,11 @@ #include "register_types.h" -#include "core/error/error_macros.h" - #include "upnp.h" #include "upnp_device.h" +#include "core/error/error_macros.h" + void initialize_upnp_module(ModuleInitializationLevel p_level) { if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) { return; diff --git a/modules/upnp/upnp.h b/modules/upnp/upnp.h index 2975e1474e..dc9bbdbc22 100644 --- a/modules/upnp/upnp.h +++ b/modules/upnp/upnp.h @@ -31,10 +31,10 @@ #ifndef UPNP_H #define UPNP_H -#include "core/object/ref_counted.h" - #include "upnp_device.h" +#include "core/object/ref_counted.h" + #include <miniupnpc.h> class UPNP : public RefCounted { diff --git a/modules/vhacd/register_types.cpp b/modules/vhacd/register_types.cpp index 088f03ebe8..d0b35ef0d6 100644 --- a/modules/vhacd/register_types.cpp +++ b/modules/vhacd/register_types.cpp @@ -29,7 +29,9 @@ /**************************************************************************/ #include "register_types.h" + #include "scene/resources/mesh.h" + #include "thirdparty/vhacd/public/VHACD.h" static Vector<Vector<Vector3>> convex_decompose(const real_t *p_vertices, int p_vertex_count, const uint32_t *p_triangles, int p_triangle_count, const Ref<MeshConvexDecompositionSettings> &p_settings, Vector<Vector<uint32_t>> *r_convex_indices) { diff --git a/modules/vorbis/resource_importer_ogg_vorbis.cpp b/modules/vorbis/resource_importer_ogg_vorbis.cpp index 9e280de0ca..8392750798 100644 --- a/modules/vorbis/resource_importer_ogg_vorbis.cpp +++ b/modules/vorbis/resource_importer_ogg_vorbis.cpp @@ -34,13 +34,13 @@ #include "core/io/resource_saver.h" #include "scene/resources/texture.h" -#include <ogg/ogg.h> -#include <vorbis/codec.h> - #ifdef TOOLS_ENABLED #include "editor/import/audio_stream_import_settings.h" #endif +#include <ogg/ogg.h> +#include <vorbis/codec.h> + String ResourceImporterOggVorbis::get_importer_name() const { return "oggvorbisstr"; } diff --git a/modules/vorbis/resource_importer_ogg_vorbis.h b/modules/vorbis/resource_importer_ogg_vorbis.h index e7ca41011a..4874419834 100644 --- a/modules/vorbis/resource_importer_ogg_vorbis.h +++ b/modules/vorbis/resource_importer_ogg_vorbis.h @@ -32,6 +32,7 @@ #define RESOURCE_IMPORTER_OGG_VORBIS_H #include "audio_stream_ogg_vorbis.h" + #include "core/io/resource_importer.h" class ResourceImporterOggVorbis : public ResourceImporter { diff --git a/modules/webp/image_loader_webp.cpp b/modules/webp/image_loader_webp.cpp index b8460fe387..c3aa860589 100644 --- a/modules/webp/image_loader_webp.cpp +++ b/modules/webp/image_loader_webp.cpp @@ -30,16 +30,18 @@ #include "image_loader_webp.h" +#include "webp_common.h" + #include "core/config/project_settings.h" #include "core/io/marshalls.h" #include "core/os/os.h" #include "core/string/print_string.h" -#include "webp_common.h" -#include <stdlib.h> #include <webp/decode.h> #include <webp/encode.h> +#include <stdlib.h> + static Ref<Image> _webp_mem_loader_func(const uint8_t *p_webp_data, int p_size) { Ref<Image> img; img.instantiate(); diff --git a/modules/webp/resource_saver_webp.cpp b/modules/webp/resource_saver_webp.cpp index 2f09ab7964..92285e2eab 100644 --- a/modules/webp/resource_saver_webp.cpp +++ b/modules/webp/resource_saver_webp.cpp @@ -30,10 +30,11 @@ #include "resource_saver_webp.h" +#include "webp_common.h" + #include "core/io/file_access.h" #include "core/io/image.h" #include "scene/resources/texture.h" -#include "webp_common.h" Error ResourceSaverWebP::save(const Ref<Resource> &p_resource, const String &p_path, uint32_t p_flags) { Ref<ImageTexture> texture = p_resource; diff --git a/modules/webp/webp_common.cpp b/modules/webp/webp_common.cpp index eb9403dcc2..60cb0091e1 100644 --- a/modules/webp/webp_common.cpp +++ b/modules/webp/webp_common.cpp @@ -33,10 +33,11 @@ #include "core/config/project_settings.h" #include "core/os/os.h" -#include <string.h> #include <webp/decode.h> #include <webp/encode.h> +#include <string.h> + namespace WebPCommon { Vector<uint8_t> _webp_lossy_pack(const Ref<Image> &p_image, float p_quality) { ERR_FAIL_COND_V(p_image.is_null() || p_image->is_empty(), Vector<uint8_t>()); diff --git a/modules/webrtc/register_types.cpp b/modules/webrtc/register_types.cpp index 93db5eb709..687c7b711e 100644 --- a/modules/webrtc/register_types.cpp +++ b/modules/webrtc/register_types.cpp @@ -29,14 +29,15 @@ /**************************************************************************/ #include "register_types.h" -#include "core/config/project_settings.h" + #include "webrtc_data_channel.h" +#include "webrtc_data_channel_extension.h" #include "webrtc_multiplayer_peer.h" #include "webrtc_peer_connection.h" - -#include "webrtc_data_channel_extension.h" #include "webrtc_peer_connection_extension.h" +#include "core/config/project_settings.h" + void initialize_webrtc_module(ModuleInitializationLevel p_level) { if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) { return; diff --git a/modules/webrtc/webrtc_data_channel.cpp b/modules/webrtc/webrtc_data_channel.cpp index 71cbd27387..bebf5c2741 100644 --- a/modules/webrtc/webrtc_data_channel.cpp +++ b/modules/webrtc/webrtc_data_channel.cpp @@ -29,6 +29,7 @@ /**************************************************************************/ #include "webrtc_data_channel.h" + #include "core/config/project_settings.h" void WebRTCDataChannel::_bind_methods() { diff --git a/modules/webrtc/webrtc_data_channel_js.cpp b/modules/webrtc/webrtc_data_channel_js.cpp index 22d528a471..f037e35107 100644 --- a/modules/webrtc/webrtc_data_channel_js.cpp +++ b/modules/webrtc/webrtc_data_channel_js.cpp @@ -28,11 +28,11 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifdef WEB_ENABLED - #include "webrtc_data_channel_js.h" -#include "emscripten.h" +#ifdef WEB_ENABLED + +#include <emscripten.h> extern "C" { typedef void (*RTCChOnOpen)(void *p_obj); diff --git a/modules/webrtc/webrtc_multiplayer_peer.h b/modules/webrtc/webrtc_multiplayer_peer.h index 95668f4f8c..d7f4874246 100644 --- a/modules/webrtc/webrtc_multiplayer_peer.h +++ b/modules/webrtc/webrtc_multiplayer_peer.h @@ -31,9 +31,10 @@ #ifndef WEBRTC_MULTIPLAYER_PEER_H #define WEBRTC_MULTIPLAYER_PEER_H -#include "scene/main/multiplayer_peer.h" #include "webrtc_peer_connection.h" +#include "scene/main/multiplayer_peer.h" + class WebRTCMultiplayerPeer : public MultiplayerPeer { GDCLASS(WebRTCMultiplayerPeer, MultiplayerPeer); diff --git a/modules/webrtc/webrtc_peer_connection.h b/modules/webrtc/webrtc_peer_connection.h index 2f8ed8b1ed..0f79c17519 100644 --- a/modules/webrtc/webrtc_peer_connection.h +++ b/modules/webrtc/webrtc_peer_connection.h @@ -31,8 +31,9 @@ #ifndef WEBRTC_PEER_CONNECTION_H #define WEBRTC_PEER_CONNECTION_H +#include "webrtc_data_channel.h" + #include "core/io/packet_peer.h" -#include "modules/webrtc/webrtc_data_channel.h" class WebRTCPeerConnection : public RefCounted { GDCLASS(WebRTCPeerConnection, RefCounted); diff --git a/modules/webrtc/webrtc_peer_connection_js.cpp b/modules/webrtc/webrtc_peer_connection_js.cpp index f979a20367..26256a4e30 100644 --- a/modules/webrtc/webrtc_peer_connection_js.cpp +++ b/modules/webrtc/webrtc_peer_connection_js.cpp @@ -28,13 +28,13 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifdef WEB_ENABLED - #include "webrtc_peer_connection_js.h" +#ifdef WEB_ENABLED + #include "webrtc_data_channel_js.h" -#include "emscripten.h" +#include <emscripten.h> void WebRTCPeerConnectionJS::_on_ice_candidate(void *p_obj, const char *p_mid_name, int p_mline_idx, const char *p_candidate) { WebRTCPeerConnectionJS *peer = static_cast<WebRTCPeerConnectionJS *>(p_obj); diff --git a/modules/websocket/editor/editor_debugger_server_websocket.cpp b/modules/websocket/editor/editor_debugger_server_websocket.cpp index 35fc051bc3..a28fc53440 100644 --- a/modules/websocket/editor/editor_debugger_server_websocket.cpp +++ b/modules/websocket/editor/editor_debugger_server_websocket.cpp @@ -33,6 +33,7 @@ #ifdef TOOLS_ENABLED #include "../remote_debugger_peer_websocket.h" + #include "core/config/project_settings.h" #include "editor/editor_log.h" #include "editor/editor_node.h" diff --git a/modules/websocket/emws_peer.cpp b/modules/websocket/emws_peer.cpp index 7b14a3a61d..329e5bd532 100644 --- a/modules/websocket/emws_peer.cpp +++ b/modules/websocket/emws_peer.cpp @@ -28,10 +28,10 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifdef WEB_ENABLED - #include "emws_peer.h" +#ifdef WEB_ENABLED + #include "core/io/ip.h" void EMWSPeer::_esws_on_connect(void *p_obj, char *p_proto) { diff --git a/modules/websocket/emws_peer.h b/modules/websocket/emws_peer.h index 08b2dad977..38f15c82e5 100644 --- a/modules/websocket/emws_peer.h +++ b/modules/websocket/emws_peer.h @@ -33,12 +33,14 @@ #ifdef WEB_ENABLED +#include "packet_buffer.h" +#include "websocket_peer.h" + #include "core/error/error_list.h" #include "core/io/packet_peer.h" #include "core/templates/ring_buffer.h" -#include "emscripten.h" -#include "packet_buffer.h" -#include "websocket_peer.h" + +#include <emscripten.h> extern "C" { typedef void (*WSOnOpen)(void *p_ref, char *p_protocol); diff --git a/modules/websocket/register_types.cpp b/modules/websocket/register_types.cpp index 08935626d0..c57210c8c9 100644 --- a/modules/websocket/register_types.cpp +++ b/modules/websocket/register_types.cpp @@ -30,15 +30,10 @@ #include "register_types.h" -#include "core/config/project_settings.h" -#include "core/debugger/engine_debugger.h" -#include "core/error/error_macros.h" - +#include "remote_debugger_peer_websocket.h" #include "websocket_multiplayer_peer.h" #include "websocket_peer.h" -#include "remote_debugger_peer_websocket.h" - #ifdef WEB_ENABLED #include "emws_peer.h" #else @@ -46,8 +41,15 @@ #endif #ifdef TOOLS_ENABLED -#include "editor/debugger/editor_debugger_server.h" #include "editor/editor_debugger_server_websocket.h" +#endif + +#include "core/config/project_settings.h" +#include "core/debugger/engine_debugger.h" +#include "core/error/error_macros.h" + +#ifdef TOOLS_ENABLED +#include "editor/debugger/editor_debugger_server.h" #include "editor/editor_node.h" #endif diff --git a/modules/websocket/remote_debugger_peer_websocket.h b/modules/websocket/remote_debugger_peer_websocket.h index 5d26e076c7..50d0d28203 100644 --- a/modules/websocket/remote_debugger_peer_websocket.h +++ b/modules/websocket/remote_debugger_peer_websocket.h @@ -31,10 +31,10 @@ #ifndef REMOTE_DEBUGGER_PEER_WEBSOCKET_H #define REMOTE_DEBUGGER_PEER_WEBSOCKET_H -#include "core/debugger/remote_debugger_peer.h" - #include "websocket_peer.h" +#include "core/debugger/remote_debugger_peer.h" + class RemoteDebuggerPeerWebSocket : public RemoteDebuggerPeer { Ref<WebSocketPeer> ws_peer; List<Array> in_queue; diff --git a/modules/websocket/websocket_multiplayer_peer.h b/modules/websocket/websocket_multiplayer_peer.h index 22f1bc939b..f793cb375e 100644 --- a/modules/websocket/websocket_multiplayer_peer.h +++ b/modules/websocket/websocket_multiplayer_peer.h @@ -31,12 +31,13 @@ #ifndef WEBSOCKET_MULTIPLAYER_PEER_H #define WEBSOCKET_MULTIPLAYER_PEER_H +#include "websocket_peer.h" + #include "core/error/error_list.h" #include "core/io/stream_peer_tls.h" #include "core/io/tcp_server.h" #include "core/templates/list.h" #include "scene/main/multiplayer_peer.h" -#include "websocket_peer.h" class WebSocketMultiplayerPeer : public MultiplayerPeer { GDCLASS(WebSocketMultiplayerPeer, MultiplayerPeer); diff --git a/modules/websocket/wsl_peer.cpp b/modules/websocket/wsl_peer.cpp index 109d5102c3..a127a6b75a 100644 --- a/modules/websocket/wsl_peer.cpp +++ b/modules/websocket/wsl_peer.cpp @@ -28,11 +28,9 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef WEB_ENABLED - #include "wsl_peer.h" -#include "wsl_peer.h" +#ifndef WEB_ENABLED #include "core/io/stream_peer_tls.h" diff --git a/modules/websocket/wsl_peer.h b/modules/websocket/wsl_peer.h index c06e768b6d..bf9f5c8527 100644 --- a/modules/websocket/wsl_peer.h +++ b/modules/websocket/wsl_peer.h @@ -33,16 +33,16 @@ #ifndef WEB_ENABLED -#include "websocket_peer.h" - #include "packet_buffer.h" +#include "websocket_peer.h" #include "core/crypto/crypto_core.h" #include "core/error/error_list.h" #include "core/io/packet_peer.h" #include "core/io/stream_peer_tcp.h" #include "core/templates/ring_buffer.h" -#include "wslay/wslay.h" + +#include <wslay/wslay.h> #define WSL_MAX_HEADER_SIZE 4096 diff --git a/modules/webxr/godot_webxr.h b/modules/webxr/godot_webxr.h index 554ca0398b..a7ce7e45d2 100644 --- a/modules/webxr/godot_webxr.h +++ b/modules/webxr/godot_webxr.h @@ -35,7 +35,7 @@ extern "C" { #endif -#include "stddef.h" +#include <stddef.h> enum WebXRInputEvent { WEBXR_INPUT_EVENT_SELECTSTART, diff --git a/modules/webxr/webxr_interface.cpp b/modules/webxr/webxr_interface.cpp index 5e30d0c996..85ed9f472e 100644 --- a/modules/webxr/webxr_interface.cpp +++ b/modules/webxr/webxr_interface.cpp @@ -29,6 +29,7 @@ /**************************************************************************/ #include "webxr_interface.h" + #include <stdlib.h> void WebXRInterface::_bind_methods() { diff --git a/modules/webxr/webxr_interface_js.cpp b/modules/webxr/webxr_interface_js.cpp index e1df2ea94e..47f20ce1a3 100644 --- a/modules/webxr/webxr_interface_js.cpp +++ b/modules/webxr/webxr_interface_js.cpp @@ -28,20 +28,21 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ +#include "webxr_interface_js.h" + #ifdef WEB_ENABLED -#include "webxr_interface_js.h" +#include "godot_webxr.h" #include "core/input/input.h" #include "core/os/os.h" #include "drivers/gles3/storage/texture_storage.h" -#include "emscripten.h" -#include "godot_webxr.h" #include "scene/main/scene_tree.h" #include "scene/main/window.h" #include "servers/rendering/renderer_compositor.h" #include "servers/rendering/rendering_server_globals.h" +#include <emscripten.h> #include <stdlib.h> void _emwebxr_on_session_supported(char *p_session_mode, int p_supported) { diff --git a/modules/xatlas_unwrap/register_types.cpp b/modules/xatlas_unwrap/register_types.cpp index c3da058b1d..e5da9b3a4f 100644 --- a/modules/xatlas_unwrap/register_types.cpp +++ b/modules/xatlas_unwrap/register_types.cpp @@ -29,8 +29,10 @@ /**************************************************************************/ #include "register_types.h" + #include "core/crypto/crypto_core.h" -#include "thirdparty/xatlas/xatlas.h" + +#include <xatlas.h> extern bool (*array_mesh_lightmap_unwrap_callback)(float p_texel_size, const float *p_vertices, const float *p_normals, int p_vertex_count, const int *p_indices, int p_index_count, const uint8_t *p_cache_data, bool *r_use_cache, uint8_t **r_mesh_cache, int *r_mesh_cache_size, float **r_uv, int **r_vertex, int *r_vertex_count, int **r_index, int *r_index_count, int *r_size_hint_x, int *r_size_hint_y); diff --git a/modules/zip/register_types.cpp b/modules/zip/register_types.cpp index 2df72d0cda..b2da90826e 100644 --- a/modules/zip/register_types.cpp +++ b/modules/zip/register_types.cpp @@ -30,10 +30,11 @@ #include "register_types.h" -#include "core/object/class_db.h" #include "zip_packer.h" #include "zip_reader.h" +#include "core/object/class_db.h" + void initialize_zip_module(ModuleInitializationLevel p_level) { if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) { return; |