Browse Source

Merge pull request #75944 from akien-mga/style-modules-includes

Style: Harmonize header includes in modules
Rémi Verschelde 2 years ago
parent
commit
3b4504afea
100 changed files with 305 additions and 209 deletions
  1. 2 2
      modules/basis_universal/register_types.cpp
  2. 1 0
      modules/camera/camera_macos.mm
  3. 2 2
      modules/csg/csg_shape.h
  4. 1 0
      modules/csg/editor/csg_gizmos.h
  5. 1 1
      modules/cvtt/register_types.cpp
  6. 3 1
      modules/denoise/denoise_wrapper.cpp
  7. 1 0
      modules/denoise/lightmap_denoiser.cpp
  8. 3 1
      modules/denoise/register_types.cpp
  9. 2 2
      modules/enet/enet_connection.h
  10. 1 0
      modules/enet/enet_multiplayer_peer.cpp
  11. 2 1
      modules/enet/enet_multiplayer_peer.h
  12. 3 1
      modules/enet/register_types.cpp
  13. 0 2
      modules/etcpak/register_types.h
  14. 1 0
      modules/gdscript/editor/gdscript_docgen.cpp
  15. 1 0
      modules/gdscript/editor/gdscript_docgen.h
  16. 2 0
      modules/gdscript/editor/gdscript_highlighter.cpp
  17. 2 1
      modules/gdscript/editor/gdscript_translation_parser_plugin.cpp
  18. 2 1
      modules/gdscript/editor/gdscript_translation_parser_plugin.h
  19. 14 10
      modules/gdscript/gdscript.cpp
  20. 2 1
      modules/gdscript/gdscript.h
  21. 3 2
      modules/gdscript/gdscript_analyzer.cpp
  22. 3 2
      modules/gdscript/gdscript_analyzer.h
  23. 2 1
      modules/gdscript/gdscript_byte_codegen.cpp
  24. 0 1
      modules/gdscript/gdscript_byte_codegen.h
  25. 3 2
      modules/gdscript/gdscript_cache.cpp
  26. 2 1
      modules/gdscript/gdscript_cache.h
  27. 3 2
      modules/gdscript/gdscript_codegen.h
  28. 2 1
      modules/gdscript/gdscript_compiler.h
  29. 2 2
      modules/gdscript/gdscript_disassembler.cpp
  30. 8 4
      modules/gdscript/gdscript_editor.cpp
  31. 2 1
      modules/gdscript/gdscript_function.h
  32. 2 1
      modules/gdscript/gdscript_lambda_callable.cpp
  33. 8 4
      modules/gdscript/gdscript_parser.cpp
  34. 8 4
      modules/gdscript/gdscript_parser.h
  35. 4 3
      modules/gdscript/gdscript_tokenizer.cpp
  36. 2 1
      modules/gdscript/gdscript_utility_functions.cpp
  37. 2 2
      modules/gdscript/gdscript_vm.cpp
  38. 2 1
      modules/gdscript/language_server/gdscript_extend_parser.h
  39. 4 3
      modules/gdscript/language_server/gdscript_language_protocol.h
  40. 2 1
      modules/gdscript/language_server/gdscript_language_server.h
  41. 3 2
      modules/gdscript/language_server/gdscript_text_document.cpp
  42. 2 1
      modules/gdscript/language_server/gdscript_text_document.h
  43. 2 1
      modules/gdscript/language_server/gdscript_workspace.cpp
  44. 3 2
      modules/gdscript/language_server/gdscript_workspace.h
  45. 26 14
      modules/gdscript/register_types.cpp
  46. 1 0
      modules/gdscript/tests/gdscript_test_runner.h
  47. 1 0
      modules/gdscript/tests/gdscript_test_runner_suite.h
  48. 5 5
      modules/gdscript/tests/test_gdscript.cpp
  49. 1 0
      modules/gdscript/tests/test_gdscript.h
  50. 2 2
      modules/glslang/register_types.cpp
  51. 2 2
      modules/gltf/editor/editor_scene_exporter_gltf_plugin.cpp
  52. 2 1
      modules/gltf/editor/editor_scene_exporter_gltf_plugin.h
  53. 2 2
      modules/gltf/editor/editor_scene_importer_gltf.cpp
  54. 1 0
      modules/gltf/extensions/physics/gltf_collider.cpp
  55. 1 0
      modules/gltf/extensions/physics/gltf_collider.h
  56. 0 1
      modules/gltf/extensions/physics/gltf_document_extension_physics.h
  57. 3 2
      modules/gltf/register_types.cpp
  58. 1 0
      modules/gltf/structures/gltf_accessor.h
  59. 1 0
      modules/gltf/structures/gltf_buffer_view.h
  60. 1 0
      modules/gltf/structures/gltf_mesh.h
  61. 1 0
      modules/gltf/structures/gltf_node.h
  62. 1 0
      modules/gltf/structures/gltf_skeleton.cpp
  63. 1 0
      modules/gltf/structures/gltf_skeleton.h
  64. 1 0
      modules/gltf/structures/gltf_skin.cpp
  65. 1 0
      modules/gltf/structures/gltf_skin.h
  66. 1 0
      modules/gltf/structures/gltf_texture.h
  67. 1 0
      modules/gridmap/editor/grid_map_editor_plugin.h
  68. 2 1
      modules/gridmap/register_types.cpp
  69. 1 0
      modules/jpg/image_loader_jpegd.cpp
  70. 3 1
      modules/jsonrpc/register_types.cpp
  71. 3 2
      modules/lightmapper_rd/lightmapper_rd.cpp
  72. 2 1
      modules/lightmapper_rd/register_types.cpp
  73. 5 5
      modules/mbedtls/crypto_mbedtls.cpp
  74. 1 0
      modules/mbedtls/dtls_server_mbedtls.cpp
  75. 2 1
      modules/mbedtls/dtls_server_mbedtls.h
  76. 2 1
      modules/mbedtls/packet_peer_mbed_dtls.h
  77. 2 1
      modules/mbedtls/stream_peer_mbedtls.h
  78. 2 1
      modules/mbedtls/tests/test_crypto_mbedtls.cpp
  79. 0 1
      modules/mbedtls/tls_context_mbedtls.h
  80. 2 0
      modules/meshoptimizer/register_types.cpp
  81. 0 1
      modules/minimp3/audio_stream_mp3.cpp
  82. 1 1
      modules/minimp3/audio_stream_mp3.h
  83. 4 1
      modules/minimp3/register_types.cpp
  84. 1 0
      modules/minimp3/resource_importer_mp3.h
  85. 19 16
      modules/mono/csharp_script.cpp
  86. 3 3
      modules/mono/csharp_script.h
  87. 5 5
      modules/mono/editor/bindings_generator.cpp
  88. 5 4
      modules/mono/editor/bindings_generator.h
  89. 9 10
      modules/mono/editor/editor_internal_calls.cpp
  90. 3 3
      modules/mono/editor/hostfxr_resolver.cpp
  91. 7 8
      modules/mono/glue/runtime_interop.cpp
  92. 7 7
      modules/mono/godotsharp_dirs.cpp
  93. 2 2
      modules/mono/managed_callable.h
  94. 9 10
      modules/mono/mono_gd/gd_mono.cpp
  95. 2 2
      modules/mono/mono_gd/gd_mono.h
  96. 3 2
      modules/mono/mono_gd/gd_mono_cache.h
  97. 14 12
      modules/mono/mono_gd/support/android_support.cpp
  98. 3 3
      modules/mono/mono_gd/support/ios_support.mm
  99. 2 2
      modules/mono/register_types.cpp
  100. 2 2
      modules/mono/signal_awaiter_utils.h

+ 2 - 2
modules/basis_universal/register_types.cpp

@@ -33,12 +33,12 @@
 #include "core/os/os.h"
 #include "core/os/os.h"
 #include "servers/rendering_server.h"
 #include "servers/rendering_server.h"
 
 
+#include <transcoder/basisu_transcoder.h>
+
 #ifdef TOOLS_ENABLED
 #ifdef TOOLS_ENABLED
 #include <encoder/basisu_comp.h>
 #include <encoder/basisu_comp.h>
 #endif
 #endif
 
 
