Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Spartan322 committed Dec 4, 2024
2 parents b06d20b + 1f47e4c commit 95ce7da
Show file tree
Hide file tree
Showing 949 changed files with 32,979 additions and 7,745 deletions.
53 changes: 8 additions & 45 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Commented out parameters are those with the same value as base LLVM style.
# We can uncomment them if we want to change their value, or enforce the
# chosen value in case the base style changes (last sync: Clang 19.1.0).
# chosen value in case the base style changes (last sync: Clang 17.0.6).
BasedOnStyle: LLVM
AccessModifierOffset: -4
AlignAfterOpenBracket: DontAlign
Expand All @@ -10,74 +10,48 @@ AlignAfterOpenBracket: DontAlign
# AcrossEmptyLines: false
# AcrossComments: false
# AlignCompound: false
# AlignFunctionPointers: false
# PadOperators: true
# AlignConsecutiveBitFields:
# Enabled: false
# AcrossEmptyLines: false
# AcrossComments: false
# AlignCompound: false
# AlignFunctionPointers: false
# PadOperators: false
# AlignConsecutiveDeclarations:
# Enabled: false
# AcrossEmptyLines: false
# AcrossComments: false
# AlignCompound: false
# AlignFunctionPointers: false
# PadOperators: false
# AlignConsecutiveMacros:
# Enabled: false
# AcrossEmptyLines: false
# AcrossComments: false
# AlignCompound: false
# AlignFunctionPointers: false
# PadOperators: false
# AlignConsecutiveShortCaseStatements:
# Enabled: false
# AcrossEmptyLines: false
# AcrossComments: false
# AlignCaseArrows: false
# AlignCaseColons: false
# AlignConsecutiveTableGenBreakingDAGArgColons:
# Enabled: false
# AcrossEmptyLines: false
# AcrossComments: false
# AlignCompound: false
# AlignFunctionPointers: false
# PadOperators: false
# AlignConsecutiveTableGenCondOperatorColons:
# Enabled: false
# AcrossEmptyLines: false
# AcrossComments: false
# AlignCompound: false
# AlignFunctionPointers: false
# PadOperators: false
# AlignConsecutiveTableGenDefinitionColons:
# Enabled: false
# AcrossEmptyLines: false
# AcrossComments: false
# AlignCompound: false
# AlignFunctionPointers: false
# PadOperators: false
# AlignEscapedNewlines: Right
AlignOperands: DontAlign
AlignTrailingComments:
Kind: Never
OverEmptyLines: 0
# AllowAllArgumentsOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: false
# AllowBreakBeforeNoexceptSpecifier: Never
# AllowShortBlocksOnASingleLine: Never
# AllowShortCaseExpressionOnASingleLine: true
# AllowShortCaseLabelsOnASingleLine: false
# AllowShortCompoundRequirementOnASingleLine: true
# AllowShortEnumsOnASingleLine: true
# AllowShortFunctionsOnASingleLine: All
# AllowShortIfStatementsOnASingleLine: Never
# AllowShortLambdasOnASingleLine: All
# AllowShortLoopsOnASingleLine: false
# AlwaysBreakAfterDefinitionReturnType: None
# AlwaysBreakAfterReturnType: None
# AlwaysBreakBeforeMultilineStrings: false
# AlwaysBreakTemplateDeclarations: MultiLine
# AttributeMacros:
# - __capability
# BinPackArguments: true
Expand All @@ -102,21 +76,17 @@ AllowAllParametersOfDeclarationOnNextLine: false
# SplitEmptyFunction: true
# SplitEmptyRecord: true
# SplitEmptyNamespace: true
# BreakAdjacentStringLiterals: true
# BreakAfterAttributes: Leave
# BreakAfterAttributes: Never
# BreakAfterJavaFieldAnnotations: false
# BreakAfterReturnType: None
# BreakArrays: true
# BreakBeforeBinaryOperators: None
# BreakBeforeBraces: Attach
# BreakBeforeConceptDeclarations: Always
# BreakBeforeInlineASMColon: OnlyMultiline
# BreakBeforeTernaryOperators: true
BreakConstructorInitializers: AfterColon
# BreakFunctionDefinitionParameters: false
# BreakInheritanceList: BeforeColon
# BreakStringLiterals: true
# BreakTemplateDeclarations: MultiLine
ColumnLimit: 0
# CommentPragmas: '^ IWYU pragma:'
# CompactNamespaces: false
Expand Down Expand Up @@ -174,16 +144,13 @@ JavaImportGroups:
- javax
# JavaScriptQuotes: Leave
# JavaScriptWrapImports: true
KeepEmptyLines:
AtEndOfFile: false
AtStartOfBlock: false
AtStartOfFile: false
# KeepEmptyLinesAtEOF: false
KeepEmptyLinesAtTheStartOfBlocks: false
# LambdaBodyIndentation: Signature
# Language: Cpp
# LineEnding: DeriveLF
# MacroBlockBegin: ''
# MacroBlockEnd: ''
# MainIncludeChar: Quote
# MaxEmptyLinesToKeep: 1
# NamespaceIndentation: None
# ObjCBinPackProtocolList: Auto
Expand All @@ -198,7 +165,6 @@ PackConstructorInitializers: NextLine
# PenaltyBreakComment: 300
# PenaltyBreakFirstLessLess: 120
# PenaltyBreakOpenParenthesis: 0
# PenaltyBreakScopeResolution: 500
# PenaltyBreakString: 1000
# PenaltyBreakTemplateDeclaration: 10
# PenaltyExcessCharacter: 1000000
Expand All @@ -215,7 +181,6 @@ RemoveSemicolon: true
# RequiresExpressionIndentation: OuterScope
# SeparateDefinitionBlocks: Leave
# ShortNamespaceLines: 1
# SkipMacroDefinitionBody: false
# SortIncludes: CaseSensitive
# SortJavaStaticImport: Before
# SortUsingDeclarations: LexicographicNumeric
Expand All @@ -229,14 +194,14 @@ RemoveSemicolon: true
# SpaceBeforeCtorInitializerColon: true
# SpaceBeforeInheritanceColon: true
# SpaceBeforeJsonColon: false
# SpaceBeforeParens: ControlStatements
# SpaceBeforeParensOptions:
# AfterControlStatements: true
# AfterForeachMacros: true
# AfterFunctionDeclarationName: false
# AfterFunctionDefinitionName: false
# AfterIfMacros: true
# AfterOverloadedOperator: false
# AfterPlacementOperator: true
# AfterRequiresInClause: false
# AfterRequiresInExpression: false
# BeforeNonEmptyParentheses: false
Expand All @@ -251,7 +216,6 @@ SpacesInLineCommentPrefix:
Maximum: -1
# SpacesInParens: Never
# SpacesInParensOptions:
# ExceptDoubleParentheses: false
# InConditionalStatements: false
# InCStyleCasts: false
# InEmptyParentheses: false
Expand All @@ -264,7 +228,6 @@ Standard: c++20
# - Q_UNUSED
# - QT_REQUIRE_VERSION
TabWidth: 4
# TableGenBreakInsideDAGArg: DontBreak
UseTab: Always
# VerilogBreakBetweenInstancePorts: true
# WhitespaceSensitiveMacros:
Expand Down
4 changes: 4 additions & 0 deletions .github/actions/godot-deps/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,7 @@ runs:
python -c "import sys; print(sys.version)"
python -m pip install scons==${{ inputs.scons-version }}
scons --version
- name: Setup problem matchers
shell: bash
run: echo ::add-matcher::misc/utility/problem-matchers.json
7 changes: 3 additions & 4 deletions .github/workflows/godot_cpp_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
with:
sparse-checkout: .github
sparse-checkout: |
.github
misc/utility/problem-matchers.json
- name: Checkout godot-cpp
uses: actions/checkout@v4
Expand All @@ -34,9 +36,6 @@ jobs:
- name: Setup Python and SCons
uses: ./.github/actions/godot-deps

