Merge pull request #117535 from Repiteo/ci/validate-includes
CI: Add `#include` validation hook
This commit is contained in:
+1
-1
@@ -123,7 +123,7 @@ IncludeCategories:
|
||||
Priority: 20
|
||||
- Regex: ^"(modules|platform)/.*"$
|
||||
Priority: 30
|
||||
- Regex: ^"thirdparty/.*"$
|
||||
- Regex: ^<thirdparty/.*>$
|
||||
Priority: 40
|
||||
- Regex: ^<(windows|Jolt/Jolt|platform_gl)\.h>$
|
||||
Priority: 50
|
||||
|
||||
@@ -110,11 +110,17 @@ repos:
|
||||
additional_dependencies: [xmlschema]
|
||||
|
||||
- id: validate-codeowners
|
||||
name: validate codeowners
|
||||
name: validate-codeowners
|
||||
language: python
|
||||
entry: python misc/scripts/validate_codeowners.py
|
||||
args: [--unowned]
|
||||
|
||||
- id: validate-includes
|
||||
name: validate-includes
|
||||
language: python
|
||||
entry: python misc/scripts/validate_includes.py
|
||||
files: \.(c|h|cpp|hpp|cc|hh|cxx|hxx|m|mm|inc)$
|
||||
|
||||
- id: eslint
|
||||
name: eslint
|
||||
language: node
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
#include "gdextension_function_loader.h"
|
||||
|
||||
#include "gdextension.h"
|
||||
#include "core/extension/gdextension.h"
|
||||
|
||||
Error GDExtensionFunctionLoader::open_library(const String &p_path) {
|
||||
ERR_FAIL_COND_V_MSG(!p_path.begins_with("libgodot://"), ERR_FILE_NOT_FOUND, "Function based GDExtensions should have a path starting with libgodot://");
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "gdextension_interface.gen.h"
|
||||
#include "core/extension/gdextension_interface.gen.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
#include "core/os/thread.h"
|
||||
#endif
|
||||
|
||||
#include "thirdparty/gamepadmotionhelpers/GamepadMotion.hpp"
|
||||
#include <thirdparty/gamepadmotionhelpers/GamepadMotion.hpp>
|
||||
|
||||
#define STANDARD_GRAVITY 9.80665f
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
#include "core/io/zip_io.h"
|
||||
|
||||
#include "thirdparty/misc/fastlz.h"
|
||||
#include <thirdparty/misc/fastlz.h>
|
||||
|
||||
#include <zstd.h>
|
||||
|
||||
|
||||
@@ -30,9 +30,8 @@
|
||||
|
||||
#include "file_access_patched.h"
|
||||
|
||||
#include "file_access_pack.h"
|
||||
|
||||
#include "core/io/delta_encoding.h"
|
||||
#include "core/io/file_access_pack.h"
|
||||
#include "core/os/os.h"
|
||||
|
||||
Error FileAccessPatched::_apply_patch() const {
|
||||
|
||||
@@ -30,8 +30,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "file_access.h"
|
||||
#include "file_access_memory.h"
|
||||
#include "core/io/file_access.h"
|
||||
#include "core/io/file_access_memory.h"
|
||||
|
||||
class FileAccessPatched : public FileAccess {
|
||||
GDSOFTCLASS(FileAccessPatched, FileAccess);
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
|
||||
#include "core/io/file_access_pack.h"
|
||||
|
||||
#include "thirdparty/minizip/unzip.h"
|
||||
#include <thirdparty/minizip/unzip.h>
|
||||
|
||||
class ZipArchive : public PackSource {
|
||||
public:
|
||||
|
||||
@@ -30,9 +30,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "http_client.h"
|
||||
|
||||
#include "core/crypto/crypto.h"
|
||||
#include "core/io/http_client.h"
|
||||
#include "core/io/ip.h"
|
||||
|
||||
class StreamPeerTCP;
|
||||
|
||||
+2
-2
@@ -33,8 +33,8 @@
|
||||
#include "core/io/file_access.h"
|
||||
|
||||
// This file serves as the Godot interface to minizip.
|
||||
#include "thirdparty/minizip/unzip.h" // IWYU pragma: export
|
||||
#include "thirdparty/minizip/zip.h" // IWYU pragma: export
|
||||
#include <thirdparty/minizip/unzip.h> // IWYU pragma: export
|
||||
#include <thirdparty/minizip/zip.h> // IWYU pragma: export
|
||||
|
||||
// Get the current file info and safely convert the full filepath to a String.
|
||||
int godot_unzip_get_current_file_info(unzFile p_zip_file, unz_file_info64 &r_file_info, String &r_filepath);
|
||||
|
||||
+1
-2
@@ -50,8 +50,7 @@
|
||||
// TYPE_BODY
|
||||
// and pairable_mask is either 0 if static, or set to all if non static
|
||||
|
||||
#include "bvh_tree.h"
|
||||
|
||||
#include "core/math/bvh_tree.h"
|
||||
#include "core/math/geometry_3d.h"
|
||||
#include "core/os/mutex.h"
|
||||
|
||||
|
||||
+10
-10
@@ -169,8 +169,8 @@ template <typename T, int NUM_TREES, int MAX_CHILDREN, int MAX_ITEMS, typename U
|
||||
class BVH_Tree {
|
||||
friend class BVH;
|
||||
|
||||
#include "bvh_pair.inc"
|
||||
#include "bvh_structs.inc"
|
||||
#include "core/math/bvh_pair.inc"
|
||||
#include "core/math/bvh_structs.inc"
|
||||
|
||||
public:
|
||||
BVH_Tree() {
|
||||
@@ -440,14 +440,14 @@ private:
|
||||
return child_node_id;
|
||||
}
|
||||
|
||||
#include "bvh_cull.inc"
|
||||
#include "bvh_debug.inc"
|
||||
#include "bvh_integrity.inc"
|
||||
#include "bvh_logic.inc"
|
||||
#include "bvh_misc.inc"
|
||||
#include "bvh_public.inc"
|
||||
#include "bvh_refit.inc"
|
||||
#include "bvh_split.inc"
|
||||
#include "core/math/bvh_cull.inc"
|
||||
#include "core/math/bvh_debug.inc"
|
||||
#include "core/math/bvh_integrity.inc"
|
||||
#include "core/math/bvh_logic.inc"
|
||||
#include "core/math/bvh_misc.inc"
|
||||
#include "core/math/bvh_public.inc"
|
||||
#include "core/math/bvh_refit.inc"
|
||||
#include "core/math/bvh_split.inc"
|
||||
};
|
||||
|
||||
#undef VERBOSE_PRINT
|
||||
|
||||
+1
-1
@@ -35,7 +35,7 @@
|
||||
#include "core/string/ustring.h"
|
||||
#include "core/templates/hash_map.h"
|
||||
|
||||
#include "thirdparty/misc/ok_color.h"
|
||||
#include <thirdparty/misc/ok_color.h>
|
||||
|
||||
uint32_t Color::to_argb32() const {
|
||||
uint32_t c = (uint8_t)Math::round(a * 255.0f);
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
#include "core/templates/local_vector.h"
|
||||
#include "core/templates/vector.h"
|
||||
|
||||
#include "thirdparty/misc/r128.h"
|
||||
#include <thirdparty/misc/r128.h>
|
||||
|
||||
class Delaunay3D {
|
||||
struct Simplex;
|
||||
|
||||
@@ -33,11 +33,11 @@
|
||||
#include "core/math/math_funcs_binary.h"
|
||||
|
||||
GODOT_GCC_WARNING_PUSH_AND_IGNORE("-Walloc-zero")
|
||||
#include "thirdparty/clipper2/include/clipper2/clipper.h"
|
||||
#include <thirdparty/clipper2/include/clipper2/clipper.h>
|
||||
GODOT_GCC_WARNING_POP
|
||||
#include "thirdparty/misc/polypartition.h"
|
||||
#include <thirdparty/misc/polypartition.h>
|
||||
#define STB_RECT_PACK_IMPLEMENTATION
|
||||
#include "thirdparty/misc/stb_rect_pack.h"
|
||||
#include <thirdparty/misc/stb_rect_pack.h>
|
||||
|
||||
const int clipper_precision = 5; // Based on CMP_EPSILON.
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
#include "core/math/math_funcs.h"
|
||||
|
||||
#include "thirdparty/misc/pcg.h"
|
||||
#include <thirdparty/misc/pcg.h>
|
||||
|
||||
#include <cmath> // ldexp
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
|
||||
#ifdef MINGW_ENABLED
|
||||
#define MINGW_STDTHREAD_REDUNDANCY_WARNING
|
||||
#include "thirdparty/mingw-std-threads/mingw.condition_variable.h"
|
||||
#include <thirdparty/mingw-std-threads/mingw.condition_variable.h>
|
||||
#define THREADING_NAMESPACE mingw_stdthread
|
||||
#else
|
||||
#include <condition_variable>
|
||||
|
||||
+1
-1
@@ -34,7 +34,7 @@
|
||||
|
||||
#ifdef MINGW_ENABLED
|
||||
#define MINGW_STDTHREAD_REDUNDANCY_WARNING
|
||||
#include "thirdparty/mingw-std-threads/mingw.mutex.h"
|
||||
#include <thirdparty/mingw-std-threads/mingw.mutex.h>
|
||||
#define THREADING_NAMESPACE mingw_stdthread
|
||||
#else
|
||||
#include <mutex>
|
||||
|
||||
+1
-1
@@ -43,7 +43,7 @@
|
||||
|
||||
#ifdef MINGW_ENABLED
|
||||
#define MINGW_STDTHREAD_REDUNDANCY_WARNING
|
||||
#include "thirdparty/mingw-std-threads/mingw.thread.h"
|
||||
#include <thirdparty/mingw-std-threads/mingw.thread.h>
|
||||
#define THREADING_NAMESPACE mingw_stdthread
|
||||
#else
|
||||
#include <thread>
|
||||
|
||||
+1
-1
@@ -34,7 +34,7 @@
|
||||
|
||||
#ifdef MINGW_ENABLED
|
||||
#define MINGW_STDTHREAD_REDUNDANCY_WARNING
|
||||
#include "thirdparty/mingw-std-threads/mingw.shared_mutex.h"
|
||||
#include <thirdparty/mingw-std-threads/mingw.shared_mutex.h>
|
||||
#define THREADING_NAMESPACE mingw_stdthread
|
||||
#else
|
||||
#include <shared_mutex>
|
||||
|
||||
+2
-2
@@ -40,8 +40,8 @@
|
||||
|
||||
#ifdef MINGW_ENABLED
|
||||
#define MINGW_STDTHREAD_REDUNDANCY_WARNING
|
||||
#include "thirdparty/mingw-std-threads/mingw.condition_variable.h"
|
||||
#include "thirdparty/mingw-std-threads/mingw.mutex.h"
|
||||
#include <thirdparty/mingw-std-threads/mingw.condition_variable.h>
|
||||
#include <thirdparty/mingw-std-threads/mingw.mutex.h>
|
||||
#define THREADING_NAMESPACE mingw_stdthread
|
||||
#else
|
||||
#include <condition_variable>
|
||||
|
||||
+1
-1
@@ -52,7 +52,7 @@
|
||||
|
||||
#ifdef MINGW_ENABLED
|
||||
#define MINGW_STDTHREAD_REDUNDANCY_WARNING
|
||||
#include "thirdparty/mingw-std-threads/mingw.thread.h"
|
||||
#include <thirdparty/mingw-std-threads/mingw.thread.h>
|
||||
#define THREADING_NAMESPACE mingw_stdthread
|
||||
#else
|
||||
#include <thread>
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
#include "core/templates/pair.h"
|
||||
|
||||
extern "C" {
|
||||
#include "thirdparty/misc/smaz.h"
|
||||
#include <thirdparty/misc/smaz.h>
|
||||
}
|
||||
|
||||
struct CompressedString {
|
||||
|
||||
@@ -47,7 +47,7 @@ STATIC_ASSERT_INCOMPLETE_TYPE(class, Object);
|
||||
#include "core/variant/variant.h"
|
||||
#include "core/version_generated.gen.h"
|
||||
|
||||
#include "thirdparty/grisu2/grisu2.h"
|
||||
#include <thirdparty/grisu2/grisu2.h>
|
||||
|
||||
#include <cstdio>
|
||||
|
||||
|
||||
@@ -30,8 +30,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "hash_map.h"
|
||||
#include "list.h"
|
||||
#include "core/templates/hash_map.h"
|
||||
#include "core/templates/list.h"
|
||||
|
||||
template <typename TKey, typename TData, typename Hasher = HashMapHasherDefault, typename Comparator = HashMapComparatorDefault<TKey>, void (*BeforeEvict)(TKey &, TData &) = nullptr>
|
||||
class LRUCache {
|
||||
|
||||
@@ -28,8 +28,6 @@
|
||||
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
/**************************************************************************/
|
||||
|
||||
#include "variant.h"
|
||||
|
||||
#include "core/debugger/engine_debugger.h"
|
||||
#include "core/io/compression.h"
|
||||
#include "core/io/marshalls.h"
|
||||
@@ -38,6 +36,7 @@
|
||||
#include "core/templates/local_vector.h"
|
||||
#include "core/variant/binder_common.h"
|
||||
#include "core/variant/method_ptrcall.h"
|
||||
#include "core/variant/variant.h"
|
||||
#include "core/variant/variant_internal.h"
|
||||
|
||||
typedef void (*VariantFunc)(Variant &r_ret, Variant &p_self, const Variant **p_args);
|
||||
|
||||
@@ -30,10 +30,9 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "variant.h"
|
||||
|
||||
#include "core/templates/a_hash_map.h"
|
||||
#include "core/variant/binder_common.h"
|
||||
#include "core/variant/variant.h"
|
||||
#include "core/variant/variant_internal.h"
|
||||
|
||||
template <typename T>
|
||||
|
||||
@@ -30,10 +30,9 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "variant.h"
|
||||
|
||||
#include "core/variant/method_ptrcall.h"
|
||||
#include "core/variant/type_info.h"
|
||||
#include "core/variant/variant.h"
|
||||
#include "core/variant/variant_internal.h"
|
||||
|
||||
template <typename Evaluator>
|
||||
|
||||
@@ -30,9 +30,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "variant.h"
|
||||
|
||||
#include "core/variant/method_ptrcall.h"
|
||||
#include "core/variant/variant.h"
|
||||
#include "core/variant/variant_internal.h"
|
||||
|
||||
/**** NAMED SETTERS AND GETTERS ****/
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "variant.h"
|
||||
#include "core/variant/variant.h"
|
||||
|
||||
struct VariantUtilityFunctions {
|
||||
// Math
|
||||
|
||||
@@ -1276,7 +1276,7 @@
|
||||
#define snd_midi_event_encode snd_midi_event_encode_dylibloader_orig_asound
|
||||
#define snd_midi_event_encode_byte snd_midi_event_encode_byte_dylibloader_orig_asound
|
||||
#define snd_midi_event_decode snd_midi_event_decode_dylibloader_orig_asound
|
||||
#include "thirdparty/linuxbsd_headers/alsa/asoundlib.h"
|
||||
#include <thirdparty/linuxbsd_headers/alsa/asoundlib.h>
|
||||
#undef snd_asoundlib_version
|
||||
#undef snd_dlopen
|
||||
#undef snd_dlsym
|
||||
|
||||
@@ -1278,7 +1278,7 @@
|
||||
#define snd_midi_event_encode snd_midi_event_encode_dylibloader_orig_asound
|
||||
#define snd_midi_event_encode_byte snd_midi_event_encode_byte_dylibloader_orig_asound
|
||||
#define snd_midi_event_decode snd_midi_event_decode_dylibloader_orig_asound
|
||||
#include "thirdparty/linuxbsd_headers/alsa/asoundlib.h" // IWYU pragma: export.
|
||||
#include <thirdparty/linuxbsd_headers/alsa/asoundlib.h> // IWYU pragma: export.
|
||||
#undef snd_asoundlib_version
|
||||
#undef snd_dlopen
|
||||
#undef snd_dlsym
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
#include "core/os/os.h"
|
||||
|
||||
#ifdef SOWRAP_ENABLED
|
||||
#include "asound-so_wrap.h"
|
||||
#include "drivers/alsa/asound-so_wrap.h"
|
||||
#else
|
||||
#include <alsa/asoundlib.h>
|
||||
#endif
|
||||
|
||||
@@ -30,13 +30,12 @@
|
||||
|
||||
#import "app_delegate_service.h"
|
||||
|
||||
#import "godot_view_apple_embedded.h"
|
||||
#import "godot_view_controller.h"
|
||||
#import "os_apple_embedded.h"
|
||||
|
||||
#include "core/config/project_settings.h"
|
||||
#include "core/os/main_loop.h"
|
||||
#include "core/os/os.h"
|
||||
#import "drivers/apple_embedded/godot_view_apple_embedded.h"
|
||||
#import "drivers/apple_embedded/godot_view_controller.h"
|
||||
#import "drivers/apple_embedded/os_apple_embedded.h"
|
||||
#import "drivers/coreaudio/audio_driver_coreaudio.h"
|
||||
#include "main/main.h"
|
||||
|
||||
|
||||
@@ -30,10 +30,9 @@
|
||||
|
||||
#import "apple_embedded.h"
|
||||
|
||||
#import "app_delegate_service.h"
|
||||
#import "godot_view_controller.h"
|
||||
|
||||
#include "core/object/class_db.h"
|
||||
#import "drivers/apple_embedded/app_delegate_service.h"
|
||||
#import "drivers/apple_embedded/godot_view_controller.h"
|
||||
|
||||
#import <CoreHaptics/CoreHaptics.h>
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@@ -31,8 +31,8 @@
|
||||
#pragma once
|
||||
|
||||
// IWYU pragma: begin_exports.
|
||||
#import "app_delegate_service.h"
|
||||
#import "godot_app_delegate.h"
|
||||
#import "godot_view_apple_embedded.h"
|
||||
#import "godot_view_controller.h"
|
||||
#import "drivers/apple_embedded/app_delegate_service.h"
|
||||
#import "drivers/apple_embedded/godot_app_delegate.h"
|
||||
#import "drivers/apple_embedded/godot_view_apple_embedded.h"
|
||||
#import "drivers/apple_embedded/godot_view_controller.h"
|
||||
// IWYU pragma: end_exports.
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
#include "servers/rendering/rendering_device.h"
|
||||
|
||||
#if defined(VULKAN_ENABLED)
|
||||
#import "rendering_context_driver_vulkan_apple_embedded.h"
|
||||
#import "drivers/apple_embedded/rendering_context_driver_vulkan_apple_embedded.h"
|
||||
|
||||
#include <drivers/vulkan/godot_vulkan.h>
|
||||
#endif // VULKAN_ENABLED
|
||||
|
||||
@@ -30,19 +30,18 @@
|
||||
|
||||
#import "display_server_apple_embedded.h"
|
||||
|
||||
#import "app_delegate_service.h"
|
||||
#import "apple_embedded.h"
|
||||
#import "godot_keyboard_input_view.h"
|
||||
#import "godot_view_apple_embedded.h"
|
||||
#import "godot_view_controller.h"
|
||||
#import "key_mapping_apple_embedded.h"
|
||||
#import "os_apple_embedded.h"
|
||||
#import "tts_apple_embedded.h"
|
||||
|
||||
#include "core/config/project_settings.h"
|
||||
#include "core/input/input.h"
|
||||
#include "core/io/file_access_pack.h"
|
||||
#include "core/os/os.h"
|
||||
#import "drivers/apple_embedded/app_delegate_service.h"
|
||||
#import "drivers/apple_embedded/apple_embedded.h"
|
||||
#import "drivers/apple_embedded/godot_keyboard_input_view.h"
|
||||
#import "drivers/apple_embedded/godot_view_apple_embedded.h"
|
||||
#import "drivers/apple_embedded/godot_view_controller.h"
|
||||
#import "drivers/apple_embedded/key_mapping_apple_embedded.h"
|
||||
#import "drivers/apple_embedded/os_apple_embedded.h"
|
||||
#import "drivers/apple_embedded/tts_apple_embedded.h"
|
||||
#include "servers/display/native_menu.h"
|
||||
|
||||
#import <GameController/GameController.h>
|
||||
|
||||
@@ -30,9 +30,8 @@
|
||||
|
||||
#import "godot_app_delegate.h"
|
||||
|
||||
#import "app_delegate_service.h"
|
||||
|
||||
#include "core/typedefs.h"
|
||||
#import "drivers/apple_embedded/app_delegate_service.h"
|
||||
|
||||
@implementation GDTApplicationDelegate
|
||||
|
||||
|
||||
@@ -30,10 +30,9 @@
|
||||
|
||||
#import "godot_keyboard_input_view.h"
|
||||
|
||||
#import "display_server_apple_embedded.h"
|
||||
#import "os_apple_embedded.h"
|
||||
|
||||
#include "core/os/keyboard.h"
|
||||
#import "drivers/apple_embedded/display_server_apple_embedded.h"
|
||||
#import "drivers/apple_embedded/os_apple_embedded.h"
|
||||
|
||||
@interface GDTKeyboardInputView () <UITextViewDelegate>
|
||||
|
||||
|
||||
@@ -30,13 +30,12 @@
|
||||
|
||||
#import "godot_view_apple_embedded.h"
|
||||
|
||||
#import "display_layer_apple_embedded.h"
|
||||
#import "display_server_apple_embedded.h"
|
||||
#import "godot_view_renderer.h"
|
||||
|
||||
#include "core/config/project_settings.h"
|
||||
#include "core/os/keyboard.h"
|
||||
#include "core/string/ustring.h"
|
||||
#import "drivers/apple_embedded/display_layer_apple_embedded.h"
|
||||
#import "drivers/apple_embedded/display_server_apple_embedded.h"
|
||||
#import "drivers/apple_embedded/godot_view_renderer.h"
|
||||
|
||||
#import <CoreMotion/CoreMotion.h>
|
||||
|
||||
|
||||
@@ -30,14 +30,13 @@
|
||||
|
||||
#import "godot_view_controller.h"
|
||||
|
||||
#import "display_server_apple_embedded.h"
|
||||
#import "godot_keyboard_input_view.h"
|
||||
#import "godot_view_apple_embedded.h"
|
||||
#import "godot_view_renderer.h"
|
||||
#import "key_mapping_apple_embedded.h"
|
||||
#import "os_apple_embedded.h"
|
||||
|
||||
#include "core/config/project_settings.h"
|
||||
#import "drivers/apple_embedded/display_server_apple_embedded.h"
|
||||
#import "drivers/apple_embedded/godot_keyboard_input_view.h"
|
||||
#import "drivers/apple_embedded/godot_view_apple_embedded.h"
|
||||
#import "drivers/apple_embedded/godot_view_renderer.h"
|
||||
#import "drivers/apple_embedded/key_mapping_apple_embedded.h"
|
||||
#import "drivers/apple_embedded/os_apple_embedded.h"
|
||||
#include "servers/camera/camera_server.h"
|
||||
|
||||
#import <AVFoundation/AVFoundation.h>
|
||||
|
||||
@@ -30,12 +30,11 @@
|
||||
|
||||
#import "godot_view_renderer.h"
|
||||
|
||||
#import "display_server_apple_embedded.h"
|
||||
#import "os_apple_embedded.h"
|
||||
|
||||
#include "core/config/project_settings.h"
|
||||
#include "core/os/keyboard.h"
|
||||
#include "core/os/os.h"
|
||||
#import "drivers/apple_embedded/display_server_apple_embedded.h"
|
||||
#import "drivers/apple_embedded/os_apple_embedded.h"
|
||||
#include "main/main.h"
|
||||
#include "servers/audio/audio_server.h"
|
||||
|
||||
|
||||
@@ -32,8 +32,7 @@
|
||||
|
||||
#ifdef APPLE_EMBEDDED_ENABLED
|
||||
|
||||
#import "apple_embedded.h"
|
||||
|
||||
#import "drivers/apple_embedded/apple_embedded.h"
|
||||
#import "drivers/coreaudio/audio_driver_coreaudio.h"
|
||||
#include "drivers/unix/os_unix.h"
|
||||
#include "servers/audio/audio_server.h"
|
||||
@@ -43,7 +42,7 @@
|
||||
#include "servers/rendering/rendering_device.h"
|
||||
|
||||
#if defined(VULKAN_ENABLED)
|
||||
#import "rendering_context_driver_vulkan_apple_embedded.h"
|
||||
#import "drivers/apple_embedded/rendering_context_driver_vulkan_apple_embedded.h"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
@@ -32,11 +32,6 @@
|
||||
|
||||
#ifdef APPLE_EMBEDDED_ENABLED
|
||||
|
||||
#import "app_delegate_service.h"
|
||||
#import "display_server_apple_embedded.h"
|
||||
#import "godot_view_apple_embedded.h"
|
||||
#import "godot_view_controller.h"
|
||||
|
||||
#include "core/config/engine.h"
|
||||
#include "core/config/project_settings.h"
|
||||
#include "core/io/dir_access.h"
|
||||
@@ -45,6 +40,10 @@
|
||||
#include "core/os/os.h"
|
||||
#include "core/profiling/profiling.h"
|
||||
#import "drivers/apple/os_log_logger.h"
|
||||
#import "drivers/apple_embedded/app_delegate_service.h"
|
||||
#import "drivers/apple_embedded/display_server_apple_embedded.h"
|
||||
#import "drivers/apple_embedded/godot_view_apple_embedded.h"
|
||||
#import "drivers/apple_embedded/godot_view_controller.h"
|
||||
#ifdef SDL_ENABLED
|
||||
#include "drivers/sdl/joypad_sdl.h"
|
||||
#endif
|
||||
|
||||
@@ -44,8 +44,9 @@ GODOT_CLANG_WARNING_POP
|
||||
#include <dxgi1_6.h>
|
||||
|
||||
#if !defined(_MSC_VER)
|
||||
#include <guiddef.h>
|
||||
#include <thirdparty/directx_headers/include/dxguids/dxguids.h>
|
||||
|
||||
#include <guiddef.h>
|
||||
#endif
|
||||
|
||||
using Microsoft::WRL::ComPtr;
|
||||
|
||||
@@ -41,8 +41,9 @@
|
||||
#include <dxgi1_6.h>
|
||||
|
||||
#if !defined(_MSC_VER)
|
||||
#include <guiddef.h>
|
||||
#include <thirdparty/directx_headers/include/dxguids/dxguids.h>
|
||||
|
||||
#include <guiddef.h>
|
||||
#endif
|
||||
|
||||
using Microsoft::WRL::ComPtr;
|
||||
|
||||
@@ -50,10 +50,10 @@
|
||||
|
||||
#include "metal3_objects.h"
|
||||
|
||||
#include "metal_utils.h"
|
||||
#include "pixel_formats.h"
|
||||
#include "rendering_device_driver_metal3.h"
|
||||
#include "rendering_shader_container_metal.h"
|
||||
#include "drivers/metal/metal_utils.h"
|
||||
#include "drivers/metal/pixel_formats.h"
|
||||
#include "drivers/metal/rendering_device_driver_metal3.h"
|
||||
#include "drivers/metal/rendering_shader_container_metal.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
|
||||
@@ -50,8 +50,7 @@
|
||||
/* permissions and limitations under the License. */
|
||||
/**************************************************************************/
|
||||
|
||||
#include "metal_objects_shared.h"
|
||||
|
||||
#include "drivers/metal/metal_objects_shared.h"
|
||||
#include "servers/rendering/rendering_device_driver.h"
|
||||
|
||||
#include <Metal/Metal.hpp>
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
#include "metal_device_profile.h"
|
||||
|
||||
#include "metal_utils.h"
|
||||
#include "drivers/metal/metal_utils.h"
|
||||
|
||||
Mutex MetalDeviceProfile::profiles_lock;
|
||||
HashMap<MetalDeviceProfile::ProfileKey, MetalDeviceProfile> MetalDeviceProfile::profiles;
|
||||
|
||||
@@ -50,9 +50,8 @@
|
||||
|
||||
#include "metal_device_properties.h"
|
||||
|
||||
#include "metal_utils.h"
|
||||
|
||||
#include "core/os/os.h"
|
||||
#include "drivers/metal/metal_utils.h"
|
||||
#include "servers/rendering/renderer_rd/effects/metal_fx.h"
|
||||
|
||||
#include <MetalFX/MetalFX.hpp>
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
#include "metal_objects_shared.h"
|
||||
|
||||
#include "rendering_device_driver_metal.h"
|
||||
#include "drivers/metal/rendering_device_driver_metal.h"
|
||||
|
||||
#include <os/signpost.h>
|
||||
#include <simd/simd.h>
|
||||
|
||||
@@ -30,10 +30,10 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "metal_device_properties.h"
|
||||
#include "metal_utils.h"
|
||||
#include "pixel_formats.h"
|
||||
#include "sha256_digest.h"
|
||||
#include "drivers/metal/metal_device_properties.h"
|
||||
#include "drivers/metal/metal_utils.h"
|
||||
#include "drivers/metal/pixel_formats.h"
|
||||
#include "drivers/metal/sha256_digest.h"
|
||||
|
||||
#include <CoreFoundation/CoreFoundation.h>
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
|
||||
#include "pixel_formats.h"
|
||||
|
||||
#include "metal_utils.h"
|
||||
#include "drivers/metal/metal_utils.h"
|
||||
|
||||
#if TARGET_OS_IPHONE || TARGET_OS_TV
|
||||
#if !(__IPHONE_OS_VERSION_MAX_ALLOWED >= 160400) // iOS/tvOS 16.4
|
||||
|
||||
@@ -54,9 +54,8 @@
|
||||
|
||||
GODOT_CLANG_WARNING_PUSH_AND_IGNORE("-Wdeprecated-declarations")
|
||||
|
||||
#include "inflection_map.h"
|
||||
#include "metal_device_properties.h"
|
||||
|
||||
#include "drivers/metal/inflection_map.h"
|
||||
#include "drivers/metal/metal_device_properties.h"
|
||||
#include "servers/rendering/rendering_device_commons.h"
|
||||
|
||||
#ifdef __OBJC__
|
||||
|
||||
@@ -30,12 +30,11 @@
|
||||
|
||||
#include "rendering_context_driver_metal.h"
|
||||
|
||||
#include "metal3_objects.h"
|
||||
#include "metal_objects_shared.h"
|
||||
#include "rendering_device_driver_metal3.h"
|
||||
|
||||
#include "core/os/os.h"
|
||||
#include "core/templates/sort_array.h"
|
||||
#include "drivers/metal/metal3_objects.h"
|
||||
#include "drivers/metal/metal_objects_shared.h"
|
||||
#include "drivers/metal/rendering_device_driver_metal3.h"
|
||||
|
||||
#include <objc/message.h>
|
||||
#include <os/log.h>
|
||||
|
||||
@@ -50,10 +50,6 @@
|
||||
|
||||
#include "rendering_device_driver_metal.h"
|
||||
|
||||
#include "pixel_formats.h"
|
||||
#include "rendering_context_driver_metal.h"
|
||||
#include "rendering_shader_container_metal.h"
|
||||
|
||||
#include "core/config/engine.h"
|
||||
#include "core/config/project_settings.h"
|
||||
#include "core/io/marshalls.h"
|
||||
@@ -61,6 +57,9 @@
|
||||
#include "core/string/ustring.h"
|
||||
#include "core/templates/hash_map.h"
|
||||
#include "drivers/apple/foundation_helpers.h"
|
||||
#include "drivers/metal/pixel_formats.h"
|
||||
#include "drivers/metal/rendering_context_driver_metal.h"
|
||||
#include "drivers/metal/rendering_shader_container_metal.h"
|
||||
|
||||
#include <Metal/Metal.hpp>
|
||||
#include <os/log.h>
|
||||
|
||||
@@ -30,9 +30,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "metal_device_profile.h"
|
||||
#include "metal_objects_shared.h"
|
||||
|
||||
#include "drivers/metal/metal_device_profile.h"
|
||||
#include "drivers/metal/metal_objects_shared.h"
|
||||
#include "servers/rendering/rendering_device_driver.h"
|
||||
|
||||
#include <Metal/Metal.hpp>
|
||||
|
||||
@@ -30,12 +30,11 @@
|
||||
|
||||
#include "rendering_device_driver_metal3.h"
|
||||
|
||||
#include "pixel_formats.h"
|
||||
#include "rendering_context_driver_metal.h"
|
||||
|
||||
#include "core/config/project_settings.h"
|
||||
#include "core/os/os.h"
|
||||
#include "core/string/ustring.h"
|
||||
#include "drivers/metal/pixel_formats.h"
|
||||
#include "drivers/metal/rendering_context_driver_metal.h"
|
||||
|
||||
namespace MTL3 {
|
||||
|
||||
|
||||
@@ -30,8 +30,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "metal3_objects.h"
|
||||
#include "rendering_device_driver_metal.h"
|
||||
#include "drivers/metal/metal3_objects.h"
|
||||
#include "drivers/metal/rendering_device_driver_metal.h"
|
||||
|
||||
#include <Metal/Metal.hpp>
|
||||
|
||||
|
||||
@@ -30,14 +30,13 @@
|
||||
|
||||
#include "rendering_shader_container_metal.h"
|
||||
|
||||
#include "metal_utils.h"
|
||||
|
||||
#include "core/io/file_access.h"
|
||||
#include "core/io/marshalls.h"
|
||||
#include "core/os/os.h"
|
||||
#include "core/templates/fixed_vector.h"
|
||||
#include "drivers/metal/metal_utils.h"
|
||||
|
||||
#include "thirdparty/spirv-reflect/spirv_reflect.h"
|
||||
#include <thirdparty/spirv-reflect/spirv_reflect.h>
|
||||
|
||||
#include <Metal/Metal.hpp>
|
||||
#include <spirv.hpp>
|
||||
|
||||
@@ -30,9 +30,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "metal_device_profile.h"
|
||||
#include "sha256_digest.h"
|
||||
|
||||
#include "drivers/metal/metal_device_profile.h"
|
||||
#include "drivers/metal/sha256_digest.h"
|
||||
#include "servers/rendering/rendering_device_driver.h"
|
||||
#include "servers/rendering/rendering_shader_container.h"
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
#include "servers/audio/audio_server.h"
|
||||
|
||||
#ifdef SOWRAP_ENABLED
|
||||
#include "pulse-so_wrap.h" // IWYU pragma: keep. Relies on pulseaudio.h transitive includes.
|
||||
#include "drivers/pulseaudio/pulse-so_wrap.h" // IWYU pragma: keep. Relies on pulseaudio.h transitive includes.
|
||||
#else
|
||||
#include <pulse/pulseaudio.h>
|
||||
#endif
|
||||
|
||||
@@ -356,7 +356,7 @@
|
||||
#define pa_timeval_store pa_timeval_store_dylibloader_orig_pulse
|
||||
#define pa_timeval_load pa_timeval_load_dylibloader_orig_pulse
|
||||
#define pa_rtclock_now pa_rtclock_now_dylibloader_orig_pulse
|
||||
#include "thirdparty/linuxbsd_headers/pulse/pulseaudio.h"
|
||||
#include <thirdparty/linuxbsd_headers/pulse/pulseaudio.h>
|
||||
#undef pa_get_library_version
|
||||
#undef pa_bytes_per_second
|
||||
#undef pa_frame_size
|
||||
|
||||
@@ -358,7 +358,7 @@
|
||||
#define pa_timeval_store pa_timeval_store_dylibloader_orig_pulse
|
||||
#define pa_timeval_load pa_timeval_load_dylibloader_orig_pulse
|
||||
#define pa_rtclock_now pa_rtclock_now_dylibloader_orig_pulse
|
||||
#include "thirdparty/linuxbsd_headers/pulse/pulseaudio.h" // IWYU pragma: export.
|
||||
#include <thirdparty/linuxbsd_headers/pulse/pulseaudio.h> // IWYU pragma: export.
|
||||
#undef pa_get_library_version
|
||||
#undef pa_bytes_per_second
|
||||
#undef pa_frame_size
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
#ifdef ANDROID_ENABLED
|
||||
// We could drop this file once we up our API level to 24,
|
||||
// where the NDK's ifaddrs.h supports to needed getifaddrs.
|
||||
#include "thirdparty/misc/ifaddrs-android.h"
|
||||
#include <thirdparty/misc/ifaddrs-android.h>
|
||||
#else
|
||||
#ifdef __FreeBSD__
|
||||
#include <sys/types.h>
|
||||
|
||||
@@ -36,14 +36,14 @@
|
||||
#include "core/templates/fixed_vector.h"
|
||||
#include "drivers/vulkan/vulkan_hooks.h"
|
||||
|
||||
#include "thirdparty/misc/smolv.h"
|
||||
#include <thirdparty/misc/smolv.h>
|
||||
|
||||
#if defined(SWAPPY_FRAME_PACING_ENABLED)
|
||||
#include "platform/android/java_godot_wrapper.h"
|
||||
#include "platform/android/os_android.h"
|
||||
#include "platform/android/thread_jandroid.h"
|
||||
|
||||
#include "thirdparty/swappy-frame-pacing/swappyVk.h"
|
||||
#include <thirdparty/swappy-frame-pacing/swappyVk.h>
|
||||
#endif
|
||||
|
||||
#define ARRAY_SIZE(a) std_size(a)
|
||||
|
||||
@@ -42,8 +42,8 @@
|
||||
#define _DEBUG
|
||||
#endif
|
||||
#endif
|
||||
#include "thirdparty/re-spirv/re-spirv.h"
|
||||
#include "thirdparty/vulkan/vk_mem_alloc.h"
|
||||
#include <thirdparty/re-spirv/re-spirv.h>
|
||||
#include <thirdparty/vulkan/vk_mem_alloc.h>
|
||||
|
||||
#include <drivers/vulkan/godot_vulkan.h>
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
#include "rendering_shader_container_vulkan.h"
|
||||
|
||||
#include "thirdparty/misc/smolv.h"
|
||||
#include <thirdparty/misc/smolv.h>
|
||||
|
||||
// RenderingShaderContainerVulkan
|
||||
|
||||
|
||||
@@ -32,11 +32,10 @@
|
||||
|
||||
#include "dir_access_windows.h"
|
||||
|
||||
#include "file_access_windows.h"
|
||||
|
||||
#include "core/os/memory.h"
|
||||
#include "core/os/os.h"
|
||||
#include "core/string/print_string.h"
|
||||
#include "drivers/windows/file_access_windows.h"
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
|
||||
@@ -30,8 +30,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "editor_export_platform.h"
|
||||
#include "editor_export_plugin.h"
|
||||
#include "editor/export/editor_export_platform.h"
|
||||
#include "editor/export/editor_export_plugin.h"
|
||||
|
||||
class Timer;
|
||||
|
||||
|
||||
@@ -30,12 +30,11 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "plugin_config_apple_embedded.h"
|
||||
|
||||
#include "core/config/project_settings.h"
|
||||
#include "core/io/dir_access.h"
|
||||
#include "core/templates/safe_refcount.h"
|
||||
#include "editor/export/editor_export_platform.h"
|
||||
#include "editor/export/plugin_config_apple_embedded.h"
|
||||
#include "scene/resources/image_texture.h"
|
||||
|
||||
#include <sys/stat.h>
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "editor_export_platform.h"
|
||||
#include "editor/export/editor_export_platform.h"
|
||||
|
||||
class ImageTexture;
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
#include "lipo.h"
|
||||
|
||||
#include "macho.h"
|
||||
#include "editor/export/macho.h"
|
||||
|
||||
bool LipO::is_lipo(const String &p_path) {
|
||||
Ref<FileAccess> fb = FileAccess::open(p_path, FileAccess::READ);
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "resource_importer_scene.h"
|
||||
#include "editor/import/3d/resource_importer_scene.h"
|
||||
|
||||
class PostImportPluginSkeletonRenamer : public EditorScenePostImportPlugin {
|
||||
GDCLASS(PostImportPluginSkeletonRenamer, EditorScenePostImportPlugin);
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "resource_importer_scene.h"
|
||||
#include "editor/import/3d/resource_importer_scene.h"
|
||||
|
||||
class PostImportPluginSkeletonRestFixer : public EditorScenePostImportPlugin {
|
||||
GDCLASS(PostImportPluginSkeletonRestFixer, EditorScenePostImportPlugin);
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "resource_importer_scene.h"
|
||||
#include "editor/import/3d/resource_importer_scene.h"
|
||||
|
||||
class PostImportPluginSkeletonTrackOrganizer : public EditorScenePostImportPlugin {
|
||||
GDCLASS(PostImportPluginSkeletonTrackOrganizer, EditorScenePostImportPlugin);
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "resource_importer_scene.h"
|
||||
#include "editor/import/3d/resource_importer_scene.h"
|
||||
|
||||
class EditorOBJImporter : public EditorSceneFormatImporter {
|
||||
GDCLASS(EditorOBJImporter, EditorSceneFormatImporter);
|
||||
|
||||
@@ -30,8 +30,6 @@
|
||||
|
||||
#include "dynamic_font_import_settings.h"
|
||||
|
||||
#include "unicode_ranges.inc"
|
||||
|
||||
#include "core/config/project_settings.h"
|
||||
#include "core/object/callable_mp.h"
|
||||
#include "core/os/os.h"
|
||||
@@ -39,6 +37,7 @@
|
||||
#include "editor/editor_node.h"
|
||||
#include "editor/editor_string_names.h"
|
||||
#include "editor/file_system/editor_file_system.h"
|
||||
#include "editor/import/unicode_ranges.inc"
|
||||
#include "editor/inspector/editor_inspector.h"
|
||||
#include "editor/settings/editor_settings.h"
|
||||
#include "editor/themes/editor_scale.h"
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
#include "scene/resources/bit_map.h"
|
||||
#include "scene/resources/mesh.h"
|
||||
|
||||
#include "thirdparty/clipper2/include/clipper2/clipper.h"
|
||||
#include <thirdparty/clipper2/include/clipper2/clipper.h>
|
||||
|
||||
#define PRECISION 1
|
||||
|
||||
|
||||
@@ -30,8 +30,6 @@
|
||||
|
||||
#include "tile_data_editors.h"
|
||||
|
||||
#include "tile_set_editor.h"
|
||||
|
||||
#include "core/math/geometry_2d.h"
|
||||
#include "core/math/random_pcg.h"
|
||||
#include "core/object/callable_mp.h"
|
||||
@@ -41,6 +39,7 @@
|
||||
#include "editor/editor_string_names.h"
|
||||
#include "editor/editor_undo_redo_manager.h"
|
||||
#include "editor/inspector/editor_properties.h"
|
||||
#include "editor/scene/2d/tiles/tile_set_editor.h"
|
||||
#include "editor/settings/editor_settings.h"
|
||||
#include "editor/themes/editor_scale.h"
|
||||
#include "scene/gui/control.h"
|
||||
|
||||
@@ -30,9 +30,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "tile_atlas_view.h"
|
||||
|
||||
#include "editor/inspector/editor_properties.h"
|
||||
#include "editor/scene/2d/tiles/tile_atlas_view.h"
|
||||
#include "scene/gui/box_container.h"
|
||||
|
||||
class Label;
|
||||
|
||||
@@ -30,8 +30,6 @@
|
||||
|
||||
#include "tile_map_layer_editor.h"
|
||||
|
||||
#include "tiles_editor_plugin.h"
|
||||
|
||||
#include "core/input/input.h"
|
||||
#include "core/math/geometry_2d.h"
|
||||
#include "core/math/random_pcg.h"
|
||||
@@ -43,6 +41,7 @@
|
||||
#include "editor/editor_undo_redo_manager.h"
|
||||
#include "editor/inspector/editor_resource_preview.h"
|
||||
#include "editor/inspector/multi_node_edit.h"
|
||||
#include "editor/scene/2d/tiles/tiles_editor_plugin.h"
|
||||
#include "editor/scene/canvas_item_editor_plugin.h"
|
||||
#include "editor/settings/editor_command_palette.h"
|
||||
#include "editor/settings/editor_settings.h"
|
||||
|
||||
@@ -30,9 +30,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "tile_atlas_view.h"
|
||||
#include "tile_data_editors.h"
|
||||
|
||||
#include "editor/scene/2d/tiles/tile_atlas_view.h"
|
||||
#include "editor/scene/2d/tiles/tile_data_editors.h"
|
||||
#include "scene/gui/split_container.h"
|
||||
#include "scene/resources/2d/tile_set.h"
|
||||
|
||||
|
||||
@@ -30,9 +30,6 @@
|
||||
|
||||
#include "tile_set_editor.h"
|
||||
|
||||
#include "tile_data_editors.h"
|
||||
#include "tiles_editor_plugin.h"
|
||||
|
||||
#include "core/object/callable_mp.h"
|
||||
#include "core/object/class_db.h"
|
||||
#include "editor/editor_node.h"
|
||||
@@ -40,6 +37,8 @@
|
||||
#include "editor/file_system/editor_file_system.h"
|
||||
#include "editor/gui/editor_file_dialog.h"
|
||||
#include "editor/inspector/editor_inspector.h"
|
||||
#include "editor/scene/2d/tiles/tile_data_editors.h"
|
||||
#include "editor/scene/2d/tiles/tiles_editor_plugin.h"
|
||||
#include "editor/settings/editor_command_palette.h"
|
||||
#include "editor/settings/editor_settings.h"
|
||||
#include "editor/themes/editor_scale.h"
|
||||
|
||||
@@ -30,8 +30,6 @@
|
||||
|
||||
#include "tiles_editor_plugin.h"
|
||||
|
||||
#include "tile_set_editor.h"
|
||||
|
||||
#include "core/object/callable_mp.h"
|
||||
#include "core/os/mutex.h"
|
||||
#include "core/os/os.h"
|
||||
@@ -40,6 +38,7 @@
|
||||
#include "editor/editor_node.h"
|
||||
#include "editor/editor_string_names.h"
|
||||
#include "editor/inspector/multi_node_edit.h"
|
||||
#include "editor/scene/2d/tiles/tile_set_editor.h"
|
||||
#include "editor/scene/canvas_item_editor_plugin.h"
|
||||
#include "editor/settings/editor_settings.h"
|
||||
#include "editor/themes/editor_scale.h"
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "shader_editor.h"
|
||||
#include "editor/shader/shader_editor.h"
|
||||
|
||||
class EditorShaderLanguagePlugin : public RefCounted {
|
||||
GDCLASS(EditorShaderLanguagePlugin, RefCounted);
|
||||
|
||||
@@ -30,9 +30,8 @@
|
||||
|
||||
#include "text_shader_language_plugin.h"
|
||||
|
||||
#include "text_shader_editor.h"
|
||||
|
||||
#include "core/string/string_builder.h"
|
||||
#include "editor/shader/text_shader_editor.h"
|
||||
#include "servers/rendering/shader_types.h"
|
||||
|
||||
bool TextShaderLanguagePlugin::handles_shader(const Ref<Shader> &p_shader) const {
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
#include "visual_shader_language_plugin.h"
|
||||
|
||||
#include "visual_shader_editor_plugin.h"
|
||||
#include "editor/shader/visual_shader_editor_plugin.h"
|
||||
|
||||
bool VisualShaderLanguagePlugin::handles_shader(const Ref<Shader> &p_shader) const {
|
||||
return Object::cast_to<VisualShader>(p_shader.ptr()) != nullptr;
|
||||
|
||||
Executable
+111
@@ -0,0 +1,111 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
if __name__ != "__main__":
|
||||
raise ImportError(f'Utility script "{__file__}" should not be used as a module!')
|
||||
|
||||
import os
|
||||
from pathlib import Path
|
||||
|
||||
if Path(os.getcwd()).as_posix() != (ROOT := Path(__file__).parent.parent.parent).as_posix():
|
||||
raise RuntimeError(f'Utility script "{__file__}" must be run from the repository root!')
|
||||
|
||||
import argparse
|
||||
import re
|
||||
from dataclasses import dataclass
|
||||
|
||||
BASE_FOLDER = Path(__file__).resolve().parent.parent.parent
|
||||
RE_INCLUDES = re.compile(
|
||||
r"^#(?P<keyword>include|import) " # Both `include` and `import` keywords valid.
|
||||
r'(?P<sequence>[<"])' # Handle both styles of char wrappers. Does NOT handle macro expansion.
|
||||
r'(?P<path>.+?)[>"]', # Resolve path of include itself. Can safely assume the sequence matches.
|
||||
re.RegexFlag.MULTILINE,
|
||||
)
|
||||
|
||||
|
||||
@dataclass
|
||||
class IncludeData:
|
||||
path: str
|
||||
is_angle: bool
|
||||
is_import: bool
|
||||
|
||||
@staticmethod
|
||||
def from_match(match: re.Match[str]):
|
||||
items = match.groupdict()
|
||||
return IncludeData(
|
||||
items["path"],
|
||||
items["sequence"] == "<",
|
||||
items["keyword"] == "import",
|
||||
)
|
||||
|
||||
def copy(self):
|
||||
return IncludeData(self.path, self.is_angle, self.is_import)
|
||||
|
||||
def __str__(self):
|
||||
return "#{keyword} {rbracket}{path}{lbracket}".format(
|
||||
keyword="import" if self.is_import else "include",
|
||||
rbracket="<" if self.is_angle else '"',
|
||||
path=self.path,
|
||||
lbracket=">" if self.is_angle else '"',
|
||||
)
|
||||
|
||||
|
||||
def validate_includes(path: Path) -> int:
|
||||
ret = 0
|
||||
content = path.read_text(encoding="utf-8")
|
||||
|
||||
for data in map(IncludeData.from_match, RE_INCLUDES.finditer(content)):
|
||||
original_data = data.copy()
|
||||
|
||||
if "\\" in data.path:
|
||||
data.path = data.path.replace("\\", "/")
|
||||
|
||||
if data.path.startswith("thirdparty/"):
|
||||
data.is_angle = True
|
||||
|
||||
if (relative_path := path.parent / data.path).exists():
|
||||
# Relative includes are only permitted under certain circumstances.
|
||||
|
||||
if relative_path.name.split(".")[0] == path.name.split(".")[0]:
|
||||
# Identical leading names permitted
|
||||
pass
|
||||
|
||||
elif ("modules" in relative_path.parts and "modules" in path.parts) or (
|
||||
"platform" in relative_path.parts and "platform" in path.parts
|
||||
):
|
||||
# Modules and platforms can use relative includes if constrained to the module/platform itself.
|
||||
pass
|
||||
|
||||
else:
|
||||
data.path = relative_path.resolve().relative_to(BASE_FOLDER).as_posix()
|
||||
|
||||
if original_data != data:
|
||||
content = content.replace(f"{original_data}", f"{data}")
|
||||
ret += 1
|
||||
|
||||
if ret:
|
||||
with open(path, "w", encoding="utf-8", newline="\n") as file:
|
||||
file.write(content)
|
||||
|
||||
return ret
|
||||
|
||||
|
||||
def main() -> int:
|
||||
parser = argparse.ArgumentParser(description="Validate C/C++ includes, correcting if necessary")
|
||||
parser.add_argument("files", nargs="+", help="A list of files to validate")
|
||||
args = parser.parse_args()
|
||||
|
||||
ret = 0
|
||||
|
||||
for file in map(Path, args.files):
|
||||
ret += validate_includes(file)
|
||||
|
||||
return ret
|
||||
|
||||
|
||||
try:
|
||||
raise SystemExit(main())
|
||||
except KeyboardInterrupt:
|
||||
import signal
|
||||
|
||||
signal.signal(signal.SIGINT, signal.SIG_DFL)
|
||||
os.kill(os.getpid(), signal.SIGINT)
|
||||
@@ -34,7 +34,7 @@
|
||||
#include "core/string/print_string.h"
|
||||
|
||||
#define BCDEC_IMPLEMENTATION
|
||||
#include "thirdparty/misc/bcdec.h"
|
||||
#include <thirdparty/misc/bcdec.h>
|
||||
|
||||
inline void bcdec_bc6h_half_s(const void *compressedBlock, void *decompressedBlock, int destinationPitch) {
|
||||
bcdec_bc6h_half(compressedBlock, decompressedBlock, destinationPitch, true);
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
#include "scene/resources/3d/concave_polygon_shape_3d.h"
|
||||
#endif // PHYSICS_3D_DISABLED
|
||||
|
||||
#include "thirdparty/misc/mikktspace.h"
|
||||
#include <thirdparty/misc/mikktspace.h>
|
||||
|
||||
class Mesh;
|
||||
class NavigationMesh;
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
|
||||
#include "modules/regex/regex.h"
|
||||
|
||||
#include "thirdparty/doctest/doctest.h"
|
||||
#include <thirdparty/doctest/doctest.h>
|
||||
|
||||
class TestGDScriptLanguageProtocolInitializer {
|
||||
public:
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
#include "scene/resources/surface_tool.h"
|
||||
|
||||
#include "thirdparty/meshoptimizer/meshoptimizer.h"
|
||||
#include <thirdparty/meshoptimizer/meshoptimizer.h>
|
||||
|
||||
void initialize_meshoptimizer_module(ModuleInitializationLevel p_level) {
|
||||
if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) {
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
#include "core/io/file_access.h"
|
||||
#include "core/object/class_db.h"
|
||||
|
||||
#include "thirdparty/dr_libs/dr_bridge.h"
|
||||
#include <thirdparty/dr_libs/dr_bridge.h>
|
||||
|
||||
int AudioStreamPlaybackMP3::_mix_internal(AudioFrame *p_buffer, int p_frames) {
|
||||
if (!active) {
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
#include "servers/audio/audio_stream.h"
|
||||
|
||||
#include "thirdparty/dr_libs/dr_mp3.h"
|
||||
#include <thirdparty/dr_libs/dr_mp3.h>
|
||||
|
||||
class AudioStreamMP3;
|
||||
|
||||
|
||||
@@ -39,8 +39,8 @@
|
||||
#include "scene/resources/2d/navigation_mesh_source_geometry_data_2d.h"
|
||||
#include "scene/resources/2d/navigation_polygon.h"
|
||||
|
||||
#include "thirdparty/clipper2/include/clipper2/clipper.h"
|
||||
#include "thirdparty/misc/polypartition.h"
|
||||
#include <thirdparty/clipper2/include/clipper2/clipper.h>
|
||||
#include <thirdparty/misc/polypartition.h>
|
||||
|
||||
NavMeshGenerator2D *NavMeshGenerator2D::singleton = nullptr;
|
||||
Mutex NavMeshGenerator2D::baking_navmesh_mutex;
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
#include "noise.h"
|
||||
|
||||
#include "thirdparty/misc/FastNoiseLite.h"
|
||||
#include <thirdparty/misc/FastNoiseLite.h>
|
||||
|
||||
typedef fastnoiselite::FastNoiseLite _FastNoiseLite;
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
#endif // ANDROID_ENABLED
|
||||
#if defined(LINUXBSD_ENABLED) && defined(EGL_ENABLED)
|
||||
#ifdef GLAD_ENABLED
|
||||
#include "thirdparty/glad/glad/egl.h"
|
||||
#include <thirdparty/glad/glad/egl.h>
|
||||
#else
|
||||
#include <EGL/egl.h>
|
||||
#endif // GLAD_ENABLED
|
||||
@@ -65,8 +65,8 @@
|
||||
#ifdef X11_ENABLED
|
||||
#define GL_GLEXT_PROTOTYPES 1
|
||||
#define GL3_PROTOTYPES 1
|
||||
#include "thirdparty/glad/glad/gl.h"
|
||||
#include "thirdparty/glad/glad/glx.h"
|
||||
#include <thirdparty/glad/glad/gl.h>
|
||||
#include <thirdparty/glad/glad/glx.h>
|
||||
#endif // X11_ENABLED
|
||||
#endif // defined(GLES3_ENABLED) && !defined(MACOS_ENABLED)
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user