-#include <transcoder/basisu_transcoder.h>
-
 enum BasisDecompressFormat {
 enum BasisDecompressFormat {
 	BASIS_DECOMPRESS_RG,
 	BASIS_DECOMPRESS_RG,
 	BASIS_DECOMPRESS_RGB,
 	BASIS_DECOMPRESS_RGB,

+ 1 - 0
modules/camera/camera_macos.mm

@@ -32,6 +32,7 @@
 // If you fix something here, make sure you fix it there as well!
 // If you fix something here, make sure you fix it there as well!
 
 
 #include "camera_macos.h"
 #include "camera_macos.h"
+
 #include "servers/camera/camera_feed.h"
 #include "servers/camera/camera_feed.h"
 
 
 #import <AVFoundation/AVFoundation.h>
 #import <AVFoundation/AVFoundation.h>

+ 2 - 2
modules/csg/csg_shape.h

@@ -31,12 +31,12 @@
 #ifndef CSG_SHAPE_H
 #ifndef CSG_SHAPE_H
 #define CSG_SHAPE_H
 #define CSG_SHAPE_H
 
 
-#define CSGJS_HEADER_ONLY
-
 #include "csg.h"
 #include "csg.h"
+
 #include "scene/3d/path_3d.h"
 #include "scene/3d/path_3d.h"
 #include "scene/3d/visual_instance_3d.h"
 #include "scene/3d/visual_instance_3d.h"
 #include "scene/resources/concave_polygon_shape_3d.h"
 #include "scene/resources/concave_polygon_shape_3d.h"
+
 #include "thirdparty/misc/mikktspace.h"
 #include "thirdparty/misc/mikktspace.h"
 
 
 class CSGShape3D : public GeometryInstance3D {
 class CSGShape3D : public GeometryInstance3D {

+ 1 - 0
modules/csg/editor/csg_gizmos.h

@@ -34,6 +34,7 @@
 #ifdef TOOLS_ENABLED
 #ifdef TOOLS_ENABLED
 
 
 #include "../csg_shape.h"
 #include "../csg_shape.h"
+
 #include "editor/editor_plugin.h"
 #include "editor/editor_plugin.h"
 #include "editor/plugins/node_3d_editor_gizmos.h"
 #include "editor/plugins/node_3d_editor_gizmos.h"
 
 

+ 1 - 1
modules/cvtt/register_types.cpp

@@ -49,4 +49,4 @@ void uninitialize_cvtt_module(ModuleInitializationLevel p_level) {
 	}
 	}
 }
 }
 
 
-#endif
+#endif // TOOLS_ENABLED

+ 3 - 1
modules/denoise/denoise_wrapper.cpp

@@ -29,7 +29,9 @@
 /**************************************************************************/
 /**************************************************************************/
 
 
 #include "denoise_wrapper.h"
 #include "denoise_wrapper.h"
-#include "thirdparty/oidn/include/OpenImageDenoise/oidn.h"
+
+#include <OpenImageDenoise/oidn.h>
+
 #include <stdio.h>
 #include <stdio.h>
 
 
 void *oidn_denoiser_init() {
 void *oidn_denoiser_init() {

+ 1 - 0
modules/denoise/lightmap_denoiser.cpp

@@ -29,6 +29,7 @@
 /**************************************************************************/
 /**************************************************************************/
 
 
 #include "lightmap_denoiser.h"
 #include "lightmap_denoiser.h"
+
 #include "denoise_wrapper.h"
 #include "denoise_wrapper.h"
 
 
 #include "core/io/image.h"
 #include "core/io/image.h"

+ 3 - 1
modules/denoise/register_types.cpp

@@ -29,9 +29,11 @@
 /**************************************************************************/
 /**************************************************************************/
 
 
 #include "register_types.h"
 #include "register_types.h"
-#include "core/config/engine.h"
+
 #include "lightmap_denoiser.h"
 #include "lightmap_denoiser.h"
 
 
+#include "core/config/engine.h"
+
 void initialize_denoise_module(ModuleInitializationLevel p_level) {
 void initialize_denoise_module(ModuleInitializationLevel p_level) {
 	if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) {
 	if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) {
 		return;
 		return;

+ 2 - 2
modules/enet/enet_connection.h

@@ -31,10 +31,10 @@
 #ifndef ENET_CONNECTION_H
 #ifndef ENET_CONNECTION_H
 #define ENET_CONNECTION_H
 #define ENET_CONNECTION_H
 
 
-#include "core/object/ref_counted.h"
+#include "enet_packet_peer.h"
 
 
 #include "core/crypto/crypto.h"
 #include "core/crypto/crypto.h"
-#include "enet_packet_peer.h"
+#include "core/object/ref_counted.h"
 
 
 #include <enet/enet.h>
 #include <enet/enet.h>
 
 

+ 1 - 0
modules/enet/enet_multiplayer_peer.cpp

@@ -29,6 +29,7 @@
 /**************************************************************************/
 /**************************************************************************/
 
 
 #include "enet_multiplayer_peer.h"
 #include "enet_multiplayer_peer.h"
+
 #include "core/io/ip.h"
 #include "core/io/ip.h"
 #include "core/io/marshalls.h"
 #include "core/io/marshalls.h"
 #include "core/os/os.h"
 #include "core/os/os.h"

+ 2 - 1
modules/enet/enet_multiplayer_peer.h

@@ -31,10 +31,11 @@
 #ifndef ENET_MULTIPLAYER_PEER_H
 #ifndef ENET_MULTIPLAYER_PEER_H
 #define ENET_MULTIPLAYER_PEER_H
 #define ENET_MULTIPLAYER_PEER_H
 
 
+#include "enet_connection.h"
+
 #include "core/crypto/crypto.h"
 #include "core/crypto/crypto.h"
 #include "scene/main/multiplayer_peer.h"
 #include "scene/main/multiplayer_peer.h"
 
 
-#include "enet_connection.h"
 #include <enet/enet.h>
 #include <enet/enet.h>
 
 
 class ENetMultiplayerPeer : public MultiplayerPeer {
 class ENetMultiplayerPeer : public MultiplayerPeer {

+ 3 - 1
modules/enet/register_types.cpp

@@ -29,11 +29,13 @@
 /**************************************************************************/
 /**************************************************************************/
 
 
 #include "register_types.h"
 #include "register_types.h"
-#include "core/error/error_macros.h"
+
 #include "enet_connection.h"
 #include "enet_connection.h"
 #include "enet_multiplayer_peer.h"
 #include "enet_multiplayer_peer.h"
 #include "enet_packet_peer.h"
 #include "enet_packet_peer.h"
 
 
+#include "core/error/error_macros.h"
+
 static bool enet_ok = false;
 static bool enet_ok = false;
 
 
 void initialize_enet_module(ModuleInitializationLevel p_level) {
 void initialize_enet_module(ModuleInitializationLevel p_level) {

+ 0 - 2
modules/etcpak/register_types.h

@@ -33,8 +33,6 @@
 
 
 #include "modules/register_module_types.h"
 #include "modules/register_module_types.h"
 
 
-#include "modules/register_module_types.h"
-
 void initialize_etcpak_module(ModuleInitializationLevel p_level);
 void initialize_etcpak_module(ModuleInitializationLevel p_level);
 void uninitialize_etcpak_module(ModuleInitializationLevel p_level);
 void uninitialize_etcpak_module(ModuleInitializationLevel p_level);
 
 

+ 1 - 0
modules/gdscript/editor/gdscript_docgen.cpp

@@ -29,6 +29,7 @@
 /**************************************************************************/
 /**************************************************************************/
 
 
 #include "gdscript_docgen.h"
 #include "gdscript_docgen.h"
+
 #include "../gdscript.h"
 #include "../gdscript.h"
 
 
 using GDP = GDScriptParser;
 using GDP = GDScriptParser;

+ 1 - 0
modules/gdscript/editor/gdscript_docgen.h

@@ -32,6 +32,7 @@
 #define GDSCRIPT_DOCGEN_H
 #define GDSCRIPT_DOCGEN_H
 
 
 #include "../gdscript_parser.h"
 #include "../gdscript_parser.h"
+
 #include "core/doc_data.h"
 #include "core/doc_data.h"
 
 
 class GDScriptDocGen {
 class GDScriptDocGen {

+ 2 - 0
modules/gdscript/editor/gdscript_highlighter.cpp

@@ -29,8 +29,10 @@
 /**************************************************************************/
 /**************************************************************************/
 
 
 #include "gdscript_highlighter.h"
 #include "gdscript_highlighter.h"
+
 #include "../gdscript.h"
 #include "../gdscript.h"
 #include "../gdscript_tokenizer.h"
 #include "../gdscript_tokenizer.h"
+
 #include "core/config/project_settings.h"
 #include "core/config/project_settings.h"
 #include "editor/editor_settings.h"
 #include "editor/editor_settings.h"
 
 

+ 2 - 1
modules/gdscript/editor/gdscript_translation_parser_plugin.cpp

@@ -30,8 +30,9 @@
 
 
 #include "gdscript_translation_parser_plugin.h"
 #include "gdscript_translation_parser_plugin.h"
 
 
+#include "../gdscript.h"
+
 #include "core/io/resource_loader.h"
 #include "core/io/resource_loader.h"
-#include "modules/gdscript/gdscript.h"
 
 
 void GDScriptEditorTranslationParserPlugin::get_recognized_extensions(List<String> *r_extensions) const {
 void GDScriptEditorTranslationParserPlugin::get_recognized_extensions(List<String> *r_extensions) const {
 	GDScriptLanguage::get_singleton()->get_recognized_extensions(r_extensions);
 	GDScriptLanguage::get_singleton()->get_recognized_extensions(r_extensions);

+ 2 - 1
modules/gdscript/editor/gdscript_translation_parser_plugin.h

@@ -31,9 +31,10 @@
 #ifndef GDSCRIPT_TRANSLATION_PARSER_PLUGIN_H
 #ifndef GDSCRIPT_TRANSLATION_PARSER_PLUGIN_H
 #define GDSCRIPT_TRANSLATION_PARSER_PLUGIN_H
 #define GDSCRIPT_TRANSLATION_PARSER_PLUGIN_H
 
 
+#include "../gdscript_parser.h"
+
 #include "core/templates/hash_set.h"
 #include "core/templates/hash_set.h"
 #include "editor/editor_translation_parser.h"
 #include "editor/editor_translation_parser.h"
-#include "modules/gdscript/gdscript_parser.h"
 
 
 class GDScriptEditorTranslationParserPlugin : public EditorTranslationParserPlugin {
 class GDScriptEditorTranslationParserPlugin : public EditorTranslationParserPlugin {
 	GDCLASS(GDScriptEditorTranslationParserPlugin, EditorTranslationParserPlugin);
 	GDCLASS(GDScriptEditorTranslationParserPlugin, EditorTranslationParserPlugin);

+ 14 - 10
modules/gdscript/gdscript.cpp

@@ -30,15 +30,6 @@
 
 
 #include "gdscript.h"
 #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_analyzer.h"
 #include "gdscript_cache.h"
 #include "gdscript_cache.h"
 #include "gdscript_compiler.h"
 #include "gdscript_compiler.h"
@@ -46,15 +37,28 @@
 #include "gdscript_rpc_callable.h"
 #include "gdscript_rpc_callable.h"
 #include "gdscript_warning.h"
 #include "gdscript_warning.h"
 
 
+#ifdef TOOLS_ENABLED
+#include "editor/gdscript_docgen.h"
+#endif
+
 #ifdef TESTS_ENABLED
 #ifdef TESTS_ENABLED
 #include "tests/gdscript_test_runner.h"
 #include "tests/gdscript_test_runner.h"
 #endif
 #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
 #ifdef TOOLS_ENABLED
 #include "editor/editor_paths.h"
 #include "editor/editor_paths.h"
-#include "editor/gdscript_docgen.h"
 #endif
 #endif
 
 
+#include <stdint.h>
+
 ///////////////////////////
 ///////////////////////////
 
 
 GDScriptNativeClass::GDScriptNativeClass(const StringName &p_name) {
 GDScriptNativeClass::GDScriptNativeClass(const StringName &p_name) {

+ 2 - 1
modules/gdscript/gdscript.h

@@ -31,6 +31,8 @@
 #ifndef GDSCRIPT_H
 #ifndef GDSCRIPT_H
 #define GDSCRIPT_H
 #define GDSCRIPT_H
 
 
+#include "gdscript_function.h"
+
 #include "core/debugger/engine_debugger.h"
 #include "core/debugger/engine_debugger.h"
 #include "core/debugger/script_debugger.h"
 #include "core/debugger/script_debugger.h"
 #include "core/doc_data.h"
 #include "core/doc_data.h"
@@ -38,7 +40,6 @@
 #include "core/io/resource_saver.h"
 #include "core/io/resource_saver.h"
 #include "core/object/script_language.h"
 #include "core/object/script_language.h"
 #include "core/templates/rb_set.h"
 #include "core/templates/rb_set.h"
-#include "gdscript_function.h"
 
 
 class GDScriptNativeClass : public RefCounted {
 class GDScriptNativeClass : public RefCounted {
 	GDCLASS(GDScriptNativeClass, RefCounted);
 	GDCLASS(GDScriptNativeClass, RefCounted);

+ 3 - 2
modules/gdscript/gdscript_analyzer.cpp

@@ -30,6 +30,9 @@
 
 
 #include "gdscript_analyzer.h"
 #include "gdscript_analyzer.h"
 
 
+#include "gdscript.h"
+#include "gdscript_utility_functions.h"
+
 #include "core/config/engine.h"
 #include "core/config/engine.h"
 #include "core/config/project_settings.h"
 #include "core/config/project_settings.h"
 #include "core/core_constants.h"
 #include "core/core_constants.h"
@@ -39,8 +42,6 @@
 #include "core/object/class_db.h"
 #include "core/object/class_db.h"
 #include "core/object/script_language.h"
 #include "core/object/script_language.h"
 #include "core/templates/hash_map.h"
 #include "core/templates/hash_map.h"
-#include "gdscript.h"
-#include "gdscript_utility_functions.h"
 #include "scene/resources/packed_scene.h"
 #include "scene/resources/packed_scene.h"
 
 
 #if defined(TOOLS_ENABLED) && !defined(DISABLE_DEPRECATED)
 #if defined(TOOLS_ENABLED) && !defined(DISABLE_DEPRECATED)

+ 3 - 2
modules/gdscript/gdscript_analyzer.h

@@ -31,11 +31,12 @@
 #ifndef GDSCRIPT_ANALYZER_H
 #ifndef GDSCRIPT_ANALYZER_H
 #define GDSCRIPT_ANALYZER_H
 #define GDSCRIPT_ANALYZER_H
 
 
+#include "gdscript_cache.h"
+#include "gdscript_parser.h"
+
 #include "core/object/object.h"
 #include "core/object/object.h"
 #include "core/object/ref_counted.h"
 #include "core/object/ref_counted.h"
 #include "core/templates/hash_set.h"
 #include "core/templates/hash_set.h"
-#include "gdscript_cache.h"
-#include "gdscript_parser.h"
 
 
 class GDScriptAnalyzer {
 class GDScriptAnalyzer {
 	GDScriptParser *parser = nullptr;
 	GDScriptParser *parser = nullptr;

+ 2 - 1
modules/gdscript/gdscript_byte_codegen.cpp

@@ -30,9 +30,10 @@
 
 
 #include "gdscript_byte_codegen.h"
 #include "gdscript_byte_codegen.h"
 
 
-#include "core/debugger/engine_debugger.h"
 #include "gdscript.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) {
 uint32_t GDScriptByteCodeGenerator::add_parameter(const StringName &p_name, bool p_is_optional, const GDScriptDataType &p_type) {
 #ifdef TOOLS_ENABLED
 #ifdef TOOLS_ENABLED
 	function->arg_names.push_back(p_name);
 	function->arg_names.push_back(p_name);

+ 0 - 1
modules/gdscript/gdscript_byte_codegen.h

@@ -32,7 +32,6 @@
 #define GDSCRIPT_BYTE_CODEGEN_H
 #define GDSCRIPT_BYTE_CODEGEN_H
 
 
 #include "gdscript_codegen.h"
 #include "gdscript_codegen.h"
-
 #include "gdscript_function.h"
 #include "gdscript_function.h"
 #include "gdscript_utility_functions.h"
 #include "gdscript_utility_functions.h"
 
 

+ 3 - 2
modules/gdscript/gdscript_cache.cpp

@@ -30,12 +30,13 @@
 
 
 #include "gdscript_cache.h"
 #include "gdscript_cache.h"
 
 
-#include "core/io/file_access.h"
-#include "core/templates/vector.h"
 #include "gdscript.h"
 #include "gdscript.h"
 #include "gdscript_analyzer.h"
 #include "gdscript_analyzer.h"
 #include "gdscript_compiler.h"
 #include "gdscript_compiler.h"
 #include "gdscript_parser.h"
 #include "gdscript_parser.h"
+
+#include "core/io/file_access.h"
+#include "core/templates/vector.h"
 #include "scene/resources/packed_scene.h"
 #include "scene/resources/packed_scene.h"
 
 
 bool GDScriptParserRef::is_valid() const {
 bool GDScriptParserRef::is_valid() const {

+ 2 - 1
modules/gdscript/gdscript_cache.h

@@ -31,11 +31,12 @@
 #ifndef GDSCRIPT_CACHE_H
 #ifndef GDSCRIPT_CACHE_H
 #define GDSCRIPT_CACHE_H
 #define GDSCRIPT_CACHE_H
 
 
+#include "gdscript.h"
+
 #include "core/object/ref_counted.h"
 #include "core/object/ref_counted.h"
 #include "core/os/mutex.h"
 #include "core/os/mutex.h"
 #include "core/templates/hash_map.h"
 #include "core/templates/hash_map.h"
 #include "core/templates/hash_set.h"
 #include "core/templates/hash_set.h"
-#include "gdscript.h"
 #include "scene/resources/packed_scene.h"
 #include "scene/resources/packed_scene.h"
 
 
 class GDScriptAnalyzer;
 class GDScriptAnalyzer;

+ 3 - 2
modules/gdscript/gdscript_codegen.h

@@ -31,11 +31,12 @@
 #ifndef GDSCRIPT_CODEGEN_H
 #ifndef GDSCRIPT_CODEGEN_H
 #define GDSCRIPT_CODEGEN_H
 #define GDSCRIPT_CODEGEN_H
 
 
-#include "core/string/string_name.h"
-#include "core/variant/variant.h"
 #include "gdscript_function.h"
 #include "gdscript_function.h"
 #include "gdscript_utility_functions.h"
 #include "gdscript_utility_functions.h"
 
 
+#include "core/string/string_name.h"
+#include "core/variant/variant.h"
+
 class GDScriptCodeGenerator {
 class GDScriptCodeGenerator {
 public:
 public:
 	struct Address {
 	struct Address {

+ 2 - 1
modules/gdscript/gdscript_compiler.h

@@ -31,12 +31,13 @@
 #ifndef GDSCRIPT_COMPILER_H
 #ifndef GDSCRIPT_COMPILER_H
 #define GDSCRIPT_COMPILER_H
 #define GDSCRIPT_COMPILER_H
 
 
-#include "core/templates/hash_set.h"
 #include "gdscript.h"
 #include "gdscript.h"
 #include "gdscript_codegen.h"
 #include "gdscript_codegen.h"
 #include "gdscript_function.h"
 #include "gdscript_function.h"
 #include "gdscript_parser.h"
 #include "gdscript_parser.h"
 
 
+#include "core/templates/hash_set.h"
+
 class GDScriptCompiler {
 class GDScriptCompiler {
 	const GDScriptParser *parser = nullptr;
 	const GDScriptParser *parser = nullptr;
 	HashSet<GDScript *> parsed_classes;
 	HashSet<GDScript *> parsed_classes;

+ 2 - 2
modules/gdscript/gdscript_disassembler.cpp

@@ -30,10 +30,10 @@
 
 
 #ifdef DEBUG_ENABLED
 #ifdef DEBUG_ENABLED
 
 
+#include "gdscript.h"
 #include "gdscript_function.h"
 #include "gdscript_function.h"
 
 
 #include "core/string/string_builder.h"
 #include "core/string/string_builder.h"
-#include "gdscript.h"
 
 
 static String _get_variant_string(const Variant &p_variant) {
 static String _get_variant_string(const Variant &p_variant) {
 	String txt;
 	String txt;
@@ -1130,4 +1130,4 @@ void GDScriptFunction::disassemble(const Vector<String> &p_code_lines) const {
 	}
 	}
 }
 }
 
 
-#endif
+#endif // DEBUG_ENABLED

+ 8 - 4
modules/gdscript/gdscript_editor.cpp

@@ -30,20 +30,24 @@
 
 
 #include "gdscript.h"
 #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_analyzer.h"
 #include "gdscript_compiler.h"
 #include "gdscript_compiler.h"
 #include "gdscript_parser.h"
 #include "gdscript_parser.h"
 #include "gdscript_tokenizer.h"
 #include "gdscript_tokenizer.h"
 #include "gdscript_utility_functions.h"
 #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
 #ifdef TOOLS_ENABLED
 #include "core/config/project_settings.h"
 #include "core/config/project_settings.h"
 #include "editor/editor_file_system.h"
 #include "editor/editor_file_system.h"
 #include "editor/editor_settings.h"
 #include "editor/editor_settings.h"
-#include "editor/script_templates/templates.gen.h"
 #endif
 #endif
 
 
 void GDScriptLanguage::get_comment_delimiters(List<String> *p_delimiters) const {
 void GDScriptLanguage::get_comment_delimiters(List<String> *p_delimiters) const {

+ 2 - 1
modules/gdscript/gdscript_function.h

@@ -31,6 +31,8 @@
 #ifndef GDSCRIPT_FUNCTION_H
 #ifndef GDSCRIPT_FUNCTION_H
 #define GDSCRIPT_FUNCTION_H
 #define GDSCRIPT_FUNCTION_H
 
 
+#include "gdscript_utility_functions.h"
+
 #include "core/object/ref_counted.h"
 #include "core/object/ref_counted.h"
 #include "core/object/script_language.h"
 #include "core/object/script_language.h"
 #include "core/os/thread.h"
 #include "core/os/thread.h"
@@ -38,7 +40,6 @@
 #include "core/templates/pair.h"
 #include "core/templates/pair.h"
 #include "core/templates/self_list.h"
 #include "core/templates/self_list.h"
 #include "core/variant/variant.h"
 #include "core/variant/variant.h"
-#include "gdscript_utility_functions.h"
 
 
 class GDScriptInstance;
 class GDScriptInstance;
 class GDScript;
 class GDScript;

+ 2 - 1
modules/gdscript/gdscript_lambda_callable.cpp

@@ -30,9 +30,10 @@
 
 
 #include "gdscript_lambda_callable.h"
 #include "gdscript_lambda_callable.h"
 
 
-#include "core/templates/hashfuncs.h"
 #include "gdscript.h"
 #include "gdscript.h"
 
 
+#include "core/templates/hashfuncs.h"
+
 bool GDScriptLambdaCallable::compare_equal(const CallableCustom *p_a, const CallableCustom *p_b) {
 bool GDScriptLambdaCallable::compare_equal(const CallableCustom *p_a, const CallableCustom *p_b) {
 	// Lambda callables are only compared by reference.
 	// Lambda callables are only compared by reference.
 	return p_a == p_b;
 	return p_a == p_b;

+ 8 - 4
modules/gdscript/gdscript_parser.cpp

@@ -30,23 +30,27 @@
 
 
 #include "gdscript_parser.h"
 #include "gdscript_parser.h"
 
 
+#include "gdscript.h"
+
+#ifdef DEBUG_ENABLED
+#include "gdscript_warning.h"
+#endif
+
 #include "core/config/project_settings.h"
 #include "core/config/project_settings.h"
 #include "core/io/file_access.h"
 #include "core/io/file_access.h"
 #include "core/io/resource_loader.h"
 #include "core/io/resource_loader.h"
 #include "core/math/math_defs.h"
 #include "core/math/math_defs.h"
-#include "gdscript.h"
 #include "scene/main/multiplayer_api.h"
 #include "scene/main/multiplayer_api.h"
 
 
 #ifdef DEBUG_ENABLED
 #ifdef DEBUG_ENABLED
 #include "core/os/os.h"
 #include "core/os/os.h"
 #include "core/string/string_builder.h"
 #include "core/string/string_builder.h"
-#include "gdscript_warning.h"
 #include "servers/text_server.h"
 #include "servers/text_server.h"
-#endif // DEBUG_ENABLED
+#endif
 
 
 #ifdef TOOLS_ENABLED
 #ifdef TOOLS_ENABLED
 #include "editor/editor_settings.h"
 #include "editor/editor_settings.h"
-#endif // TOOLS_ENABLED
+#endif
 
 
 static HashMap<StringName, Variant::Type> builtin_types;
 static HashMap<StringName, Variant::Type> builtin_types;
 Variant::Type GDScriptParser::get_builtin_type(const StringName &p_type) {
 Variant::Type GDScriptParser::get_builtin_type(const StringName &p_type) {

+ 8 - 4
modules/gdscript/gdscript_parser.h

@@ -31,6 +31,13 @@
 #ifndef GDSCRIPT_PARSER_H
 #ifndef GDSCRIPT_PARSER_H
 #define 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/io/resource.h"
 #include "core/object/ref_counted.h"
 #include "core/object/ref_counted.h"
 #include "core/object/script_language.h"
 #include "core/object/script_language.h"
@@ -41,13 +48,10 @@
 #include "core/templates/rb_map.h"
 #include "core/templates/rb_map.h"
 #include "core/templates/vector.h"
 #include "core/templates/vector.h"
 #include "core/variant/variant.h"
 #include "core/variant/variant.h"
-#include "gdscript_cache.h"
-#include "gdscript_tokenizer.h"
 
 
 #ifdef DEBUG_ENABLED
 #ifdef DEBUG_ENABLED
 #include "core/string/string_builder.h"
 #include "core/string/string_builder.h"
-#include "gdscript_warning.h"
-#endif // DEBUG_ENABLED
+#endif
 
 
 class GDScriptParser {
 class GDScriptParser {
 	struct AnnotationInfo;
 	struct AnnotationInfo;

+ 4 - 3
modules/gdscript/gdscript_tokenizer.cpp

@@ -33,13 +33,14 @@
 #include "core/error/error_macros.h"
 #include "core/error/error_macros.h"
 #include "core/string/char_utils.h"
 #include "core/string/char_utils.h"
 
 
-#ifdef TOOLS_ENABLED
-#include "editor/editor_settings.h"
-#endif
 #ifdef DEBUG_ENABLED
 #ifdef DEBUG_ENABLED
 #include "servers/text_server.h"
 #include "servers/text_server.h"
 #endif
 #endif
 
 
+#ifdef TOOLS_ENABLED
+#include "editor/editor_settings.h"
+#endif
+
 static const char *token_names[] = {
 static const char *token_names[] = {
 	"Empty", // EMPTY,
 	"Empty", // EMPTY,
 	// Basic
 	// Basic

+ 2 - 1
modules/gdscript/gdscript_utility_functions.cpp

@@ -30,6 +30,8 @@
 
 
 #include "gdscript_utility_functions.h"
 #include "gdscript_utility_functions.h"
 
 
+#include "gdscript.h"
+
 #include "core/io/resource_loader.h"
 #include "core/io/resource_loader.h"
 #include "core/object/class_db.h"
 #include "core/object/class_db.h"
 #include "core/object/method_bind.h"
 #include "core/object/method_bind.h"
@@ -37,7 +39,6 @@
 #include "core/templates/oa_hash_map.h"
 #include "core/templates/oa_hash_map.h"
 #include "core/templates/vector.h"
 #include "core/templates/vector.h"
 #include "core/variant/typed_array.h"
 #include "core/variant/typed_array.h"
-#include "gdscript.h"
 
 
 #ifdef DEBUG_ENABLED
 #ifdef DEBUG_ENABLED
 
 

+ 2 - 2
modules/gdscript/gdscript_vm.cpp

@@ -28,12 +28,12 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /**************************************************************************/
 /**************************************************************************/
 
 
+#include "gdscript.h"
 #include "gdscript_function.h"
 #include "gdscript_function.h"
+#include "gdscript_lambda_callable.h"
 
 
 #include "core/core_string_names.h"
 #include "core/core_string_names.h"
 #include "core/os/os.h"
 #include "core/os/os.h"
-#include "gdscript.h"
-#include "gdscript_lambda_callable.h"
 
 
 #ifdef DEBUG_ENABLED
 #ifdef DEBUG_ENABLED
 static String _get_script_name(const Ref<Script> p_script) {
 static String _get_script_name(const Ref<Script> p_script) {

+ 2 - 1
modules/gdscript/language_server/gdscript_extend_parser.h

@@ -32,9 +32,10 @@
 #define GDSCRIPT_EXTEND_PARSER_H
 #define GDSCRIPT_EXTEND_PARSER_H
 
 
 #include "../gdscript_parser.h"
 #include "../gdscript_parser.h"
-#include "core/variant/variant.h"
 #include "godot_lsp.h"
 #include "godot_lsp.h"
 
 
+#include "core/variant/variant.h"
+
 #ifndef LINE_NUMBER_TO_INDEX
 #ifndef LINE_NUMBER_TO_INDEX
 #define LINE_NUMBER_TO_INDEX(p_line) ((p_line)-1)
 #define LINE_NUMBER_TO_INDEX(p_line) ((p_line)-1)
 #endif
 #endif

+ 4 - 3
modules/gdscript/language_server/gdscript_language_protocol.h

@@ -31,13 +31,14 @@
 #ifndef GDSCRIPT_LANGUAGE_PROTOCOL_H
 #ifndef GDSCRIPT_LANGUAGE_PROTOCOL_H
 #define 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_text_document.h"
 #include "gdscript_workspace.h"
 #include "gdscript_workspace.h"
 #include "godot_lsp.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.
 #include "modules/modules_enabled.gen.h" // For jsonrpc.
 #ifdef MODULE_JSONRPC_ENABLED
 #ifdef MODULE_JSONRPC_ENABLED
 #include "modules/jsonrpc/jsonrpc.h"
 #include "modules/jsonrpc/jsonrpc.h"

+ 2 - 1
modules/gdscript/language_server/gdscript_language_server.h

@@ -32,9 +32,10 @@
 #define GDSCRIPT_LANGUAGE_SERVER_H
 #define GDSCRIPT_LANGUAGE_SERVER_H
 
 
 #include "../gdscript_parser.h"
 #include "../gdscript_parser.h"
-#include "editor/editor_plugin.h"
 #include "gdscript_language_protocol.h"
 #include "gdscript_language_protocol.h"
 
 
+#include "editor/editor_plugin.h"
+
 class GDScriptLanguageServer : public EditorPlugin {
 class GDScriptLanguageServer : public EditorPlugin {
 	GDCLASS(GDScriptLanguageServer, EditorPlugin);
 	GDCLASS(GDScriptLanguageServer, EditorPlugin);
 
 

+ 3 - 2
modules/gdscript/language_server/gdscript_text_document.cpp

@@ -31,11 +31,12 @@
 #include "gdscript_text_document.h"
 #include "gdscript_text_document.h"
 
 
 #include "../gdscript.h"
 #include "../gdscript.h"
+#include "gdscript_extend_parser.h"
+#include "gdscript_language_protocol.h"
+
 #include "core/os/os.h"
 #include "core/os/os.h"
 #include "editor/editor_settings.h"
 #include "editor/editor_settings.h"
 #include "editor/plugins/script_text_editor.h"
 #include "editor/plugins/script_text_editor.h"
-#include "gdscript_extend_parser.h"
-#include "gdscript_language_protocol.h"
 #include "servers/display_server.h"
 #include "servers/display_server.h"
 
 
 void GDScriptTextDocument::_bind_methods() {
 void GDScriptTextDocument::_bind_methods() {

+ 2 - 1
modules/gdscript/language_server/gdscript_text_document.h

@@ -31,9 +31,10 @@
 #ifndef GDSCRIPT_TEXT_DOCUMENT_H
 #ifndef GDSCRIPT_TEXT_DOCUMENT_H
 #define GDSCRIPT_TEXT_DOCUMENT_H
 #define GDSCRIPT_TEXT_DOCUMENT_H
 
 
+#include "godot_lsp.h"
+
 #include "core/io/file_access.h"
 #include "core/io/file_access.h"
 #include "core/object/ref_counted.h"
 #include "core/object/ref_counted.h"
-#include "godot_lsp.h"
 
 
 class GDScriptTextDocument : public RefCounted {
 class GDScriptTextDocument : public RefCounted {
 	GDCLASS(GDScriptTextDocument, RefCounted)
 	GDCLASS(GDScriptTextDocument, RefCounted)

+ 2 - 1
modules/gdscript/language_server/gdscript_workspace.cpp

@@ -32,6 +32,8 @@
 
 
 #include "../gdscript.h"
 #include "../gdscript.h"
 #include "../gdscript_parser.h"
 #include "../gdscript_parser.h"
+#include "gdscript_language_protocol.h"
+
 #include "core/config/project_settings.h"
 #include "core/config/project_settings.h"
 #include "core/object/script_language.h"
 #include "core/object/script_language.h"
 #include "editor/doc_tools.h"
 #include "editor/doc_tools.h"
@@ -39,7 +41,6 @@
 #include "editor/editor_help.h"
 #include "editor/editor_help.h"
 #include "editor/editor_node.h"
 #include "editor/editor_node.h"
 #include "editor/editor_settings.h"
 #include "editor/editor_settings.h"
-#include "gdscript_language_protocol.h"
 #include "scene/resources/packed_scene.h"
 #include "scene/resources/packed_scene.h"
 
 
 void GDScriptWorkspace::_bind_methods() {
 void GDScriptWorkspace::_bind_methods() {

+ 3 - 2
modules/gdscript/language_server/gdscript_workspace.h

@@ -32,11 +32,12 @@
 #define GDSCRIPT_WORKSPACE_H
 #define GDSCRIPT_WORKSPACE_H
 
 
 #include "../gdscript_parser.h"
 #include "../gdscript_parser.h"
-#include "core/variant/variant.h"
-#include "editor/editor_file_system.h"
 #include "gdscript_extend_parser.h"
 #include "gdscript_extend_parser.h"
 #include "godot_lsp.h"
 #include "godot_lsp.h"
 
 
+#include "core/variant/variant.h"
+#include "editor/editor_file_system.h"
+
 class GDScriptWorkspace : public RefCounted {
 class GDScriptWorkspace : public RefCounted {
 	GDCLASS(GDScriptWorkspace, RefCounted);
 	GDCLASS(GDScriptWorkspace, RefCounted);
 
 

+ 26 - 14
modules/gdscript/register_types.cpp

@@ -30,39 +30,51 @@
 
 
 #include "register_types.h"
 #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.h"
 #include "gdscript_analyzer.h"
 #include "gdscript_analyzer.h"
 #include "gdscript_cache.h"
 #include "gdscript_cache.h"
 #include "gdscript_tokenizer.h"
 #include "gdscript_tokenizer.h"
 #include "gdscript_utility_functions.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
 #ifdef TESTS_ENABLED
 #include "tests/test_gdscript.h"
 #include "tests/test_gdscript.h"
-#include "tests/test_macros.h"
 #endif
 #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
 #ifdef TOOLS_ENABLED
-
 #include "editor/editor_node.h"
 #include "editor/editor_node.h"
 #include "editor/editor_settings.h"
 #include "editor/editor_settings.h"
 #include "editor/editor_translation_parser.h"
 #include "editor/editor_translation_parser.h"
 #include "editor/export/editor_export.h"
 #include "editor/export/editor_export.h"
-#include "editor/gdscript_highlighter.h"
-#include "editor/gdscript_translation_parser_plugin.h"
 
 
 #ifndef GDSCRIPT_NO_LSP
 #ifndef GDSCRIPT_NO_LSP
 #include "core/config/engine.h"
 #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;
 Ref<GDScriptEditorTranslationParserPlugin> gdscript_translation_parser_plugin;
 
 

+ 1 - 0
modules/gdscript/tests/gdscript_test_runner.h

@@ -32,6 +32,7 @@
 #define GDSCRIPT_TEST_RUNNER_H
 #define GDSCRIPT_TEST_RUNNER_H
 
 
 #include "../gdscript.h"
 #include "../gdscript.h"
+
 #include "core/error/error_macros.h"
 #include "core/error/error_macros.h"
 #include "core/string/print_string.h"
 #include "core/string/print_string.h"
 #include "core/string/ustring.h"
 #include "core/string/ustring.h"

+ 1 - 0
modules/gdscript/tests/gdscript_test_runner_suite.h

@@ -32,6 +32,7 @@
 #define GDSCRIPT_TEST_RUNNER_SUITE_H
 #define GDSCRIPT_TEST_RUNNER_SUITE_H
 
 
 #include "gdscript_test_runner.h"
 #include "gdscript_test_runner.h"
+
 #include "tests/test_macros.h"
 #include "tests/test_macros.h"
 
 
 namespace GDScriptTests {
 namespace GDScriptTests {

+ 5 - 5
modules/gdscript/tests/test_gdscript.cpp

@@ -30,6 +30,11 @@
 
 
 #include "test_gdscript.h"
 #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/config/project_settings.h"
 #include "core/io/file_access.h"
 #include "core/io/file_access.h"
 #include "core/io/file_access_pack.h"
 #include "core/io/file_access_pack.h"
@@ -38,11 +43,6 @@
 #include "core/string/string_builder.h"
 #include "core/string/string_builder.h"
 #include "scene/resources/packed_scene.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
 #ifdef TOOLS_ENABLED
 #include "editor/editor_settings.h"
 #include "editor/editor_settings.h"
 #endif
 #endif

+ 1 - 0
modules/gdscript/tests/test_gdscript.h

@@ -32,6 +32,7 @@
 #define TEST_GDSCRIPT_H
 #define TEST_GDSCRIPT_H
 
 
 #include "gdscript_test_runner.h"
 #include "gdscript_test_runner.h"
+
 #include "tests/test_macros.h"
 #include "tests/test_macros.h"
 
 
 namespace GDScriptTests {
 namespace GDScriptTests {

+ 2 - 2
modules/glslang/register_types.cpp

@@ -30,10 +30,10 @@
 
 
 #include "register_types.h"
 #include "register_types.h"
 
 
-#include "servers/rendering/rendering_device.h"
-
 #include "glslang_resource_limits.h"
 #include "glslang_resource_limits.h"
 
 
+#include "servers/rendering/rendering_device.h"
+
 #include <glslang/Include/Types.h>
 #include <glslang/Include/Types.h>
 #include <glslang/Public/ShaderLang.h>
 #include <glslang/Public/ShaderLang.h>
 #include <glslang/SPIRV/GlslangToSpv.h>
 #include <glslang/SPIRV/GlslangToSpv.h>

+ 2 - 2
modules/gltf/editor/editor_scene_exporter_gltf_plugin.cpp

@@ -28,10 +28,10 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /**************************************************************************/
 /**************************************************************************/
 
 
-#ifdef TOOLS_ENABLED
-
 #include "editor_scene_exporter_gltf_plugin.h"
 #include "editor_scene_exporter_gltf_plugin.h"
 
 
+#ifdef TOOLS_ENABLED
+
 #include "../gltf_document.h"
 #include "../gltf_document.h"
 
 
 #include "editor/editor_file_system.h"
 #include "editor/editor_file_system.h"

+ 2 - 1
modules/gltf/editor/editor_scene_exporter_gltf_plugin.h

@@ -33,9 +33,10 @@
 
 
 #ifdef TOOLS_ENABLED
 #ifdef TOOLS_ENABLED
 
 
-#include "editor/editor_plugin.h"
 #include "editor_scene_importer_gltf.h"
 #include "editor_scene_importer_gltf.h"
 
 
+#include "editor/editor_plugin.h"
+
 class EditorFileDialog;
 class EditorFileDialog;
 
 
 class SceneExporterGLTFPlugin : public EditorPlugin {
 class SceneExporterGLTFPlugin : public EditorPlugin {

+ 2 - 2
modules/gltf/editor/editor_scene_importer_gltf.cpp

@@ -28,10 +28,10 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /**************************************************************************/
 /**************************************************************************/
 
 
-#ifdef TOOLS_ENABLED
-
 #include "editor_scene_importer_gltf.h"
 #include "editor_scene_importer_gltf.h"
 
 
+#ifdef TOOLS_ENABLED
+
 #include "../gltf_defines.h"
 #include "../gltf_defines.h"
 #include "../gltf_document.h"
 #include "../gltf_document.h"
 
 

+ 1 - 0
modules/gltf/extensions/physics/gltf_collider.cpp

@@ -31,6 +31,7 @@
 #include "gltf_collider.h"
 #include "gltf_collider.h"
 
 
 #include "../../gltf_state.h"
 #include "../../gltf_state.h"
+
 #include "core/math/convex_hull.h"
 #include "core/math/convex_hull.h"
 #include "scene/3d/area_3d.h"
 #include "scene/3d/area_3d.h"
 #include "scene/resources/box_shape_3d.h"
 #include "scene/resources/box_shape_3d.h"

+ 1 - 0
modules/gltf/extensions/physics/gltf_collider.h

@@ -32,6 +32,7 @@
 #define GLTF_COLLIDER_H
 #define GLTF_COLLIDER_H
 
 
 #include "../../gltf_defines.h"
 #include "../../gltf_defines.h"
+
 #include "scene/3d/collision_shape_3d.h"
 #include "scene/3d/collision_shape_3d.h"
 
 
 class ImporterMesh;
 class ImporterMesh;

+ 0 - 1
modules/gltf/extensions/physics/gltf_document_extension_physics.h

@@ -32,7 +32,6 @@
 #define GLTF_DOCUMENT_EXTENSION_PHYSICS_H
 #define GLTF_DOCUMENT_EXTENSION_PHYSICS_H
 
 
 #include "../gltf_document_extension.h"
 #include "../gltf_document_extension.h"
-
 #include "gltf_collider.h"
 #include "gltf_collider.h"
 #include "gltf_physics_body.h"
 #include "gltf_physics_body.h"
 
 

+ 3 - 2
modules/gltf/register_types.cpp

@@ -37,13 +37,14 @@
 #include "gltf_document.h"
 #include "gltf_document.h"
 
 
 #ifdef TOOLS_ENABLED
 #ifdef TOOLS_ENABLED
-#include "core/config/project_settings.h"
 #include "editor/editor_import_blend_runner.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_exporter_gltf_plugin.h"
 #include "editor/editor_scene_importer_blend.h"
 #include "editor/editor_scene_importer_blend.h"
 #include "editor/editor_scene_importer_fbx.h"
 #include "editor/editor_scene_importer_fbx.h"
 #include "editor/editor_scene_importer_gltf.h"
 #include "editor/editor_scene_importer_gltf.h"
+
+#include "core/config/project_settings.h"
+#include "editor/editor_node.h"
 #include "editor/editor_settings.h"
 #include "editor/editor_settings.h"
 
 
 static void _editor_init() {
 static void _editor_init() {

+ 1 - 0
modules/gltf/structures/gltf_accessor.h

@@ -32,6 +32,7 @@
 #define GLTF_ACCESSOR_H
 #define GLTF_ACCESSOR_H
 
 
 #include "../gltf_defines.h"
 #include "../gltf_defines.h"
+
 #include "core/io/resource.h"
 #include "core/io/resource.h"
 
 
 struct GLTFAccessor : public Resource {
 struct GLTFAccessor : public Resource {

+ 1 - 0
modules/gltf/structures/gltf_buffer_view.h

@@ -32,6 +32,7 @@
 #define GLTF_BUFFER_VIEW_H
 #define GLTF_BUFFER_VIEW_H
 
 
 #include "../gltf_defines.h"
 #include "../gltf_defines.h"
+
 #include "core/io/resource.h"
 #include "core/io/resource.h"
 
 
 class GLTFBufferView : public Resource {
 class GLTFBufferView : public Resource {

+ 1 - 0
modules/gltf/structures/gltf_mesh.h

@@ -32,6 +32,7 @@
 #define GLTF_MESH_H
 #define GLTF_MESH_H
 
 
 #include "../gltf_defines.h"
 #include "../gltf_defines.h"
+
 #include "scene/resources/importer_mesh.h"
 #include "scene/resources/importer_mesh.h"
 
 
 class GLTFMesh : public Resource {
 class GLTFMesh : public Resource {

+ 1 - 0
modules/gltf/structures/gltf_node.h

@@ -32,6 +32,7 @@
 #define GLTF_NODE_H
 #define GLTF_NODE_H
 
 
 #include "../gltf_defines.h"
 #include "../gltf_defines.h"
+
 #include "core/io/resource.h"
 #include "core/io/resource.h"
 
 
 class GLTFNode : public Resource {
 class GLTFNode : public Resource {

+ 1 - 0
modules/gltf/structures/gltf_skeleton.cpp

@@ -31,6 +31,7 @@
 #include "gltf_skeleton.h"
 #include "gltf_skeleton.h"
 
 
 #include "../gltf_template_convert.h"
 #include "../gltf_template_convert.h"
+
 #include "scene/3d/bone_attachment_3d.h"
 #include "scene/3d/bone_attachment_3d.h"
 
 
 void GLTFSkeleton::_bind_methods() {
 void GLTFSkeleton::_bind_methods() {

+ 1 - 0
modules/gltf/structures/gltf_skeleton.h

@@ -32,6 +32,7 @@
 #define GLTF_SKELETON_H
 #define GLTF_SKELETON_H
 
 
 #include "../gltf_defines.h"
 #include "../gltf_defines.h"
+
 #include "core/io/resource.h"
 #include "core/io/resource.h"
 
 
 class GLTFSkeleton : public Resource {
 class GLTFSkeleton : public Resource {

+ 1 - 0
modules/gltf/structures/gltf_skin.cpp

@@ -31,6 +31,7 @@
 #include "gltf_skin.h"
 #include "gltf_skin.h"
 
 
 #include "../gltf_template_convert.h"
 #include "../gltf_template_convert.h"
+
 #include "core/variant/typed_array.h"
 #include "core/variant/typed_array.h"
 #include "scene/resources/skin.h"
 #include "scene/resources/skin.h"
 
 

+ 1 - 0
modules/gltf/structures/gltf_skin.h

@@ -32,6 +32,7 @@
 #define GLTF_SKIN_H
 #define GLTF_SKIN_H
 
 
 #include "../gltf_defines.h"
 #include "../gltf_defines.h"
+
 #include "core/io/resource.h"
 #include "core/io/resource.h"
 
 
 template <typename T>
 template <typename T>

+ 1 - 0
modules/gltf/structures/gltf_texture.h

@@ -32,6 +32,7 @@
 #define GLTF_TEXTURE_H
 #define GLTF_TEXTURE_H
 
 
 #include "../gltf_defines.h"
 #include "../gltf_defines.h"
+
 #include "core/io/resource.h"
 #include "core/io/resource.h"
 
 
 class GLTFTexture : public Resource {
 class GLTFTexture : public Resource {

+ 1 - 0
modules/gridmap/editor/grid_map_editor_plugin.h

@@ -34,6 +34,7 @@
 #ifdef TOOLS_ENABLED
 #ifdef TOOLS_ENABLED
 
 
 #include "../grid_map.h"
 #include "../grid_map.h"
+
 #include "editor/editor_plugin.h"
 #include "editor/editor_plugin.h"
 #include "scene/gui/box_container.h"
 #include "scene/gui/box_container.h"
 #include "scene/gui/item_list.h"
 #include "scene/gui/item_list.h"

+ 2 - 1
modules/gridmap/register_types.cpp

@@ -32,13 +32,14 @@
 
 
 #include "register_types.h"
 #include "register_types.h"
 
 
-#include "core/object/class_db.h"
 #include "grid_map.h"
 #include "grid_map.h"
 
 
 #ifdef TOOLS_ENABLED
 #ifdef TOOLS_ENABLED
 #include "editor/grid_map_editor_plugin.h"
 #include "editor/grid_map_editor_plugin.h"
 #endif
 #endif
 
 
+#include "core/object/class_db.h"
+
 void initialize_gridmap_module(ModuleInitializationLevel p_level) {
 void initialize_gridmap_module(ModuleInitializationLevel p_level) {
 	if (p_level == MODULE_INITIALIZATION_LEVEL_SCENE) {
 	if (p_level == MODULE_INITIALIZATION_LEVEL_SCENE) {
 		GDREGISTER_CLASS(GridMap);
 		GDREGISTER_CLASS(GridMap);

+ 1 - 0
modules/jpg/image_loader_jpegd.cpp

@@ -35,6 +35,7 @@
 
 
 #include <jpgd.h>
 #include <jpgd.h>
 #include <jpge.h>
 #include <jpge.h>
+
 #include <string.h>
 #include <string.h>
 
 
 Error jpeg_load_image_from_buffer(Image *p_image, const uint8_t *p_buffer, int p_buffer_len) {
 Error jpeg_load_image_from_buffer(Image *p_image, const uint8_t *p_buffer, int p_buffer_len) {

+ 3 - 1
modules/jsonrpc/register_types.cpp

@@ -29,9 +29,11 @@
 /**************************************************************************/
 /**************************************************************************/
 
 
 #include "register_types.h"
 #include "register_types.h"
-#include "core/object/class_db.h"
+
 #include "jsonrpc.h"
 #include "jsonrpc.h"
 
 
+#include "core/object/class_db.h"
+
 void initialize_jsonrpc_module(ModuleInitializationLevel p_level) {
 void initialize_jsonrpc_module(ModuleInitializationLevel p_level) {
 	if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) {
 	if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) {
 		return;
 		return;

+ 3 - 2
modules/lightmapper_rd/lightmapper_rd.cpp

@@ -30,11 +30,12 @@
 
 
 #include "lightmapper_rd.h"
 #include "lightmapper_rd.h"
 
 
-#include "core/config/project_settings.h"
-#include "core/math/geometry_2d.h"
 #include "lm_blendseams.glsl.gen.h"
 #include "lm_blendseams.glsl.gen.h"
 #include "lm_compute.glsl.gen.h"
 #include "lm_compute.glsl.gen.h"
 #include "lm_raster.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"
 #include "servers/rendering/rendering_device_binds.h"
 
 
 //uncomment this if you want to see textures from all the process saved
 //uncomment this if you want to see textures from all the process saved

+ 2 - 1
modules/lightmapper_rd/register_types.cpp

@@ -30,8 +30,9 @@
 
 
 #include "register_types.h"
 #include "register_types.h"
 
 
-#include "core/config/project_settings.h"
 #include "lightmapper_rd.h"
 #include "lightmapper_rd.h"
+
+#include "core/config/project_settings.h"
 #include "scene/3d/lightmapper.h"
 #include "scene/3d/lightmapper.h"
 
 
 #ifndef _3D_DISABLED
 #ifndef _3D_DISABLED

+ 5 - 5
modules/mbedtls/crypto_mbedtls.cpp

@@ -30,25 +30,25 @@
 
 
 #include "crypto_mbedtls.h"
 #include "crypto_mbedtls.h"
 
 
-#include "core/io/file_access.h"
-
 #include "core/config/engine.h"
 #include "core/config/engine.h"
 #include "core/config/project_settings.h"
 #include "core/config/project_settings.h"
 #include "core/io/certs_compressed.gen.h"
 #include "core/io/certs_compressed.gen.h"
 #include "core/io/compression.h"
 #include "core/io/compression.h"
+#include "core/io/file_access.h"
 #include "core/os/os.h"
 #include "core/os/os.h"
 
 
 #ifdef TOOLS_ENABLED
 #ifdef TOOLS_ENABLED
 #include "editor/editor_settings.h"
 #include "editor/editor_settings.h"
 #endif
 #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/debug.h>
 #include <mbedtls/md.h>
 #include <mbedtls/md.h>
 #include <mbedtls/pem.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() {
 CryptoKey *CryptoKeyMbedTLS::create() {
 	return memnew(CryptoKeyMbedTLS);
 	return memnew(CryptoKeyMbedTLS);
 }
 }

+ 1 - 0
modules/mbedtls/dtls_server_mbedtls.cpp

@@ -29,6 +29,7 @@
 /**************************************************************************/
 /**************************************************************************/
 
 
 #include "dtls_server_mbedtls.h"
 #include "dtls_server_mbedtls.h"
+
 #include "packet_peer_mbed_dtls.h"
 #include "packet_peer_mbed_dtls.h"
 
 
 Error DTLSServerMbedTLS::setup(Ref<TLSOptions> p_options) {
 Error DTLSServerMbedTLS::setup(Ref<TLSOptions> p_options) {

+ 2 - 1
modules/mbedtls/dtls_server_mbedtls.h

@@ -31,9 +31,10 @@
 #ifndef DTLS_SERVER_MBEDTLS_H
 #ifndef DTLS_SERVER_MBEDTLS_H
 #define DTLS_SERVER_MBEDTLS_H
 #define DTLS_SERVER_MBEDTLS_H
 
 
-#include "core/io/dtls_server.h"
 #include "tls_context_mbedtls.h"
 #include "tls_context_mbedtls.h"
 
 
+#include "core/io/dtls_server.h"
+
 class DTLSServerMbedTLS : public DTLSServer {
 class DTLSServerMbedTLS : public DTLSServer {
 private:
 private:
 	static DTLSServer *_create_func();
 	static DTLSServer *_create_func();

+ 2 - 1
modules/mbedtls/packet_peer_mbed_dtls.h

@@ -31,9 +31,10 @@
 #ifndef PACKET_PEER_MBED_DTLS_H
 #ifndef PACKET_PEER_MBED_DTLS_H
 #define PACKET_PEER_MBED_DTLS_H
 #define PACKET_PEER_MBED_DTLS_H
 
 
-#include "core/io/packet_peer_dtls.h"
 #include "tls_context_mbedtls.h"
 #include "tls_context_mbedtls.h"
 
 
+#include "core/io/packet_peer_dtls.h"
+
 #include <mbedtls/timing.h>
 #include <mbedtls/timing.h>
 
 
 class PacketPeerMbedDTLS : public PacketPeerDTLS {
 class PacketPeerMbedDTLS : public PacketPeerDTLS {

+ 2 - 1
modules/mbedtls/stream_peer_mbedtls.h

@@ -31,9 +31,10 @@
 #ifndef STREAM_PEER_MBEDTLS_H
 #ifndef STREAM_PEER_MBEDTLS_H
 #define STREAM_PEER_MBEDTLS_H
 #define STREAM_PEER_MBEDTLS_H
 
 
-#include "core/io/stream_peer_tls.h"
 #include "tls_context_mbedtls.h"
 #include "tls_context_mbedtls.h"
 
 
+#include "core/io/stream_peer_tls.h"
+
 class StreamPeerMbedTLS : public StreamPeerTLS {
 class StreamPeerMbedTLS : public StreamPeerTLS {
 private:
 private:
 	Status status = STATUS_DISCONNECTED;
 	Status status = STATUS_DISCONNECTED;

+ 2 - 1
modules/mbedtls/tests/test_crypto_mbedtls.cpp

@@ -30,7 +30,8 @@
 
 
 #include "test_crypto_mbedtls.h"
 #include "test_crypto_mbedtls.h"
 
 
-#include "modules/mbedtls/crypto_mbedtls.h"
+#include "../crypto_mbedtls.h"
+
 #include "tests/test_macros.h"
 #include "tests/test_macros.h"
 
 
 namespace TestCryptoMbedTLS {
 namespace TestCryptoMbedTLS {

+ 0 - 1
modules/mbedtls/tls_context_mbedtls.h

@@ -34,7 +34,6 @@
 #include "crypto_mbedtls.h"
 #include "crypto_mbedtls.h"
 
 
 #include "core/io/file_access.h"
 #include "core/io/file_access.h"
-
 #include "core/object/ref_counted.h"
 #include "core/object/ref_counted.h"
 
 
 #include <mbedtls/config.h>
 #include <mbedtls/config.h>

+ 2 - 0
modules/meshoptimizer/register_types.cpp

@@ -29,7 +29,9 @@
 /**************************************************************************/
 /**************************************************************************/
 
 
 #include "register_types.h"
 #include "register_types.h"
+
 #include "scene/resources/surface_tool.h"
 #include "scene/resources/surface_tool.h"
+
 #include "thirdparty/meshoptimizer/meshoptimizer.h"
 #include "thirdparty/meshoptimizer/meshoptimizer.h"
 
 
 void initialize_meshoptimizer_module(ModuleInitializationLevel p_level) {
 void initialize_meshoptimizer_module(ModuleInitializationLevel p_level) {

+ 0 - 1
modules/minimp3/audio_stream_mp3.cpp

@@ -32,7 +32,6 @@
 #define MINIMP3_FLOAT_OUTPUT
 #define MINIMP3_FLOAT_OUTPUT
 #define MINIMP3_IMPLEMENTATION
 #define MINIMP3_IMPLEMENTATION
 #define MINIMP3_NO_STDIO
 #define MINIMP3_NO_STDIO
-
 #include "audio_stream_mp3.h"
 #include "audio_stream_mp3.h"
 
 
 #include "core/io/file_access.h"
 #include "core/io/file_access.h"

+ 1 - 1
modules/minimp3/audio_stream_mp3.h

@@ -34,7 +34,7 @@
 #include "core/io/resource_loader.h"
 #include "core/io/resource_loader.h"
 #include "servers/audio/audio_stream.h"
 #include "servers/audio/audio_stream.h"
 
 
-#include "minimp3_ex.h"
+#include <minimp3_ex.h>
 
 
 class AudioStreamMP3;
 class AudioStreamMP3;
 
 

+ 4 - 1
modules/minimp3/register_types.cpp

@@ -33,10 +33,13 @@
 #include "audio_stream_mp3.h"
 #include "audio_stream_mp3.h"
 
 
 #ifdef TOOLS_ENABLED
 #ifdef TOOLS_ENABLED
-#include "core/config/engine.h"
 #include "resource_importer_mp3.h"
 #include "resource_importer_mp3.h"
 #endif
 #endif
 
 
+#ifdef TOOLS_ENABLED
+#include "core/config/engine.h"
+#endif
+
 void initialize_minimp3_module(ModuleInitializationLevel p_level) {
 void initialize_minimp3_module(ModuleInitializationLevel p_level) {
 	if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) {
 	if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) {
 		return;
 		return;

+ 1 - 0
modules/minimp3/resource_importer_mp3.h

@@ -32,6 +32,7 @@
 #define RESOURCE_IMPORTER_MP3_H
 #define RESOURCE_IMPORTER_MP3_H
 
 
 #include "audio_stream_mp3.h"
 #include "audio_stream_mp3.h"
+
 #include "core/io/resource_importer.h"
 #include "core/io/resource_importer.h"
 
 
 class ResourceImporterMP3 : public ResourceImporter {
 class ResourceImporterMP3 : public ResourceImporter {

+ 19 - 16
modules/mono/csharp_script.cpp

@@ -30,7 +30,23 @@
 
 
 #include "csharp_script.h"
 #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/config/project_settings.h"
 #include "core/debugger/engine_debugger.h"
 #include "core/debugger/engine_debugger.h"
@@ -39,31 +55,18 @@
 #include "core/os/mutex.h"
 #include "core/os/mutex.h"
 #include "core/os/os.h"
 #include "core/os/os.h"
 #include "core/os/thread.h"
 #include "core/os/thread.h"
+#include "servers/text_server.h"
 
 
 #ifdef TOOLS_ENABLED
 #ifdef TOOLS_ENABLED
 #include "core/os/keyboard.h"
 #include "core/os/keyboard.h"
 #include "editor/editor_file_system.h"
 #include "editor/editor_file_system.h"
-#include "editor/editor_internal_calls.h"
 #include "editor/editor_node.h"
 #include "editor/editor_node.h"
 #include "editor/editor_settings.h"
 #include "editor/editor_settings.h"
 #include "editor/inspector_dock.h"
 #include "editor/inspector_dock.h"
 #include "editor/node_dock.h"
 #include "editor/node_dock.h"
-#include "editor/script_templates/templates.gen.h"
 #endif
 #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)
 #define CACHED_STRING_NAME(m_var) (CSharpLanguage::get_singleton()->get_string_names().m_var)
 
 

+ 3 - 3
modules/mono/csharp_script.h

@@ -31,15 +31,15 @@
 #ifndef CSHARP_SCRIPT_H
 #ifndef CSHARP_SCRIPT_H
 #define 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/doc_data.h"
 #include "core/io/resource_loader.h"
 #include "core/io/resource_loader.h"
 #include "core/io/resource_saver.h"
 #include "core/io/resource_saver.h"
 #include "core/object/script_language.h"
 #include "core/object/script_language.h"
 #include "core/templates/self_list.h"
 #include "core/templates/self_list.h"
 
 
-#include "mono_gc_handle.h"
-#include "mono_gd/gd_mono.h"
-
 #ifdef TOOLS_ENABLED
 #ifdef TOOLS_ENABLED
 #include "editor/editor_plugin.h"
 #include "editor/editor_plugin.h"
 #endif
 #endif

+ 5 - 5
modules/mono/editor/bindings_generator.cpp

@@ -32,6 +32,11 @@
 
 
 #if defined(DEBUG_METHODS_ENABLED) && defined(TOOLS_ENABLED)
 #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/config/engine.h"
 #include "core/core_constants.h"
 #include "core/core_constants.h"
 #include "core/io/compression.h"
 #include "core/io/compression.h"
@@ -40,11 +45,6 @@
 #include "core/os/os.h"
 #include "core/os/os.h"
 #include "main/main.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) {
 StringBuilder &operator<<(StringBuilder &r_sb, const String &p_string) {
 	r_sb.append(p_string);
 	r_sb.append(p_string);
 	return r_sb;
 	return r_sb;

+ 5 - 4
modules/mono/editor/bindings_generator.h

@@ -31,16 +31,17 @@
 #ifndef BINDINGS_GENERATOR_H
 #ifndef BINDINGS_GENERATOR_H
 #define 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/doc_data.h"
 #include "core/object/class_db.h"
 #include "core/object/class_db.h"
 #include "core/string/string_builder.h"
 #include "core/string/string_builder.h"
+#include "core/string/ustring.h"
 #include "editor/doc_tools.h"
 #include "editor/doc_tools.h"
 #include "editor/editor_help.h"
 #include "editor/editor_help.h"
 
 
-#if defined(DEBUG_METHODS_ENABLED) && defined(TOOLS_ENABLED)
-
-#include "core/string/ustring.h"
-
 class BindingsGenerator {
 class BindingsGenerator {
 	struct ConstantInterface {
 	struct ConstantInterface {
 		String name;
 		String name;

+ 9 - 10
modules/mono/editor/editor_internal_calls.cpp

@@ -30,9 +30,12 @@
 
 
 #include "editor_internal_calls.h"
 #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/config/project_settings.h"
 #include "core/os/os.h"
 #include "core/os/os.h"
@@ -46,13 +49,9 @@
 #include "editor/plugins/script_editor_plugin.h"
 #include "editor/plugins/script_editor_plugin.h"
 #include "main/main.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
 #ifdef __cplusplus
 extern "C" {
 extern "C" {

+ 3 - 3
modules/mono/editor/hostfxr_resolver.cpp

@@ -60,6 +60,9 @@ SOFTWARE.
 
 
 #include "hostfxr_resolver.h"
 #include "hostfxr_resolver.h"
 
 
+#include "../utils/path_utils.h"
+#include "semver.h"
+
 #include "core/config/engine.h"
 #include "core/config/engine.h"
 #include "core/io/dir_access.h"
 #include "core/io/dir_access.h"
 #include "core/io/file_access.h"
 #include "core/io/file_access.h"
@@ -70,9 +73,6 @@ SOFTWARE.
 #include <windows.h>
 #include <windows.h>
 #endif
 #endif
 
 
-#include "../utils/path_utils.h"
-#include "semver.h"
-
 // We don't use libnethost as it gives us issues with some compilers.
 // 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
 // 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.
 // same function names for easier comparing in case we need to update this in the future.

+ 7 - 8
modules/mono/glue/runtime_interop.cpp

@@ -30,6 +30,13 @@
 
 
 #include "runtime_interop.h"
 #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/engine.h"
 #include "core/config/project_settings.h"
 #include "core/config/project_settings.h"
 #include "core/debugger/engine_debugger.h"
 #include "core/debugger/engine_debugger.h"
@@ -44,14 +51,6 @@
 #include "editor/editor_file_system.h"
 #include "editor/editor_file_system.h"
 #endif
 #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
 #ifdef __cplusplus
 extern "C" {
 extern "C" {
 #endif
 #endif

+ 7 - 7
modules/mono/godotsharp_dirs.cpp

@@ -30,6 +30,13 @@
 
 
 #include "godotsharp_dirs.h"
 #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/config/project_settings.h"
 #include "core/io/dir_access.h"
 #include "core/io/dir_access.h"
 #include "core/os/os.h"
 #include "core/os/os.h"
@@ -39,13 +46,6 @@
 #include "editor/editor_paths.h"
 #include "editor/editor_paths.h"
 #endif
 #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 {
 namespace GodotSharpDirs {
 
 
 String _get_expected_build_config() {
 String _get_expected_build_config() {

+ 2 - 2
modules/mono/managed_callable.h

@@ -31,12 +31,12 @@
 #ifndef MANAGED_CALLABLE_H
 #ifndef MANAGED_CALLABLE_H
 #define MANAGED_CALLABLE_H
 #define MANAGED_CALLABLE_H
 
 
+#include "mono_gc_handle.h"
+
 #include "core/os/mutex.h"
 #include "core/os/mutex.h"
 #include "core/templates/self_list.h"
 #include "core/templates/self_list.h"
 #include "core/variant/callable.h"
 #include "core/variant/callable.h"
 
 
-#include "mono_gc_handle.h"
-
 class ManagedCallable : public CallableCustom {
 class ManagedCallable : public CallableCustom {
 	friend class CSharpLanguage;
 	friend class CSharpLanguage;
 	GCHandleIntPtr delegate_handle;
 	GCHandleIntPtr delegate_handle;

+ 9 - 10
modules/mono/mono_gd/gd_mono.cpp

@@ -30,26 +30,25 @@
 
 
 #include "gd_mono.h"
 #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 "../csharp_script.h"
 #include "../glue/runtime_interop.h"
 #include "../glue/runtime_interop.h"
 #include "../godotsharp_dirs.h"
 #include "../godotsharp_dirs.h"
-#include "../utils/path_utils.h"
-#include "gd_mono_cache.h"
-
 #include "../thirdparty/coreclr_delegates.h"
 #include "../thirdparty/coreclr_delegates.h"
 #include "../thirdparty/hostfxr.h"
 #include "../thirdparty/hostfxr.h"
+#include "../utils/path_utils.h"
+#include "gd_mono_cache.h"
 
 
 #ifdef TOOLS_ENABLED
 #ifdef TOOLS_ENABLED
 #include "../editor/hostfxr_resolver.h"
 #include "../editor/hostfxr_resolver.h"
 #endif
 #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
 #ifdef UNIX_ENABLED
 #include <dlfcn.h>
 #include <dlfcn.h>
 #endif
 #endif

+ 2 - 2
modules/mono/mono_gd/gd_mono.h

@@ -31,10 +31,10 @@
 #ifndef GD_MONO_H
 #ifndef GD_MONO_H
 #define GD_MONO_H
 #define GD_MONO_H
 
 
-#include "core/io/config_file.h"
-
 #include "../godotsharp_defs.h"
 #include "../godotsharp_defs.h"
 
 
+#include "core/io/config_file.h"
+
 #ifndef GD_CLR_STDCALL
 #ifndef GD_CLR_STDCALL
 #ifdef WIN32
 #ifdef WIN32
 #define GD_CLR_STDCALL __stdcall
 #define GD_CLR_STDCALL __stdcall

+ 3 - 2
modules/mono/mono_gd/gd_mono_cache.h

@@ -31,11 +31,10 @@
 #ifndef GD_MONO_CACHE_H
 #ifndef GD_MONO_CACHE_H
 #define GD_MONO_CACHE_H
 #define GD_MONO_CACHE_H
 
 
-#include <stdint.h>
-
 #include "../csharp_script.h"
 #include "../csharp_script.h"
 #include "../interop_types.h"
 #include "../interop_types.h"
 #include "../mono_gc_handle.h"
 #include "../mono_gc_handle.h"
+
 #include "core/object/object.h"
 #include "core/object/object.h"
 #include "core/string/string_name.h"
 #include "core/string/string_name.h"
 #include "core/string/ustring.h"
 #include "core/string/ustring.h"
@@ -43,6 +42,8 @@
 #include "core/variant/dictionary.h"
 #include "core/variant/dictionary.h"
 #include "core/variant/variant.h"
 #include "core/variant/variant.h"
 
 
+#include <stdint.h>
+
 class CSharpScript;
 class CSharpScript;
 
 
 namespace GDMonoCache {
 namespace GDMonoCache {

+ 14 - 12
modules/mono/mono_gd/support/android_support.cpp

@@ -32,8 +32,21 @@
 
 
 #if defined(ANDROID_ENABLED)
 #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 <mono/utils/mono-dl-fallback.h>
+
+#include <dlfcn.h> // dlopen, dlsym
 #include <sys/system_properties.h>
 #include <sys/system_properties.h>
 #include <cstddef>
 #include <cstddef>
 
 
@@ -43,17 +56,6 @@
 #include <ifaddrs.h>
 #include <ifaddrs.h>
 #endif
 #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
 // Warning: JNI boilerplate ahead... continue at your own risk
 
 
 namespace gdmono {
 namespace gdmono {

+ 3 - 3
modules/mono/mono_gd/support/ios_support.mm

@@ -32,12 +32,12 @@
 
 
 #if defined(IOS_ENABLED)
 #if defined(IOS_ENABLED)
 
 
-#import <Foundation/Foundation.h>
-#include <os/log.h>
+#include "../gd_mono_marshal.h"
 
 
 #include "core/ustring.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
 // Implemented mostly following: https://github.com/mono/mono/blob/master/sdks/ios/app/runtime.m
 
 

+ 2 - 2
modules/mono/register_types.cpp

@@ -30,10 +30,10 @@
 
 
 #include "register_types.h"
 #include "register_types.h"
 
 
-#include "core/config/engine.h"
-
 #include "csharp_script.h"
 #include "csharp_script.h"
 
 
+#include "core/config/engine.h"
+
 CSharpLanguage *script_language_cs = nullptr;
 CSharpLanguage *script_language_cs = nullptr;
 Ref<ResourceFormatLoaderCSharpScript> resource_loader_cs;
 Ref<ResourceFormatLoaderCSharpScript> resource_loader_cs;
 Ref<ResourceFormatSaverCSharpScript> resource_saver_cs;
 Ref<ResourceFormatSaverCSharpScript> resource_saver_cs;

+ 2 - 2
modules/mono/signal_awaiter_utils.h

@@ -31,11 +31,11 @@
 #ifndef SIGNAL_AWAITER_UTILS_H
 #ifndef SIGNAL_AWAITER_UTILS_H
 #define SIGNAL_AWAITER_UTILS_H
 #define SIGNAL_AWAITER_UTILS_H
 
 
-#include "core/object/ref_counted.h"
-
 #include "csharp_script.h"
 #include "csharp_script.h"
 #include "mono_gc_handle.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);
 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 {
 class BaseSignalCallable : public CallableCustom {

Some files were not shown because too many files changed in this diff