- name: Setup GCC problem matcher
uses: ammaraskar/gcc-problem-matcher@master

- name: Download GDExtension interface and API dump
uses: ./.github/actions/download-artifact
with:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/linux_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,6 @@ jobs:
python-version: 3.8
scons-version: 4.0

- name: Setup GCC problem matcher
uses: ammaraskar/gcc-problem-matcher@master

- name: Compilation
uses: ./.github/actions/godot-build
with:
Expand All @@ -158,6 +155,9 @@ jobs:
- name: Build .NET solutions
if: matrix.build-mono
run: |
# FIXME: C# warnings should be properly handled eventually, but we don't want to clutter
# the GitHub Actions annotations, so remove the associated problem matcher for now.
echo "::remove-matcher owner=msvc::"
./modules/mono/build_scripts/build_assemblies.py --godot-output-dir=./bin --godot-platform=linuxbsd
- name: Prepare artifact
Expand Down
8 changes: 0 additions & 8 deletions .github/workflows/windows_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,14 +86,6 @@ jobs:
- name: Extract pre-built ANGLE static libraries
run: Expand-Archive -Force angle/angle.zip ${{ github.workspace }}/

- name: Setup MSVC problem matcher
if: matrix.compiler == 'msvc'
uses: ammaraskar/msvc-problem-matcher@master

- name: Setup GCC problem matcher
if: matrix.compiler != 'msvc'
uses: ammaraskar/gcc-problem-matcher@master

- name: Compilation
uses: ./.github/actions/godot-build
with:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ xcuserdata/
*.xcscmblueprint
*.xccheckout
*.xcodeproj/*
!misc/misc/dist/ios_xcode/godot_ios.xcodeproj/project.pbxproj

##############################
### Visual Studio specific ###
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,8 @@ repos:
.*\.patch$|
.*\.out$|
modules/gdscript/tests/scripts/parser/features/mixed_indentation_on_blank_lines\.gd$|
modules/gdscript/tests/scripts/parser/warnings/empty_file_newline_comment\.notest\.gd$|
modules/gdscript/tests/scripts/parser/warnings/empty_file_newline\.notest\.gd$|
modules/gdscript/tests/scripts/parser/warnings/empty_file_newline_comment\.norun\.gd$|
modules/gdscript/tests/scripts/parser/warnings/empty_file_newline\.norun\.gd$|
platform/android/java/editor/src/main/java/com/android/.*|
platform/android/java/lib/src/com/google/.*|
tests/data/.*\.bin$
Expand Down
7 changes: 6 additions & 1 deletion COPYRIGHT.txt
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ License: MPL-2.0

Files: ./thirdparty/clipper2/
Comment: Clipper2
Copyright: 2010-2023, Angus Johnson
Copyright: 2010-2024, Angus Johnson
License: BSL-1.0

Files: ./thirdparty/cvtt/
Expand Down Expand Up @@ -343,6 +343,11 @@ Comment: WebP codec
Copyright: 2010, Google Inc.
License: BSD-3-clause

Files: ./thirdparty/manifold/
Comment: Manifold
Copyright: 2020-2024, The Manifold Authors
License: Apache-2.0

Files: ./thirdparty/mbedtls/
Comment: Mbed TLS
Copyright: The Mbed TLS Contributors
Expand Down
8 changes: 6 additions & 2 deletions core/config/project_settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -751,7 +751,7 @@ Error ProjectSettings::_load_settings_binary(const String &p_path) {
cs[slen] = 0;
f->get_buffer((uint8_t *)cs.ptr(), slen);
String key;
key.parse_utf8(cs.ptr());
key.parse_utf8(cs.ptr(), slen);

uint32_t vlen = f->get_32();
Vector<uint8_t> d;
Expand Down Expand Up @@ -1518,7 +1518,11 @@ ProjectSettings::ProjectSettings() {
GLOBAL_DEF("display/window/frame_pacing/android/enable_frame_pacing", true);
GLOBAL_DEF(PropertyInfo(Variant::INT, "display/window/frame_pacing/android/swappy_mode", PROPERTY_HINT_ENUM, "pipeline_forced_on,auto_fps_pipeline_forced_on,auto_fps_auto_pipeline"), 2);

custom_prop_info["rendering/driver/threads/thread_model"] = PropertyInfo(Variant::INT, "rendering/driver/threads/thread_model", PROPERTY_HINT_ENUM, "Single-Unsafe,Single-Safe,Multi-Threaded");
#ifdef DISABLE_DEPRECATED
custom_prop_info["rendering/driver/threads/thread_model"] = PropertyInfo(Variant::INT, "rendering/driver/threads/thread_model", PROPERTY_HINT_ENUM, "Safe:1,Separate");
#else
custom_prop_info["rendering/driver/threads/thread_model"] = PropertyInfo(Variant::INT, "rendering/driver/threads/thread_model", PROPERTY_HINT_ENUM, "Unsafe (deprecated),Safe,Separate");
#endif
GLOBAL_DEF("physics/2d/run_on_separate_thread", false);
GLOBAL_DEF("physics/3d/run_on_separate_thread", false);

Expand Down
6 changes: 6 additions & 0 deletions core/core_bind.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -579,6 +579,11 @@ String OS::get_cache_dir() const {
return ::OS::get_singleton()->get_cache_path();
}

String OS::get_temp_dir() const {
// Exposed as `get_temp_dir()` instead of `get_temp_path()` for consistency with other exposed OS methods.
return ::OS::get_singleton()->get_temp_path();
}

bool OS::is_debug_build() const {
#ifdef DEBUG_ENABLED
return true;
Expand Down Expand Up @@ -707,6 +712,7 @@ void OS::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_config_dir"), &OS::get_config_dir);
ClassDB::bind_method(D_METHOD("get_data_dir"), &OS::get_data_dir);
ClassDB::bind_method(D_METHOD("get_cache_dir"), &OS::get_cache_dir);
ClassDB::bind_method(D_METHOD("get_temp_dir"), &OS::get_temp_dir);
ClassDB::bind_method(D_METHOD("get_unique_id"), &OS::get_unique_id);

ClassDB::bind_method(D_METHOD("get_keycode_string", "code"), &OS::get_keycode_string);
Expand Down
1 change: 1 addition & 0 deletions core/core_bind.h
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,7 @@ class OS : public Object {
String get_config_dir() const;
String get_data_dir() const;
String get_cache_dir() const;
String get_temp_dir() const;

Error set_thread_name(const String &p_name);
::Thread::ID get_thread_caller_id() const;
Expand Down
4 changes: 4 additions & 0 deletions core/crypto/crypto.h
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,10 @@ class ResourceFormatLoaderCrypto : public ResourceFormatLoader {
virtual void get_recognized_extensions(List<String> *p_extensions) const override;
virtual bool handles_type(const String &p_type) const override;
virtual String get_resource_type(const String &p_path) const override;

// Treat certificates as text files, do not generate a `*.{crt,key,pub}.uid` file.
virtual ResourceUID::ID get_resource_uid(const String &p_path) const override { return ResourceUID::INVALID_ID; }
virtual bool has_custom_uid_support() const override { return true; }
};

class ResourceFormatSaverCrypto : public ResourceFormatSaver {
Expand Down
Loading

0 comments on commit 95ce7da

Please sign in to comment.