diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs new file mode 100644 index 000000000..8c4341118 --- /dev/null +++ b/.git-blame-ignore-revs @@ -0,0 +1,11 @@ +# This file contains a list of Git commit hashes that should be hidden from the +# regular Git history. Typically, this includes commits involving mass auto-formatting +# or other normalizations. Commit hashes *must* use the full 40-character notation. +# To apply the ignore list in your local Git client, you must run: +# +# git config blame.ignoreRevsFile .git-blame-ignore-revs +# +# This file is automatically used by GitHub.com's blame view. + +# Style: Replace header guards with `#pragma once` +7056c996dd43ae1aa466c94d95cc2fe63853d8a9 diff --git a/.github/actions/setup-godot-cpp/action.yml b/.github/actions/setup-godot-cpp/action.yml new file mode 100644 index 000000000..1be9293c4 --- /dev/null +++ b/.github/actions/setup-godot-cpp/action.yml @@ -0,0 +1,71 @@ +name: Setup godot-cpp +description: Setup build dependencies for godot-cpp. + +inputs: + platform: + required: true + description: Target platform. + em-version: + default: 3.1.62 + description: Emscripten version. + windows-compiler: + required: true + description: The compiler toolchain to use on Windows ('mingw' or 'msvc'). + type: choice + options: + - mingw + - msvc + default: mingw + mingw-version: + default: 12.2.0 + description: MinGW version. + ndk-version: + default: r23c + description: Android NDK version. + buildtool: + default: scons + description: scons or cmake + scons-version: + default: 4.4.0 + description: SCons version. + + +runs: + using: composite + steps: + - name: Setup Python (for SCons) + uses: actions/setup-python@v5 + with: + python-version: 3.x + + - name: Setup Android dependencies + if: inputs.platform == 'android' + uses: nttld/setup-ndk@v1 + with: + ndk-version: ${{ inputs.ndk-version }} + link-to-sdk: true + + - name: Setup Web dependencies + if: inputs.platform == 'web' + uses: mymindstorm/setup-emsdk@v14 + with: + version: ${{ inputs.em-version }} + no-cache: true + + - name: Setup MinGW for Windows/MinGW build + if: inputs.platform == 'windows' && inputs.windows-compiler == 'mingw' + uses: egor-tensin/setup-mingw@v2 + with: + version: ${{ inputs.mingw-version }} + + - name: Setup SCons + if: ${{ inputs.buildtool == 'scons' }} + shell: bash + run: | + python -c "import sys; print(sys.version)" + python -m pip install scons==${{ inputs.scons-version }} + scons --version + + - name: Install Ninja + if: ${{ inputs.buildtool == 'cmake' }} + uses: ashutoshvarma/setup-ninja@master diff --git a/.github/workflows/ci-cmake.yml b/.github/workflows/ci-cmake.yml new file mode 100644 index 000000000..706c87b9a --- /dev/null +++ b/.github/workflows/ci-cmake.yml @@ -0,0 +1,195 @@ +name: Continuous integration +on: + workflow_call: + +env: + # Only used for the cache key. Increment version to force clean build. + GODOT_BASE_BRANCH: master + # Used to select the version of Godot to run the tests with. + GODOT_TEST_VERSION: master + # Use UTF-8 on Linux. + LANG: en_US.UTF-8 + LC_ALL: en_US.UTF-8 + +concurrency: + group: ci-cmake-${{ github.actor }}-${{ github.head_ref || github.run_number }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + build-cmake: + name: ${{ matrix.name }} + runs-on: ${{ matrix.os }} + env: + EM_VERSION: 3.1.39 + config-flags: + -DCMAKE_C_COMPILER_LAUNCHER=sccache + -DCMAKE_CXX_COMPILER_LAUNCHER=sccache + -DGODOTCPP_ENABLE_TESTING=ON + -DGODOTCPP_BUILD_PROFILE="test/build_profile.json" + SCCACHE_GHA_ENABLED: "true" + + strategy: + fail-fast: false + matrix: + include: + - name: 🐧 Linux (GCC, Makefiles) + os: ubuntu-22.04 + platform: linux + config-flags: -DCMAKE_BUILD_TYPE=Release + artifact-name: godot-cpp-linux-glibc2.27-x86_64-release.cmake + artifact-path: cmake-build/bin/libgodot-cpp.linux.template_release.x86_64.a + run-tests: true + + - name: 🐧 Linux (GCC, Makefiles, Double Precision) + os: ubuntu-22.04 + platform: linux + config-flags: -DCMAKE_BUILD_TYPE=Release -DGODOTCPP_PRECISION=double + artifact-name: godot-cpp-linux-glibc2.27-x86_64-double-release.cmake + artifact-path: cmake-build/bin/libgodot-cpp.linux.template_release.double.x86_64.a + flags: precision=double + run-tests: false + + - name: 🏁 Windows (x86_64, MSVC) + os: windows-2019 + platform: windows + compiler: msvc + build-flags: --config Release + artifact-name: godot-cpp-windows-msvc2019-x86_64-release.cmake + artifact-path: cmake-build/bin/libgodot-cpp.windows.template_release.x86_64.lib + run-tests: false + + - name: 🏁 Windows (x86_64, MinGW, Ninja) + os: windows-2019 + platform: windows + compiler: mingw + config-flags: + -GNinja -DCMAKE_BUILD_TYPE=Release + -DCMAKE_CXX_COMPILER=cc -DCMAKE_CXX_COMPILER=c++ + artifact-name: godot-cpp-linux-mingw-x86_64-release.cmake + artifact-path: cmake-build/bin/libgodot-cpp.windows.template_release.x86_64.a + run-tests: false + + - name: 🍎 macOS (universal, Makefiles) + os: macos-latest + platform: macos + config-flags: -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" + artifact-name: godot-cpp-macos-universal-release.cmake + artifact-path: cmake-build/bin/libgodot-cpp.macos.template_release.universal.a + run-tests: false + + - name: πŸ€– Android (arm64, Ninja) + os: ubuntu-22.04 + platform: android + config-flags: + -G Ninja -DCMAKE_BUILD_TYPE=Release + --toolchain ${ANDROID_HOME}/ndk/23.2.8568313/build/cmake/android.toolchain.cmake + -DANDROID_PLATFORM=21 -DANDROID_ABI=arm64-v8a + artifact-name: godot-cpp-android-arm64-release.cmake + artifact-path: cmake-build/bin/libgodot-cpp.android.template_release.arm64.a + flags: arch=arm64 + run-tests: false + + - name: 🍏 iOS (arm64, XCode) + os: macos-latest + platform: ios + config-flags: + -G Xcode + --toolchain cmake/ios.toolchain.cmake + -DPLATFORM=OS64 + build-flags: --config Release + artifact-name: godot-cpp-ios-arm64-release.cmake + artifact-path: cmake-build/bin/libgodot-cpp.ios.template_release.arm64.a + flags: arch=arm64 + run-tests: false + + - name: 🌐 Web (wasm32, Ninja) + os: ubuntu-22.04 + platform: web + config-flags: + -G Ninja -DCMAKE_BUILD_TYPE=Release + --toolchain ${EMSDK}/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake + artifact-name: godot-cpp-web-wasm32-release.cmake + artifact-path: cmake-build/bin/libgodot-cpp.web.template_release.wasm32.a + run-tests: false + + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Run sccache-cache + uses: mozilla-actions/sccache-action@v0.0.7 + + - name: Setup godot-cpp + uses: ./.github/actions/setup-godot-cpp + with: + platform: ${{ matrix.platform }} + windows-compiler: ${{ matrix.compiler }} + buildtool: cmake + + - name: Configure godot-cpp-test with template_debug + run: > + cmake --log-level=VERBOSE -S . -B cmake-build ${{ env.config-flags }} ${{ matrix.config-flags }} + + - name: Build godot-cpp-test (template_debug) + run: > + cmake --build cmake-build --verbose --target godot-cpp-test ${{ matrix.build-flags }} + + - name: Configure godot-cpp-test with template_release + run: > + cmake --fresh --log-level=VERBOSE -S . -B cmake-build + -DGODOTCPP_TARGET=template_release ${{ env.config-flags }} ${{ matrix.config-flags }} + + - name: Build godot-cpp-test (template_release) + run: > + cmake --build cmake-build --verbose --target godot-cpp-test ${{ matrix.build-flags }} + + - name: Run sccache stat for check + shell: bash + run: ${SCCACHE_PATH} --show-stats + + - name: Download latest Godot artifacts + uses: dsnopek/action-download-artifact@1322f74e2dac9feed2ee76a32d9ae1ca3b4cf4e9 + if: matrix.run-tests && env.GODOT_TEST_VERSION == 'master' + with: + repo: godotengine/godot + branch: master + event: push + workflow: linux_builds.yml + workflow_conclusion: success + name: linux-editor-mono + search_artifacts: true + check_artifacts: true + ensure_latest: true + path: godot-artifacts + + - name: Prepare Godot artifacts for testing + if: matrix.run-tests && env.GODOT_TEST_VERSION == 'master' + run: | + chmod +x ./godot-artifacts/godot.linuxbsd.editor.x86_64.mono + echo "GODOT=$(pwd)/godot-artifacts/godot.linuxbsd.editor.x86_64.mono" >> $GITHUB_ENV + + - name: Download requested Godot version for testing + if: matrix.run-tests && env.GODOT_TEST_VERSION != 'master' + run: | + wget "https://github.com/godotengine/godot-builds/releases/download/${GODOT_TEST_VERSION}/Godot_v${GODOT_TEST_VERSION}_linux.x86_64.zip" -O Godot.zip + unzip -a Godot.zip + chmod +x "Godot_v${GODOT_TEST_VERSION}_linux.x86_64" + echo "GODOT=$(pwd)/Godot_v${GODOT_TEST_VERSION}_linux.x86_64" >> $GITHUB_ENV + + - name: Run tests + if: matrix.run-tests + run: | + $GODOT --headless --version + cd test + # Need to run the editor so .godot is generated... but it crashes! Ignore that :-) + (cd project && (timeout 30 $GODOT --import --headless >/dev/null 2>&1 || true)) + ./run-tests.sh + + - name: Upload artifact + uses: actions/upload-artifact@v4 + with: + name: ${{ matrix.artifact-name }} + path: ${{ matrix.artifact-path }} + if-no-files-found: error diff --git a/.github/workflows/ci.yml b/.github/workflows/ci-scons.yml similarity index 75% rename from .github/workflows/ci.yml rename to .github/workflows/ci-scons.yml index 33b2450d8..b951c29c0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci-scons.yml @@ -12,11 +12,11 @@ env: LC_ALL: en_US.UTF-8 concurrency: - group: ci-${{ github.actor }}-${{ github.head_ref || github.run_number }}-${{ github.ref }} + group: ci-scons-${{ github.actor }}-${{ github.head_ref || github.run_number }}-${{ github.ref }} cancel-in-progress: true jobs: - build: + build-scons: name: ${{ matrix.name }} runs-on: ${{ matrix.os }} strategy: @@ -108,34 +108,12 @@ jobs: cache-name: ${{ matrix.cache-name }} continue-on-error: true - - name: Set up Python (for SCons) - uses: actions/setup-python@v5 + - name: Setup godot-cpp + uses: ./.github/actions/setup-godot-cpp with: - python-version: 3.x - - - name: Android dependencies - if: matrix.platform == 'android' - uses: nttld/setup-ndk@v1 - with: - ndk-version: r23c - link-to-sdk: true - - - name: Web dependencies - if: matrix.platform == 'web' - uses: mymindstorm/setup-emsdk@v14 - with: - version: ${{ env.EM_VERSION }} - no-cache: true - - - name: Setup MinGW for Windows/MinGW build - if: matrix.platform == 'windows' && matrix.flags == 'use_mingw=yes' - uses: egor-tensin/setup-mingw@v2 - with: - version: 12.2.0 - - - name: Install scons - run: | - python -m pip install scons==4.0.0 + platform: ${{ matrix.platform }} + windows-compiler: ${{ contains(matrix.flags, 'use_mingw=yes') && 'mingw' || 'msvc' }} + buildtool: scons - name: Generate godot-cpp sources only run: | @@ -201,45 +179,8 @@ jobs: ./run-tests.sh - name: Upload artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: ${{ matrix.artifact-name }} path: ${{ matrix.artifact-path }} if-no-files-found: error - - linux-cmake-ninja: - name: 🐧 Build (Linux, GCC, CMake Ninja) - runs-on: ubuntu-22.04 - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - submodules: recursive - - - name: Install dependencies - run: | - sudo apt-get update -qq - sudo apt-get install -qqq build-essential pkg-config cmake ninja-build - - - name: Build test GDExtension library - run: | - mkdir cmake-build - cd cmake-build - cmake ../ -DTEST_TARGET=template_release - cmake --build . --verbose -j $(nproc) -t godot-cpp-test --config Release - - windows-msvc-cmake: - name: 🏁 Build (Windows, MSVC, CMake) - runs-on: windows-2019 - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - submodules: recursive - - - name: Build test GDExtension library - run: | - mkdir cmake-build - cd cmake-build - cmake ../ -DTEST_TARGET=template_release - cmake --build . --verbose -t godot-cpp-test --config Release diff --git a/.github/workflows/runner.yml b/.github/workflows/runner.yml index a2e4f91b8..d056236ab 100644 --- a/.github/workflows/runner.yml +++ b/.github/workflows/runner.yml @@ -9,13 +9,57 @@ jobs: # First stage: Only static checks, fast and prevent expensive builds from running. static-checks: - if: '!vars.DISABLE_GODOT_CI' name: πŸ“Š Static Checks + if: '!vars.DISABLE_GODOT_CI' uses: ./.github/workflows/static_checks.yml - # Second stage: Run all the builds and some of the tests. - - ci: - name: πŸ› οΈ Continuous Integration + # Second stage: Review code changes + changes: + name: Analyze Changes needs: static-checks - uses: ./.github/workflows/ci.yml + runs-on: ubuntu-latest + outputs: + sources: ${{ steps.filter.outputs.sources_any_changed }} + scons: ${{ steps.filter.outputs.scons_any_changed }} + cmake: ${{ steps.filter.outputs.cmake_any_changed }} + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + - uses: tj-actions/changed-files@v45 + id: filter + with: + files_yaml: | + sources: + - '.github/workflows/*.yml' + - '**/*.py' + - '**/*.cpp' + - '**/*.h' + - 'test/build_profile.json' + - 'gdextension/extension_api.json' + scons: + - '**/SConstruct' + - '**/SCsub' + - '**/*.py' + cmake: + - '**/CMakeLists.txt' + - '**/*.cmake' + - name: echo sources changed + run: | + echo sources ${{ steps.filter.outputs.sources_any_modified }} + echo scons ${{ steps.filter.outputs.scons_any_modified }} + echo cmake ${{ steps.filter.outputs.cmake_any_modified }} + + # Third stage: Run all the builds and some of the tests. + + ci-scons: + name: πŸ› οΈ SCons CI + needs: changes + if: ${{ needs.changes.outputs.scons == 'true' || needs.changes.outputs.sources == 'true' }} + uses: ./.github/workflows/ci-scons.yml + + ci-cmake: + name: πŸ› οΈ CMake CI + needs: changes + if: ${{ needs.changes.outputs.cmake == 'true' || needs.changes.outputs.sources == 'true' }} + uses: ./.github/workflows/ci-cmake.yml diff --git a/.github/workflows/static_checks.yml b/.github/workflows/static_checks.yml index c8d271393..868e80129 100644 --- a/.github/workflows/static_checks.yml +++ b/.github/workflows/static_checks.yml @@ -17,18 +17,14 @@ jobs: fetch-depth: 2 - name: Get changed files - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - if [ "${{ github.event_name }}" == "pull_request" ]; then - files=$(git diff-tree --no-commit-id --name-only -r HEAD^1..HEAD 2> /dev/null || true) - elif [ "${{ github.event_name }}" == "push" -a "${{ github.event.forced }}" == "false" -a "${{ github.event.created }}" == "false" ]; then - files=$(git diff-tree --no-commit-id --name-only -r ${{ github.event.before }}..${{ github.event.after }} 2> /dev/null || true) - fi - files=$(echo "$files" | grep -v 'thirdparty' | xargs -I {} sh -c 'echo "\"./{}\""' | tr '\n' ' ') - echo "CHANGED_FILES=$files" >> $GITHUB_ENV + id: changed-files + uses: tj-actions/changed-files@v45 - name: Style checks via pre-commit uses: pre-commit/action@v3.0.1 with: - extra_args: --verbose --hook-stage manual --files ${{ env.CHANGED_FILES }} + extra_args: --verbose --hook-stage manual --files ${{ steps.changed-files.outputs.all_changed_files }} + + - name: Check generated files consistency + run: + python misc/scripts/check_get_file_list.py diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e63f1d40c..7354ba41f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -33,6 +33,12 @@ repos: - id: codespell additional_dependencies: [tomli] + - repo: https://github.com/BlankSpruce/gersemi + rev: 0.18.2 + hooks: + - id: gersemi + args: ["-i", "--no-warn-about-unknown-commands", "-l", "120"] + - repo: local hooks: - id: copyright-headers diff --git a/CMakeLists.txt b/CMakeLists.txt index 926946d98..4c2be6d8c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.17) +cmake_minimum_required(VERSION 3.10...3.17) #[=======================================================================[.rst: @@ -9,11 +9,20 @@ To enable use of the emscripten emsdk hack for pseudo shared library support without polluting options for consumers we need to use the CMAKE_PROJECT__INCLUDE which was introduced in version 3.17 -Scons Compatibility +For more information check cmake/emsdkHack.cmake + +SCons Compatibility ------------------- +There is an understandable conflict between build systems as they define +similar concepts in different ways. When there isn't a 1:1 relationship, +compromises need to be made to resolve those differences. + As we are attempting to maintain feature parity, and ease of maintenance, these -CMake scripts are built to resemble the SCons build system. +CMake scripts are built to resemble the SCons build system wherever possible. +Where they are not, we will attempt to document common difference in +doc/cmake.rst and platform specific differences in their respective +cmake/.cmake file. The file structure and file content are made to match, if not in content then in spirit. The closer the two build systems look the easier they will be to @@ -22,77 +31,44 @@ maintain. Where the SCons additional scripts in the tools directory, The CMake scripts are in the cmake directory. -For example, the tools/godotcpp.py is sourced into SCons, and the 'options' -function is run. +For example; the tools/godotcpp.py is matched by the cmake/godotcpp.cmake file .. highlight:: python cpp_tool = Tool("godotcpp", toolpath=["tools"]) cpp_tool.options(opts, env) - The CMake equivalent is below. ]=======================================================================] +include(cmake/godotcpp.cmake) -include( cmake/godotcpp.cmake ) godotcpp_options() -#[=======================================================================[.rst: - -Configurations --------------- - -There are two build main configurations, 'Debug' and 'Release', these are not -related to godot's DEBUG_FEATURES flag. Build configurations change the default -compiler and linker flags present when building the library, things like debug -symbols, optimization. - -The Scons build scripts don't have this concept, you can think of it like the -SCons solution has a single default configuration. In both cases overriding the -defaults is controlled by options on the command line, or in preset files. - -Because of this added configuration and that it can be undefined, it becomes -important to set a default, considering the SCons solution that does not enable -debug symbols by default, it seemed appropriate to set the default to 'Release' -if unspecified. This can always be overridden like below. - -.. highlight:: shell - - cmake -DCMAKE_BUILD_TYPE:STRING=Debug - -.. caution:: - -A complication arises from `Multi-Config Generators`_ that cannot have -their configuration set at configure time. This means that the configuration -must be set on the build command. This is especially important for Visual -Studio Generators which default to 'Debug' - -.. highlight:: shell - - cmake --build . --config Release - -.. _Multi-Config Generators:https://cmake.org/cmake/help/latest/prop_gbl/GENERATOR_IS_MULTI_CONFIG.html -]=======================================================================] -get_property( IS_MULTI_CONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG ) -if( NOT IS_MULTI_CONFIG AND NOT CMAKE_BUILD_TYPE ) - if( GODOT_DEV_BUILD ) - set( CMAKE_BUILD_TYPE Debug ) - else () - set( CMAKE_BUILD_TYPE Release ) - endif () -endif () - -#[[ Python is required for code generation ]] -find_package(Python3 3.4 REQUIRED) # pathlib should be present +#[[ People are compiling godot by itself and expecting template_debug +Replace this with PROJECT_IS_TOP_LEVEL, _IS_TOP_LEVEL when minimum reaches 3.21 +]] +if(NOT PROJECT_NAME) + set(GODOTCPP_IS_TOP_LEVEL ON) +endif() # Define our project. -project( godot-cpp - VERSION 4.4 - DESCRIPTION "C++ bindings for the Godot Engine's GDExtensions API." - HOMEPAGE_URL "https://github.com/godotengine/godot-cpp" - LANGUAGES CXX) - +project( + godot-cpp + VERSION 4.4 + DESCRIPTION "C++ bindings for the Godot Engine's GDExtensions API." + HOMEPAGE_URL "https://github.com/godotengine/godot-cpp" + LANGUAGES CXX +) + +compiler_detection() godotcpp_generate() -# Test Example -add_subdirectory( test ) +# Conditionally enable the godot-cpp.test. integration testing targets +if(GODOTCPP_ENABLE_TESTING) + add_subdirectory(test) +endif() + +#[[ If this is the top level CMakeLists.txt, Generators which honor the +USE_FOLDERS flag will organize godot-cpp targets under a subfolder named +'godot-cpp'. This is enable by default from CMake version 3.26 ]] +set_property(GLOBAL PROPERTY USE_FOLDERS ON) diff --git a/README.md b/README.md index 005c8e723..843f7b34e 100644 --- a/README.md +++ b/README.md @@ -71,8 +71,7 @@ wish to help out, ensure you have an account on GitHub and create a "fork" of this repository. See [Pull request workflow](https://docs.godotengine.org/en/stable/community/contributing/pr_workflow.html) for instructions. -Please install clang-format and copy the files in `misc/hooks` into `.git/hooks` -so formatting is done before your changes are submitted. +Please install clang-format and the [pre-commit](https://pre-commit.com/) Python framework so formatting is done before your changes are submitted. See the [code style guidelines](https://docs.godotengine.org/en/latest/contributing/development/code_style_guidelines.html#pre-commit-hook) for instructions. ## Getting started diff --git a/binding_generator.py b/binding_generator.py index b8b76ba93..4fc5ca32c 100644 --- a/binding_generator.py +++ b/binding_generator.py @@ -51,11 +51,7 @@ def generate_mod_version(argcount, const=False, returns=False): def generate_wrappers(target): max_versions = 12 - txt = """ -#ifndef GDEXTENSION_WRAPPERS_GEN_H -#define GDEXTENSION_WRAPPERS_GEN_H - -""" + txt = "#pragma once" for i in range(max_versions + 1): txt += "\n/* Module Wrapper " + str(i) + " Arguments */\n" @@ -64,16 +60,13 @@ def generate_wrappers(target): txt += generate_mod_version(i, True, False) txt += generate_mod_version(i, True, True) - txt += "\n#endif\n" - with open(target, "w", encoding="utf-8") as f: f.write(txt) -def generate_virtual_version(argcount, const=False, returns=False): +def generate_virtual_version(argcount, const=False, returns=False, required=False): s = """#define GDVIRTUAL$VER($RET m_name $ARG)\\ ::godot::StringName _gdvirtual_##m_name##_sn = #m_name;\\ - template \\ _FORCE_INLINE_ bool _gdvirtual_##m_name##_call($CALLARGS) $CONST {\\ if (::godot::internal::gdextension_interface_object_has_script_method(_owner, &_gdvirtual_##m_name##_sn)) { \\ GDExtensionCallError ce;\\ @@ -85,10 +78,8 @@ def generate_virtual_version(argcount, const=False, returns=False): return true;\\ }\\ }\\ - if (required) {\\ - ERR_PRINT_ONCE("Required virtual method " + get_class() + "::" + #m_name + " must be overridden before calling.");\\ - $RVOID\\ - }\\ + $REQCHECK\\ + $RVOID\\ return false;\\ }\\ _FORCE_INLINE_ bool _gdvirtual_##m_name##_overridden() const {\\ @@ -106,6 +97,7 @@ def generate_virtual_version(argcount, const=False, returns=False): sproto = str(argcount) method_info = "" + method_flags = "METHOD_FLAG_VIRTUAL" if returns: sproto += "R" s = s.replace("$RET", "m_ret,") @@ -114,16 +106,26 @@ def generate_virtual_version(argcount, const=False, returns=False): method_info += "\t\tmethod_info.return_val_metadata = ::godot::GetTypeInfo::METADATA;" else: s = s.replace("$RET ", "") - s = s.replace("\t\t\t$RVOID\\\n", "") + s = s.replace("\t\t$RVOID\\\n", "") if const: sproto += "C" + method_flags += " | METHOD_FLAG_CONST" s = s.replace("$CONST", "const") - s = s.replace("$METHOD_FLAGS", "::godot::METHOD_FLAG_VIRTUAL | ::godot::METHOD_FLAG_CONST") else: s = s.replace("$CONST ", "") - s = s.replace("$METHOD_FLAGS", "::godot::METHOD_FLAG_VIRTUAL") + if required: + sproto += "_REQUIRED" + method_flags += " | METHOD_FLAG_VIRTUAL_REQUIRED" + s = s.replace( + "$REQCHECK", + 'ERR_PRINT_ONCE("Required virtual method " + get_class() + "::" + #m_name + " must be overridden before calling.");', + ) + else: + s = s.replace("\t\t$REQCHECK\\\n", "") + + s = s.replace("$METHOD_FLAGS", method_flags) s = s.replace("$VER", sproto) argtext = "" callargtext = "" @@ -179,8 +181,7 @@ def generate_virtuals(target): max_versions = 12 txt = """/* THIS FILE IS GENERATED DO NOT EDIT */ -#ifndef GDEXTENSION_GDVIRTUAL_GEN_H -#define GDEXTENSION_GDVIRTUAL_GEN_H +#pragma once """ @@ -190,20 +191,25 @@ def generate_virtuals(target): txt += generate_virtual_version(i, False, True) txt += generate_virtual_version(i, True, False) txt += generate_virtual_version(i, True, True) - - txt += "#endif // GDEXTENSION_GDVIRTUAL_GEN_H\n" + txt += generate_virtual_version(i, False, False, True) + txt += generate_virtual_version(i, False, True, True) + txt += generate_virtual_version(i, True, False, True) + txt += generate_virtual_version(i, True, True, True) with open(target, "w", encoding="utf-8") as f: f.write(txt) -def get_file_list(api_filepath, output_dir, headers=False, sources=False, profile_filepath=""): +def get_file_list(api_filepath, output_dir, headers=False, sources=False): api = {} - files = [] with open(api_filepath, encoding="utf-8") as api_file: api = json.load(api_file) - build_profile = parse_build_profile(profile_filepath, api) + return _get_file_list(api, output_dir, headers, sources) + + +def _get_file_list(api, output_dir, headers=False, sources=False): + files = [] core_gen_folder = Path(output_dir) / "gen" / "include" / "godot_cpp" / "core" include_gen_folder = Path(output_dir) / "gen" / "include" / "godot_cpp" @@ -235,7 +241,7 @@ def get_file_list(api_filepath, output_dir, headers=False, sources=False, profil source_filename = source_gen_folder / "classes" / (camel_to_snake(engine_class["name"]) + ".cpp") if headers: files.append(str(header_filename.as_posix())) - if sources and is_class_included(engine_class["name"], build_profile): + if sources: files.append(str(source_filename.as_posix())) for native_struct in api["native_structures"]: @@ -267,131 +273,27 @@ def get_file_list(api_filepath, output_dir, headers=False, sources=False, profil return files -def print_file_list(api_filepath, output_dir, headers=False, sources=False, profile_filepath=""): - print(*get_file_list(api_filepath, output_dir, headers, sources, profile_filepath), sep=";", end=None) - - -def parse_build_profile(profile_filepath, api): - if profile_filepath == "": - return {} - print("Using feature build profile: " + profile_filepath) +def print_file_list(api_filepath, output_dir, headers=False, sources=False): + print(*get_file_list(api_filepath, output_dir, headers, sources), sep=";", end=None) - with open(profile_filepath, encoding="utf-8") as profile_file: - profile = json.load(profile_file) - api_dict = {} - parents = {} - children = {} - for engine_class in api["classes"]: - api_dict[engine_class["name"]] = engine_class - parent = engine_class.get("inherits", "") - child = engine_class["name"] - parents[child] = parent - if parent == "": - continue - children[parent] = children.get(parent, []) - children[parent].append(child) - - # Parse methods dependencies - deps = {} - reverse_deps = {} - for name, engine_class in api_dict.items(): - ref_cls = set() - for method in engine_class.get("methods", []): - rtype = method.get("return_value", {}).get("type", "") - args = [a["type"] for a in method.get("arguments", [])] - if rtype in api_dict: - ref_cls.add(rtype) - elif is_enum(rtype) and get_enum_class(rtype) in api_dict: - ref_cls.add(get_enum_class(rtype)) - for arg in args: - if arg in api_dict: - ref_cls.add(arg) - elif is_enum(arg) and get_enum_class(arg) in api_dict: - ref_cls.add(get_enum_class(arg)) - deps[engine_class["name"]] = set(filter(lambda x: x != name, ref_cls)) - for acls in ref_cls: - if acls == name: - continue - reverse_deps[acls] = reverse_deps.get(acls, set()) - reverse_deps[acls].add(name) - - included = [] - front = list(profile.get("enabled_classes", [])) - if front: - # These must always be included - front.append("WorkerThreadPool") - front.append("ClassDB") - front.append("ClassDBSingleton") - while front: - cls = front.pop() - if cls in included: - continue - included.append(cls) - parent = parents.get(cls, "") - if parent: - front.append(parent) - for rcls in deps.get(cls, set()): - if rcls in included or rcls in front: - continue - front.append(rcls) +def generate_bindings(api_filepath, use_template_get_node, bits="64", precision="single", output_dir="."): + api = {} + with open(api_filepath, encoding="utf-8") as api_file: + api = json.load(api_file) + _generate_bindings(api, api_filepath, use_template_get_node, bits, precision, output_dir) - excluded = [] - front = list(profile.get("disabled_classes", [])) - while front: - cls = front.pop() - if cls in excluded: - continue - excluded.append(cls) - front += children.get(cls, []) - for rcls in reverse_deps.get(cls, set()): - if rcls in excluded or rcls in front: - continue - front.append(rcls) - if included and excluded: - print( - "WARNING: Cannot specify both 'enabled_classes' and 'disabled_classes' in build profile. 'disabled_classes' will be ignored." +def _generate_bindings(api, api_filepath, use_template_get_node, bits="64", precision="single", output_dir="."): + if "precision" in api["header"] and precision != api["header"]["precision"]: + raise Exception( + f"Cannot do a precision={precision} build using '{api_filepath}' which was generated by Godot built with precision={api['header']['precision']}" ) - return { - "enabled_classes": included, - "disabled_classes": excluded, - } - - -def scons_emit_files(target, source, env): - profile_filepath = env.get("build_profile", "") - if profile_filepath and not Path(profile_filepath).is_absolute(): - profile_filepath = str((Path(env.Dir("#").abspath) / profile_filepath).as_posix()) - - files = [env.File(f) for f in get_file_list(str(source[0]), target[0].abspath, True, True, profile_filepath)] - env.Clean(target, files) - env["godot_cpp_gen_dir"] = target[0].abspath - return files, source - - -def scons_generate_bindings(target, source, env): - generate_bindings( - str(source[0]), - env["generate_template_get_node"], - "32" if "32" in env["arch"] else "64", - env["precision"], - env["godot_cpp_gen_dir"], - ) - return None - - -def generate_bindings(api_filepath, use_template_get_node, bits="64", precision="single", output_dir="."): - api = None - target_dir = Path(output_dir) / "gen" - with open(api_filepath, encoding="utf-8") as api_file: - api = json.load(api_file) - shutil.rmtree(target_dir, ignore_errors=True) - target_dir.mkdir(parents=True) + target_dir.mkdir(parents=True, exist_ok=True) real_t = "double" if precision == "double" else "float" print("Built-in type config: " + real_t + "_" + bits) @@ -453,11 +355,8 @@ def generate_builtin_bindings(api, output_dir, build_config): variant_size_source = [] add_header("variant_size.hpp", variant_size_source) - header_guard = "GODOT_CPP_VARIANT_SIZE_HPP" - variant_size_source.append(f"#ifndef {header_guard}") - variant_size_source.append(f"#define {header_guard}") + variant_size_source.append("#pragma once") variant_size_source.append(f'#define GODOT_CPP_VARIANT_SIZE {builtin_sizes["Variant"]}') - variant_size_source.append(f"#endif // ! {header_guard}") variant_size_file.write("\n".join(variant_size_source)) @@ -537,8 +436,7 @@ def generate_builtin_bindings(api, output_dir, build_config): builtin_header = [] add_header("builtin_types.hpp", builtin_header) - builtin_header.append("#ifndef GODOT_CPP_BUILTIN_TYPES_HPP") - builtin_header.append("#define GODOT_CPP_BUILTIN_TYPES_HPP") + builtin_header.append("#pragma once") builtin_header.append("") @@ -553,8 +451,6 @@ def generate_builtin_bindings(api, output_dir, build_config): builtin_header.append("") - builtin_header.append("#endif // ! GODOT_CPP_BUILTIN_TYPES_HPP") - builtin_header_file.write("\n".join(builtin_header)) # Create a header with bindings for builtin types. @@ -563,8 +459,7 @@ def generate_builtin_bindings(api, output_dir, build_config): builtin_binds = [] add_header("builtin_binds.hpp", builtin_binds) - builtin_binds.append("#ifndef GODOT_CPP_BUILTIN_BINDS_HPP") - builtin_binds.append("#define GODOT_CPP_BUILTIN_BINDS_HPP") + builtin_binds.append("#pragma once") builtin_binds.append("") builtin_binds.append("#include ") builtin_binds.append("") @@ -576,7 +471,6 @@ def generate_builtin_bindings(api, output_dir, build_config): builtin_binds.append(f"VARIANT_ENUM_CAST({builtin_api['name']}::{enum_api['name']});") builtin_binds.append("") - builtin_binds.append("#endif // ! GODOT_CPP_BUILTIN_BINDS_HPP") builtin_binds_file.write("\n".join(builtin_binds)) @@ -592,9 +486,7 @@ def generate_builtin_class_vararg_method_implements_header(builtin_classes): add_header("builtin_vararg_methods.hpp", result) - header_guard = "GODOT_CPP_BUILTIN_VARARG_METHODS_HPP" - result.append(f"#ifndef {header_guard}") - result.append(f"#define {header_guard}") + result.append("#pragma once") result.append("") for builtin_api in builtin_classes: if "methods" not in builtin_api: @@ -609,8 +501,6 @@ def generate_builtin_class_vararg_method_implements_header(builtin_classes): ) result.append("") - result.append(f"#endif // ! {header_guard}") - return "\n".join(result) @@ -620,12 +510,9 @@ def generate_builtin_class_header(builtin_api, size, used_classes, fully_used_cl class_name = builtin_api["name"] snake_class_name = camel_to_snake(class_name).upper() - header_guard = f"GODOT_CPP_{snake_class_name}_HPP" - add_header(f"{snake_class_name.lower()}.hpp", result) - result.append(f"#ifndef {header_guard}") - result.append(f"#define {header_guard}") + result.append("#pragma once") result.append("") result.append("#include ") @@ -654,7 +541,7 @@ def generate_builtin_class_header(builtin_api, size, used_classes, fully_used_cl result.append("#include ") result.append("") - if is_packed_array(class_name): + if is_packed_array(class_name) or class_name == "Array": result.append("#include ") result.append("#include ") result.append("") @@ -755,6 +642,11 @@ def generate_builtin_class_header(builtin_api, size, used_classes, fully_used_cl result.append("") result.append(f"\t{class_name}(const Variant *p_variant);") + if class_name == "Array": + result.append("") + result.append("\tconst Variant *ptr() const;") + result.append("\tVariant *ptrw();") + result.append("") result.append("public:") @@ -1020,6 +912,48 @@ def generate_builtin_class_header(builtin_api, size, used_classes, fully_used_cl result.append("\tVariant &operator[](int64_t p_index);") result.append("\tvoid set_typed(uint32_t p_type, const StringName &p_class_name, const Variant &p_script);") result.append("\tvoid _ref(const Array &p_from) const;") + result.append(""" + struct Iterator { + _FORCE_INLINE_ Variant &operator*() const; + _FORCE_INLINE_ Variant *operator->() const; + _FORCE_INLINE_ Iterator &operator++(); + _FORCE_INLINE_ Iterator &operator--(); + + _FORCE_INLINE_ bool operator==(const Iterator &b) const { return elem_ptr == b.elem_ptr; } + _FORCE_INLINE_ bool operator!=(const Iterator &b) const { return elem_ptr != b.elem_ptr; } + + Iterator(Variant *p_ptr) { elem_ptr = p_ptr; } + Iterator() {} + Iterator(const Iterator &p_it) { elem_ptr = p_it.elem_ptr; } + + private: + Variant *elem_ptr = nullptr; + }; + + struct ConstIterator { + _FORCE_INLINE_ const Variant &operator*() const; + _FORCE_INLINE_ const Variant *operator->() const; + _FORCE_INLINE_ ConstIterator &operator++(); + _FORCE_INLINE_ ConstIterator &operator--(); + + _FORCE_INLINE_ bool operator==(const ConstIterator &b) const { return elem_ptr == b.elem_ptr; } + _FORCE_INLINE_ bool operator!=(const ConstIterator &b) const { return elem_ptr != b.elem_ptr; } + + ConstIterator(const Variant *p_ptr) { elem_ptr = p_ptr; } + ConstIterator() {} + ConstIterator(const ConstIterator &p_it) { elem_ptr = p_it.elem_ptr; } + + private: + const Variant *elem_ptr = nullptr; + }; + + _FORCE_INLINE_ Iterator begin(); + _FORCE_INLINE_ Iterator end(); + + _FORCE_INLINE_ ConstIterator begin() const; + _FORCE_INLINE_ ConstIterator end() const; + """) + result.append("\t_FORCE_INLINE_ Array(std::initializer_list p_init);") if class_name == "Dictionary": result.append("\tconst Variant &operator[](const Variant &p_key) const;") @@ -1054,8 +988,6 @@ def generate_builtin_class_header(builtin_api, size, used_classes, fully_used_cl result.append("") result.append("} // namespace godot") - result.append("") - result.append(f"#endif // ! {header_guard}") result.append("") return "\n".join(result) @@ -1587,9 +1519,7 @@ def generate_engine_classes_bindings(api, output_dir, use_template_get_node): result = [] add_header(f"{snake_struct_name}.hpp", result) - header_guard = f"GODOT_CPP_{snake_struct_name.upper()}_HPP" - result.append(f"#ifndef {header_guard}") - result.append(f"#define {header_guard}") + result.append("#pragma once") used_classes = [] expanded_format = native_struct["format"].replace("(", " ").replace(")", ";").replace(",", ";") @@ -1629,7 +1559,6 @@ def generate_engine_classes_bindings(api, output_dir, use_template_get_node): result.append("") result.append("} // namespace godot") result.append("") - result.append(f"#endif // ! {header_guard}") with header_filename.open("w+", encoding="utf-8") as header_file: header_file.write("\n".join(result)) @@ -1645,11 +1574,7 @@ def generate_engine_class_header(class_api, used_classes, fully_used_classes, us add_header(f"{snake_class_name.lower()}.hpp", result) - header_guard = f"GODOT_CPP_{snake_class_name}_HPP" - - result.append(f"#ifndef {header_guard}") - result.append(f"#define {header_guard}") - + result.append("#pragma once") result.append("") if len(fully_used_classes) > 0: @@ -1788,7 +1713,7 @@ def generate_engine_class_header(class_api, used_classes, fully_used_classes, us # condition returns false (in such cases it can't compile due to ambiguity). f"\t\tif constexpr (!std::is_same_v) {{" ) - result.append(f"\t\t\tBIND_VIRTUAL_METHOD(T, {method_name});") + result.append(f"\t\t\tBIND_VIRTUAL_METHOD(T, {method_name}, {method['hash']});") result.append("\t\t}") result.append("\t}") @@ -1938,7 +1863,6 @@ def generate_engine_class_header(class_api, used_classes, fully_used_classes, us result.append("\t") result.append("") - result.append(f"#endif // ! {header_guard}") result.append("") return "\n".join(result) @@ -2140,9 +2064,7 @@ def generate_global_constants(api, output_dir): header_filename = include_gen_folder / "global_constants.hpp" - header_guard = "GODOT_CPP_GLOBAL_CONSTANTS_HPP" - header.append(f"#ifndef {header_guard}") - header.append(f"#define {header_guard}") + header.append("#pragma once") header.append("") header.append("#include ") header.append("") @@ -2172,7 +2094,6 @@ def generate_global_constants(api, output_dir): header.append("} // namespace godot") header.append("") - header.append(f"#endif // ! {header_guard}") with header_filename.open("w+", encoding="utf-8") as header_file: header_file.write("\n".join(header)) @@ -2188,9 +2109,7 @@ def generate_version_header(api, output_dir): header_file_path = include_gen_folder / header_filename - header_guard = "GODOT_CPP_VERSION_HPP" - header.append(f"#ifndef {header_guard}") - header.append(f"#define {header_guard}") + header.append("#pragma once") header.append("") header.append(f"#define GODOT_VERSION_MAJOR {api['header']['version_major']}") @@ -2199,8 +2118,6 @@ def generate_version_header(api, output_dir): header.append(f"#define GODOT_VERSION_STATUS \"{api['header']['version_status']}\"") header.append(f"#define GODOT_VERSION_BUILD \"{api['header']['version_build']}\"") - header.append("") - header.append(f"#endif // {header_guard}") header.append("") with header_file_path.open("w+", encoding="utf-8") as header_file: @@ -2221,9 +2138,7 @@ def generate_global_constant_binds(api, output_dir): header_filename = include_gen_folder / "global_constants_binds.hpp" - header_guard = "GODOT_CPP_GLOBAL_CONSTANTS_BINDS_HPP" - header.append(f"#ifndef {header_guard}") - header.append(f"#define {header_guard}") + header.append("#pragma once") header.append("") header.append("#include ") header.append("") @@ -2242,8 +2157,6 @@ def generate_global_constant_binds(api, output_dir): header.append("") - header.append(f"#endif // ! {header_guard}") - with header_filename.open("w+", encoding="utf-8") as header_file: header_file.write("\n".join(header)) @@ -2262,9 +2175,7 @@ def generate_utility_functions(api, output_dir): header_filename = include_gen_folder / "utility_functions.hpp" - header_guard = "GODOT_CPP_UTILITY_FUNCTIONS_HPP" - header.append(f"#ifndef {header_guard}") - header.append(f"#define {header_guard}") + header.append("#pragma once") header.append("") header.append("#include ") header.append("#include ") @@ -2303,7 +2214,6 @@ def generate_utility_functions(api, output_dir): header.append("") header.append("} // namespace godot") header.append("") - header.append(f"#endif // ! {header_guard}") with header_filename.open("w+", encoding="utf-8") as header_file: header_file.write("\n".join(header)) @@ -2456,6 +2366,10 @@ def get_encoded_arg(arg_name, type_name, type_meta): result.append(f"\t{get_gdextension_type(arg_type)} {name}_encoded;") result.append(f"\tPtrToArg<{correct_type(type_name)}>::encode({name}, &{name}_encoded);") name = f"&{name}_encoded" + elif is_enum(type_name) and not is_bitfield(type_name): + result.append(f"\tint64_t {name}_encoded;") + result.append(f"\tPtrToArg::encode({name}, &{name}_encoded);") + name = f"&{name}_encoded" elif is_engine_class(type_name): # `{name}` is a C++ wrapper, it contains a field which is the object's pointer Godot expects. # We have to check `nullptr` because when the caller sends `nullptr`, the wrapper itself will be null. @@ -2579,7 +2493,7 @@ def make_varargs_template( function_signature += " {" result.append(function_signature) - args_array = f"\tstd::array variant_args{{ " + args_array = f"\tstd::array variant_args{{{{ " for argument in method_arguments: if argument["type"] == "Variant": args_array += escape_argument(argument["name"]) @@ -2587,7 +2501,7 @@ def make_varargs_template( args_array += f'Variant({escape_argument(argument["name"])})' args_array += ", " - args_array += "Variant(p_args)... };" + args_array += "Variant(p_args)... }};" result.append(args_array) result.append(f"\tstd::array call_args;") result.append("\tfor (size_t i = 0; i < variant_args.size(); i++) {") @@ -2766,20 +2680,6 @@ def is_refcounted(type_name): return type_name in engine_classes and engine_classes[type_name] -def is_class_included(class_name, build_profile): - """ - Check if an engine class should be included. - This removes classes according to a build profile of enabled or disabled classes. - """ - included = build_profile.get("enabled_classes", []) - excluded = build_profile.get("disabled_classes", []) - if included: - return class_name in included - if excluded: - return class_name not in excluded - return True - - def is_included(type_name, current_type): """ Check if a builtin type should be included. diff --git a/build_profile.py b/build_profile.py new file mode 100644 index 000000000..b4d19ded6 --- /dev/null +++ b/build_profile.py @@ -0,0 +1,183 @@ +import json +import sys + + +def parse_build_profile(profile_filepath, api): + if profile_filepath == "": + return {} + + with open(profile_filepath, encoding="utf-8") as profile_file: + profile = json.load(profile_file) + + api_dict = {} + parents = {} + children = {} + for engine_class in api["classes"]: + api_dict[engine_class["name"]] = engine_class + parent = engine_class.get("inherits", "") + child = engine_class["name"] + parents[child] = parent + if parent == "": + continue + children[parent] = children.get(parent, []) + children[parent].append(child) + + included = [] + front = list(profile.get("enabled_classes", [])) + if front: + # These must always be included + front.append("WorkerThreadPool") + front.append("ClassDB") + front.append("ClassDBSingleton") + # In src/classes/low_level.cpp + front.append("FileAccess") + front.append("Image") + front.append("XMLParser") + # In include/godot_cpp/templates/thread_work_pool.hpp + front.append("Semaphore") + while front: + cls = front.pop() + if cls in included: + continue + included.append(cls) + parent = parents.get(cls, "") + if parent: + front.append(parent) + + excluded = [] + front = list(profile.get("disabled_classes", [])) + while front: + cls = front.pop() + if cls in excluded: + continue + excluded.append(cls) + front += children.get(cls, []) + + if included and excluded: + print( + "WARNING: Cannot specify both 'enabled_classes' and 'disabled_classes' in build profile. 'disabled_classes' will be ignored." + ) + + return { + "enabled_classes": included, + "disabled_classes": excluded, + } + + +def generate_trimmed_api(source_api_filepath, profile_filepath): + with open(source_api_filepath, encoding="utf-8") as api_file: + api = json.load(api_file) + + if profile_filepath == "": + return api + + build_profile = parse_build_profile(profile_filepath, api) + + engine_classes = {} + for class_api in api["classes"]: + engine_classes[class_api["name"]] = class_api["is_refcounted"] + for native_struct in api["native_structures"]: + if native_struct["name"] == "ObjectID": + continue + engine_classes[native_struct["name"]] = False + + classes = [] + for class_api in api["classes"]: + if not is_class_included(class_api["name"], build_profile): + continue + if "methods" in class_api: + methods = [] + for method in class_api["methods"]: + if not is_method_included(method, build_profile, engine_classes): + continue + methods.append(method) + class_api["methods"] = methods + classes.append(class_api) + api["classes"] = classes + + return api + + +def is_class_included(class_name, build_profile): + """ + Check if an engine class should be included. + This removes classes according to a build profile of enabled or disabled classes. + """ + included = build_profile.get("enabled_classes", []) + excluded = build_profile.get("disabled_classes", []) + if included: + return class_name in included + if excluded: + return class_name not in excluded + return True + + +def is_method_included(method, build_profile, engine_classes): + """ + Check if an engine class method should be included. + This removes methods according to a build profile of enabled or disabled classes. + """ + included = build_profile.get("enabled_classes", []) + excluded = build_profile.get("disabled_classes", []) + ref_cls = set() + rtype = get_base_type(method.get("return_value", {}).get("type", "")) + args = [get_base_type(a["type"]) for a in method.get("arguments", [])] + if rtype in engine_classes: + ref_cls.add(rtype) + elif is_enum(rtype) and get_enum_class(rtype) in engine_classes: + ref_cls.add(get_enum_class(rtype)) + for arg in args: + if arg in engine_classes: + ref_cls.add(arg) + elif is_enum(arg) and get_enum_class(arg) in engine_classes: + ref_cls.add(get_enum_class(arg)) + for acls in ref_cls: + if len(included) > 0 and acls not in included: + return False + elif len(excluded) > 0 and acls in excluded: + return False + return True + + +def is_enum(type_name): + return type_name.startswith("enum::") or type_name.startswith("bitfield::") + + +def get_enum_class(enum_name: str): + if "." in enum_name: + if is_bitfield(enum_name): + return enum_name.replace("bitfield::", "").split(".")[0] + else: + return enum_name.replace("enum::", "").split(".")[0] + else: + return "GlobalConstants" + + +def get_base_type(type_name): + if type_name.startswith("const "): + type_name = type_name[6:] + if type_name.endswith("*"): + type_name = type_name[:-1] + if type_name.startswith("typedarray::"): + type_name = type_name.replace("typedarray::", "") + return type_name + + +def is_bitfield(type_name): + return type_name.startswith("bitfield::") + + +if __name__ == "__main__": + if len(sys.argv) < 3 or len(sys.argv) > 4: + print("Usage: %s BUILD_PROFILE INPUT_JSON [OUTPUT_JSON]" % (sys.argv[0])) + sys.exit(1) + profile = sys.argv[1] + infile = sys.argv[2] + outfile = sys.argv[3] if len(sys.argv) > 3 else "" + api = generate_trimmed_api(infile, profile) + + if outfile: + with open(outfile, "w", encoding="utf-8") as f: + json.dump(api, f) + else: + json.dump(api, sys.stdout) diff --git a/cmake/GodotCPPModule.cmake b/cmake/GodotCPPModule.cmake new file mode 100644 index 000000000..00e00fe5e --- /dev/null +++ b/cmake/GodotCPPModule.cmake @@ -0,0 +1,176 @@ +#[=======================================================================[.rst: +GodotCPPModule.cmake +--------------------- + +This file contains functions and tests which may be needed by consumers. + +* Generate Trimmed API +* Generate File List +* Generate Bindings + +If you want to use these functions in your project extend the CMAKE_MODULE_PATH +by adding these two lines into your CMakeLists.txt after the inclusion +godot-cpp + +.. highlight:: cmake + + list(APPEND CMAKE_MODULE_PATH "${godot-cpp_SOURCE_DIR}/cmake") + include( GodotCPPModule ) + +]=======================================================================] +find_package(Python3 3.4 REQUIRED) # pathlib should be present + +#[[ Generate Trimmed API + +The build_profile.py has a __main__ and is used as a tool +Its usage is listed as: + $ python build_profile.py BUILD_PROFILE INPUT_JSON [OUTPUT_JSON] +]] +function(build_profile_generate_trimmed_api BUILD_PROFILE INPUT_JSON OUTPUT_JSON) + execute_process( + COMMAND + "${Python3_EXECUTABLE}" "${godot-cpp_SOURCE_DIR}/build_profile.py" "${BUILD_PROFILE}" "${INPUT_JSON}" + "${OUTPUT_JSON}" + WORKING_DIRECTORY ${godot-cpp_SOURCE_DIR} + ) +endfunction() + +#[[ Generate File List + +Use the binding_generator.py Python script to determine the list of files that +will be passed to the code generator using extension_api.json. +NOTE: This happens for every configure.]] +function(binding_generator_get_file_list OUT_VAR_NAME API_FILEPATH OUTPUT_DIR) + # This code snippet will be squashed into a single line + # The two strings make this a list, in CMake lists are semicolon delimited strings. + set(PYTHON_SCRIPT + "from binding_generator import print_file_list" + "print_file_list( api_filepath='${API_FILEPATH}', + output_dir='${OUTPUT_DIR}', + headers=True, + sources=True)" + ) + message(DEBUG "Python:\n${PYTHON_SCRIPT}") + + # Strip newlines and whitespace to make it a one-liner. + string(REGEX REPLACE "\n *" " " PYTHON_SCRIPT "${PYTHON_SCRIPT}") + + execute_process( + COMMAND "${Python3_EXECUTABLE}" "-c" "${PYTHON_SCRIPT}" + WORKING_DIRECTORY "${godot-cpp_SOURCE_DIR}" + OUTPUT_VARIABLE GENERATED_FILES_LIST + OUTPUT_STRIP_TRAILING_WHITESPACE + ) + + # Debug output + message(DEBUG "FileList-Begin") + foreach(PATH ${GENERATED_FILES_LIST}) + message(DEBUG ${PATH}) + endforeach() + + # Error out if the file list generator returned no files. + list(LENGTH GENERATED_FILES_LIST LIST_LENGTH) + if(NOT LIST_LENGTH GREATER 0) + message(FATAL_ERROR "File List Generation Failed") + endif() + message(STATUS "There are ${LIST_LENGTH} Files to generate") + + set(${OUT_VAR_NAME} ${GENERATED_FILES_LIST} PARENT_SCOPE) +endfunction() + +#[[ Generate Bindings + +Using the generated file list, use the binding_generator.py to generate the +godot-cpp bindings. This will run at build time only if there are files +missing. ]] +function( + binding_generator_generate_bindings + API_FILE + USE_TEMPLATE_GET_NODE, + BITS, + PRECISION, + OUTPUT_DIR +) + # This code snippet will be squashed into a single line + set(PYTHON_SCRIPT + "from binding_generator import generate_bindings" + "generate_bindings( + api_filepath='${API_FILE}', + use_template_get_node='${USE_TEMPLATE_GET_NODE}', + bits='${BITS}', + precision='${PRECISION}', + output_dir='${OUTPUT_DIR}')" + ) + + message(DEBUG "Python:\n${PYTHON_SCRIPT}") + + # Strip newlines and whitespace to make it a one-liner. + string(REGEX REPLACE "\n *" " " PYTHON_SCRIPT "${PYTHON_SCRIPT}") + + add_custom_command( + OUTPUT ${GENERATED_FILES_LIST} + COMMAND "${Python3_EXECUTABLE}" "-c" "${PYTHON_SCRIPT}" + VERBATIM + WORKING_DIRECTORY ${godot-cpp_SOURCE_DIR} + MAIN_DEPENDENCY ${GODOTCPP_GDEXTENSION_API_FILE} + DEPENDS ${godot-cpp_SOURCE_DIR}/binding_generator.py + COMMENT "Generating bindings" + ) + add_custom_target(generate_bindings DEPENDS ${GENERATED_FILES_LIST}) + set_target_properties(generate_bindings PROPERTIES FOLDER "godot-cpp") +endfunction() + +#[[ Generate doc_data.cpp +The documentation displayed in the Godot editor is compiled into the extension. +It takes a list of XML source files, and transforms them into a cpp file that +is added to the sources list.]] +function(generate_doc_source OUTPUT_PATH SOURCES) + # Transform SOURCES CMake LIST + # quote each path with '' + # join with , to transform into a python list minus the surrounding [] + set(PYTHON_LIST "${SOURCES}") + list(TRANSFORM PYTHON_LIST REPLACE "(.*\.xml)" "'\\1'") + list(JOIN PYTHON_LIST "," PYTHON_LIST) + + get_filename_component(OUTPUT_DIR "${OUTPUT_PATH}" DIRECTORY) + file(MAKE_DIRECTORY ${OUTPUT_DIR}) + + # Python one-liner to run our command + # lists in CMake are just strings delimited by ';', so this works. + set(PYTHON_SCRIPT + "from doc_source_generator import generate_doc_source" + "generate_doc_source( '${OUTPUT_PATH}', [${PYTHON_LIST}] )" + ) + + add_custom_command( + OUTPUT "${OUTPUT_PATH}" + COMMAND "${Python3_EXECUTABLE}" "-c" "${PYTHON_SCRIPT}" + VERBATIM + WORKING_DIRECTORY "${godot-cpp_SOURCE_DIR}" + DEPENDS # + "${godot-cpp_SOURCE_DIR}/doc_source_generator.py" + "${SOURCES}" + COMMENT "Generating: ${OUTPUT_PATH}" + ) + add_custom_target(generate_doc_source DEPENDS "${OUTPUT_PATH}") + set_target_properties(generate_doc_source PROPERTIES FOLDER "godot-cpp") +endfunction() + +#[[ target_doc_sources +A simpler interface to add xml files as doc source to a output target. +TARGET: The gdexension library target +SOURCES: a list of xml files to use for source generation and inclusion.]] +function(target_doc_sources TARGET SOURCES) + # set the generated file name + set(DOC_SOURCE_FILE "${CMAKE_CURRENT_BINARY_DIR}/gen/doc_source.cpp") + + # Create the file generation target, this won't be triggered unless a target + # that depends on DOC_SOURCE_FILE is built + generate_doc_source( "${DOC_SOURCE_FILE}" ${SOURCES} ) + + # Add DOC_SOURCE_FILE as a dependency to TARGET + target_sources(${TARGET} PRIVATE "${DOC_SOURCE_FILE}") + + # Without adding this dependency to the doc_source_generator, XCode will complain. + add_dependencies(${TARGET} generate_doc_source) +endfunction() diff --git a/cmake/android.cmake b/cmake/android.cmake index 2227f89ce..1d3a93b68 100644 --- a/cmake/android.cmake +++ b/cmake/android.cmake @@ -25,17 +25,25 @@ Android platforms. There is further information and examples in the doc/cmake.rst file. ]=======================================================================] -function( android_options ) - # Android Options -endfunction() -function( android_generate TARGET_NAME ) +#[============================[ Android Options ]============================] +function(android_options) + #[[ Options from SCons + + The options below are managed by CMake toolchain files, doc.cmake.rst has + more information + + android_api_level : Target Android API level. + Default = 21 + + ANDROID_HOME : Path to your Android SDK installation. + Default = os.environ.get("ANDROID_HOME", os.environ.get("ANDROID_SDK_ROOT") + ]] +endfunction() - target_compile_definitions(${TARGET_NAME} - PUBLIC - ANDROID_ENABLED - UNIX_ENABLED - ) +#[===========================[ Target Generation ]===========================] +function(android_generate) + target_compile_definitions(godot-cpp PUBLIC ANDROID_ENABLED UNIX_ENABLED) - common_compiler_flags( ${TARGET_NAME} ) + common_compiler_flags() endfunction() diff --git a/cmake/common_compiler_flags.cmake b/cmake/common_compiler_flags.cmake index 1b185fe2c..8a4d836f5 100644 --- a/cmake/common_compiler_flags.cmake +++ b/cmake/common_compiler_flags.cmake @@ -2,161 +2,191 @@ Common Compiler Flags --------------------- -This file contains a single function to configure platform agnostic compiler -flags like optimization levels, warnings, and features. For platform specific -flags look to each of the ``cmake/.cmake`` files. +This file contains host platform toolchain and target platform agnostic +configuration. It includes flags like optimization levels, warnings, and +features. For target platform specific flags look to each of the +``cmake/.cmake`` files. -]=======================================================================] -#Generator Expression Helpers -set( IS_CLANG "$" ) -set( IS_APPLECLANG "$" ) -set( IS_GNU "$" ) -set( IS_MSVC "$" ) -set( NOT_MSVC "$>" ) - -set( GNU_LT_V8 "$,8>" ) -set( GNU_GE_V9 "$,9>" ) -set( GNU_GT_V11 "$,11>" ) -set( GNU_LT_V11 "$,11>" ) -set( GNU_GE_V12 "$,12>" ) - -set( HOT_RELOAD-UNSET "$") +The default compile and link options CMake adds can be found in the +platform modules_. When a project is created it initializes its variables from +the ``CMAKE_*`` values. The cleanest way I have found to alter these defaults +is the use of the ``CMAKE_PROJECT__INCLUDE`` as demonstrated by +the emsdkHack.cmake to overcome the limitation on shared library creation. -set( DISABLE_EXCEPTIONS "$") +So far the emsdkHack is the only modification to the defaults we have made. +.. _modules: https://github.com/Kitware/CMake/blob/master/Modules/Platform/ -function( common_compiler_flags TARGET_NAME ) - set( IS_RELEASE "$") - set( DEBUG_FEATURES "$,$>" ) - set( HOT_RELOAD "$,$>" ) - set( DEBUG_SYMBOLS "$" ) +]=======================================================================] - target_compile_features(${TARGET_NAME} - PUBLIC - cxx_std_17 - ) +#[[ Compiler Configuration, not to be confused with build targets ]] +set(DEBUG_SYMBOLS "$,$>") + +#[[ Compiler Identification ]] +set(IS_CLANG "$") +set(IS_APPLECLANG "$") +set(IS_GNU "$") +set(IS_MSVC "$") +set(NOT_MSVC "$>") + +set(LT_V8 "$,8>") +set(GE_V9 "$,9>") +set(GT_V11 "$,11>") +set(LT_V11 "$,11>") +set(GE_V12 "$,12>") + +#[===========================[ compiler_detection ]===========================] +#[[ Check for clang-cl with MSVC frontend +The compiler is tested and set when the project command is called. +The variable CXX_COMPILER_FRONTEND_VARIANT was introduced in 3.14 +The generator expression $ wasn't introduced +until CMake 3.30 so we can't use it yet. + +So to support clang downloaded from llvm.org which uses the MSVC frontend +by default, we need to test for it. ]] +function(compiler_detection) + if(${CMAKE_CXX_COMPILER_ID} STREQUAL Clang) + if(${CMAKE_CXX_COMPILER_FRONTEND_VARIANT} STREQUAL MSVC) + message("Using clang-cl") + set(IS_CLANG "0" PARENT_SCOPE) + set(IS_MSVC "1" PARENT_SCOPE) + set(NOT_MSVC "0" PARENT_SCOPE) + endif() + endif() +endfunction() +#[=========================[ common_compiler_flags ]=========================] +#[[ This function assumes it is being called from within one of the platform +generate functions, with all the variables from lower scopes defined. ]] +function(common_compiler_flags) + # gersemi: off # These compiler options reflect what is in godot/SConstruct. - target_compile_options( ${TARGET_NAME} + target_compile_options( + godot-cpp + # The public flag tells CMake that the following options are transient, + # and will propagate to consumers. PUBLIC # Disable exception handling. Godot doesn't use exceptions anywhere, and this # saves around 20% of binary size and very significant build time. - $<${DISABLE_EXCEPTIONS}: - $<${NOT_MSVC}:-fno-exceptions> - > - $<$: - $<${IS_MSVC}:/EHsc> - > + $<${DISABLE_EXCEPTIONS}:$<${NOT_MSVC}:-fno-exceptions>> # Enabling Debug Symbols $<${DEBUG_SYMBOLS}: - $<${IS_MSVC}: /Zi /FS> - # Adding dwarf-4 explicitly makes stacktraces work with clang builds, # otherwise addr2line doesn't understand them. $<${NOT_MSVC}: -gdwarf-4 - $ + $ > > - $<${IS_DEV}: - $<${NOT_MSVC}:-fno-omit-frame-pointer -O0 -g> + $<${IS_DEV_BUILD}:$<${NOT_MSVC}:-fno-omit-frame-pointer -O0>> + + $<${HOT_RELOAD}:$<${IS_GNU}:-fno-gnu-unique>> + + # MSVC only + $<${IS_MSVC}: + # /MP isn't valid for clang-cl with msvc frontend + $<$:/MP${PROC_N}> + + # Interpret source files as utf-8 + /utf-8 > - $<${HOT_RELOAD}: - $<${IS_GNU}:-fno-gnu-unique> + # Warnings below, these do not need to propagate to consumers. + PRIVATE + $<${IS_MSVC}: + /W4 # Warning level 4 (informational) warnings that aren't off by default. + + # Disable warnings which we don't plan to fix. + /wd4100 # C4100 (unreferenced formal parameter): Doesn't play nice with polymorphism. + /wd4127 # C4127 (conditional expression is constant) + /wd4201 # C4201 (non-standard nameless struct/union): Only relevant for C89. + /wd4244 # C4244 C4245 C4267 (narrowing conversions): Unavoidable at this scale. + /wd4245 + /wd4267 + /wd4305 # C4305 (truncation): double to float or real_t, too hard to avoid. + /wd4514 # C4514 (unreferenced inline function has been removed) + /wd4714 # C4714 (function marked as __forceinline not inlined) + /wd4820 # C4820 (padding added after construct) > - # MSVC only - $<${IS_MSVC}: - "/MP ${PROC_N}" - /W4 - - # Disable warnings which we don't plan to fix. - /wd4100 # C4100 (unreferenced formal parameter): Doesn't play nice with polymorphism. - /wd4127 # C4127 (conditional expression is constant) - /wd4201 # C4201 (non-standard nameless struct/union): Only relevant for C89. - /wd4244 # C4244 C4245 C4267 (narrowing conversions): Unavoidable at this scale. - /wd4245 - /wd4267 - /wd4305 # C4305 (truncation): double to float or real_t, too hard to avoid. - /wd4514 # C4514 (unreferenced inline function has been removed) - /wd4714 # C4714 (function marked as __forceinline not inlined) - /wd4820 # C4820 (padding added after construct) - - /utf-8 - > - - # Clang and GNU common options - $<$: - -Wall - -Wctor-dtor-privacy - -Wextra - -Wno-unused-parameter - -Wnon-virtual-dtor - -Wwrite-strings - > - - # Clang only - $<${IS_CLANG}: - -Wimplicit-fallthrough - -Wno-ordered-compare-function-pointers - > - - # GNU only - $<${IS_GNU}: - -Walloc-zero - -Wduplicated-branches - -Wduplicated-cond - -Wno-misleading-indentation - -Wplacement-new=1 - -Wshadow-local - -Wstringop-overflow=4 - - # Bogus warning fixed in 8+. - $<${GNU_LT_V8}:-Wno-strict-overflow> - - $<${GNU_GE_V9}:-Wattribute-alias=2> - - # Broke on MethodBind templates before GCC 11. - $<${GNU_GT_V11}:-Wlogical-op> - - # Regression in GCC 9/10, spams so much in our variadic templates that we need to outright disable it. - $<${GNU_LT_V11}:-Wno-type-limits> - - # False positives in our error macros, see GH-58747. - $<${GNU_GE_V12}:-Wno-return-type> - > + # Clang and GNU common options + $<$: + -Wall + -Wctor-dtor-privacy + -Wextra + -Wno-unused-parameter + -Wnon-virtual-dtor + -Wwrite-strings + > + + # Clang only + $<${IS_CLANG}: + -Wimplicit-fallthrough + -Wno-ordered-compare-function-pointers + > + + # GNU only + $<${IS_GNU}: + -Walloc-zero + -Wduplicated-branches + -Wduplicated-cond + -Wno-misleading-indentation + -Wplacement-new=1 + -Wshadow-local + -Wstringop-overflow=4 + + # Bogus warning fixed in 8+. + $<${LT_V8}:-Wno-strict-overflow> + + $<${GE_V9}:-Wattribute-alias=2> + + # Broke on MethodBind templates before GCC 11. + $<${GT_V11}:-Wlogical-op> + + # Regression in GCC 9/10, spams so much in our variadic templates that we need to outright disable it. + $<${LT_V11}:-Wno-type-limits> + + # False positives in our error macros, see GH-58747. + $<${GE_V12}:-Wno-return-type> + > ) - target_compile_definitions(${TARGET_NAME} + target_compile_definitions( + godot-cpp PUBLIC GDEXTENSION # features $<${DEBUG_FEATURES}:DEBUG_ENABLED DEBUG_METHODS_ENABLED> + $<${IS_DEV_BUILD}:DEV_ENABLED> + $<${HOT_RELOAD}:HOT_RELOAD_ENABLED> - $<$:REAL_T_IS_DOUBLE> + $<$:REAL_T_IS_DOUBLE> $<${IS_MSVC}:$<${DISABLE_EXCEPTIONS}:_HAS_EXCEPTIONS=0>> + + $<${THREADS_ENABLED}:THREADS_ENABLED> ) - target_link_options( ${TARGET_NAME} + target_link_options( + godot-cpp PUBLIC - $<${IS_MSVC}: - /WX # treat link warnings as errors. - /MANIFEST:NO # We dont need a manifest - > - $<${DEBUG_SYMBOLS}:$<${IS_MSVC}:/DEBUG:FULL>> + $<$: $<${IS_GNU}:-s> $<${IS_CLANG}:-s> $<${IS_APPLECLANG}:-Wl,-S -Wl,-x -Wl,-dead_strip> > + PRIVATE + $<${IS_MSVC}: + /WX # treat link warnings as errors. + /MANIFEST:NO # We dont need a manifest + > ) - + # gersemi: on endfunction() diff --git a/cmake/emsdkHack.cmake b/cmake/emsdkHack.cmake index 6981a3796..c5ccc6fc4 100644 --- a/cmake/emsdkHack.cmake +++ b/cmake/emsdkHack.cmake @@ -23,18 +23,18 @@ More information on cmake's `code injection`_ Overwrite Shared Library Properties to allow shared libs to be generated. ]=======================================================================] -if( EMSCRIPTEN ) +if(EMSCRIPTEN) set_property(GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS TRUE) set(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-sSIDE_MODULE=1") set(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS "-sSIDE_MODULE=1") set(CMAKE_SHARED_LIBRARY_SUFFIX) # remove the suffix from the shared lib - set(CMAKE_STRIP FALSE) # used by default in pybind11 on .so modules + set(CMAKE_STRIP FALSE) # used by default in pybind11 on .so modules # The Emscripten toolchain sets the default value for EMSCRIPTEN_SYSTEM_PROCESSOR to x86 - # and CMAKE_SYSTEM_PROCESSOR to this value. I don't want that. - set(CMAKE_SYSTEM_PROCESSOR "wasm32" ) + # and copies that to CMAKE_SYSTEM_PROCESSOR. We don't want that. + set(CMAKE_SYSTEM_PROCESSOR "wasm32") # the above prevents the need for logic like: #if( ${CMAKE_SYSTEM_NAME} STREQUAL Emscripten ) # set( SYSTEM_ARCH wasm32 ) #endif () -endif () +endif() diff --git a/cmake/godotcpp.cmake b/cmake/godotcpp.cmake index c6ba53a34..b93280543 100644 --- a/cmake/godotcpp.cmake +++ b/cmake/godotcpp.cmake @@ -2,129 +2,181 @@ godotcpp.cmake -------------- -Because these files are included into the top level CMakelists.txt before the -project directive, it means that - -* ``CMAKE_CURRENT_SOURCE_DIR`` is the location of godot-cpp's CMakeLists.txt -* ``CMAKE_SOURCE_DIR`` is the location where any prior ``project(...)`` - directive was - +As godot-cpp is a C++ project, there are no C files, and detection of a C +compiler is unnecessary. When CMake performs the configure process, if a +C compiler is specified, like in a toolchain, or from an IDE, then it will +print a warning stating that the CMAKE_C_COMPILER compiler is unused. +This if statement simply silences that warning. ]=======================================================================] -include( ${CMAKE_CURRENT_SOURCE_DIR}/cmake/common_compiler_flags.cmake) -include( ${CMAKE_CURRENT_SOURCE_DIR}/cmake/android.cmake) -include( ${CMAKE_CURRENT_SOURCE_DIR}/cmake/ios.cmake) -include( ${CMAKE_CURRENT_SOURCE_DIR}/cmake/linux.cmake) -include( ${CMAKE_CURRENT_SOURCE_DIR}/cmake/macos.cmake) -include( ${CMAKE_CURRENT_SOURCE_DIR}/cmake/web.cmake) -include( ${CMAKE_CURRENT_SOURCE_DIR}/cmake/windows.cmake) - -#Silence warning from unused CMAKE_C_COMPILER from toolchain -if( CMAKE_C_COMPILER ) -endif () +if(CMAKE_C_COMPILER) +endif() + +#[[ Include Platform Files +Because these files are included into the top level CMakeLists.txt before the +project directive, it means that +CMAKE_CURRENT_SOURCE_DIR is the location of godot-cpp's CMakeLists.txt +CMAKE_SOURCE_DIR is the location where any prior project() directive was ]] +include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/GodotCPPModule.cmake) +include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/common_compiler_flags.cmake) +include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/android.cmake) +include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/ios.cmake) +include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/linux.cmake) +include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/macos.cmake) +include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/web.cmake) +include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/windows.cmake) + +# Detect number of processors include(ProcessorCount) ProcessorCount(PROC_MAX) -message( "Auto-detected ${PROC_MAX} CPU cores available for build parallelism." ) +message("Auto-detected ${PROC_MAX} CPU cores available for build parallelism.") # List of known platforms -set( PLATFORM_LIST linux macos windows android ios web ) +set(PLATFORM_LIST + linux + macos + windows + android + ios + web +) # List of known architectures -set( ARCH_LIST universal x86_32 x86_64 arm32 arm64 rv64 ppc32 ppc64 wasm32 ) - -# Function to map processors to known architectures -function( godot_arch_map ALIAS PROC ) - string( TOLOWER "${PROC}" PROC ) +set(ARCH_LIST + x86_32 + x86_64 + arm32 + arm64 + rv64 + ppc32 + ppc64 + wasm32 +) + +#[=============================[ godot_arch_name ]=============================] +#[[ Function to map CMAKE_SYSTEM_PROCESSOR names to godot arch equivalents ]] +function(godot_arch_name OUTVAR) + # Special case for macos universal builds that target both x86_64 and arm64 + if(DEFINED CMAKE_OSX_ARCHITECTURES) + if("x86_64" IN_LIST CMAKE_OSX_ARCHITECTURES AND "arm64" IN_LIST CMAKE_OSX_ARCHITECTURES) + set(${OUTVAR} "universal" PARENT_SCOPE) + return() + endif() + endif() - if( "${PROC}" IN_LIST ARCH_LIST ) - set( ${ALIAS} "${PROC}" PARENT_SCOPE) + # Direct match early out. + string(TOLOWER "${CMAKE_SYSTEM_PROCESSOR}" ARCH) + if(ARCH IN_LIST ARCH_LIST) + set(${OUTVAR} "${ARCH}" PARENT_SCOPE) return() endif() - set( x86_64 "w64;amd64" ) - set( arm32 "armv7" ) - set( arm64 "armv8;arm64v8;aarch64" ) - set( rv64 "rv;riscv;riscv64" ) - set( ppc32 "ppcle;ppc" ) - set( ppc64 "ppc64le" ) - - if( PROC IN_LIST x86_64 ) - set(${ALIAS} "x86_64" PARENT_SCOPE ) - - elseif( PROC IN_LIST arm32 ) - set(${ALIAS} "arm32" PARENT_SCOPE ) - - elseif( PROC IN_LIST arm64 ) - set(${ALIAS} "arm64" PARENT_SCOPE ) - - elseif( PROC IN_LIST rv64 ) - set(${ALIAS} "rv64" PARENT_SCOPE ) - - elseif( PROC IN_LIST ppc32 ) - set(${ALIAS} "ppc32" PARENT_SCOPE ) - - elseif( PROC IN_LIST ppc64 ) - set(${ALIAS} "ppc64" PARENT_SCOPE ) - + # Known aliases + set(x86_64 "w64;amd64;x86-64") + set(arm32 "armv7;armv7-a") + set(arm64 "armv8;arm64v8;aarch64;armv8-a") + set(rv64 "rv;riscv;riscv64") + set(ppc32 "ppcle;ppc") + set(ppc64 "ppc64le") + + if(ARCH IN_LIST x86_64) + set(${OUTVAR} "x86_64" PARENT_SCOPE) + elseif(ARCH IN_LIST arm32) + set(${OUTVAR} "arm32" PARENT_SCOPE) + elseif(ARCH IN_LIST arm64) + set(${OUTVAR} "arm64" PARENT_SCOPE) + elseif(ARCH IN_LIST rv64) + set(${OUTVAR} "rv64" PARENT_SCOPE) + elseif(ARCH IN_LIST ppc32) + set(${OUTVAR} "ppc32" PARENT_SCOPE) + elseif(ARCH IN_LIST ppc64) + set(${OUTVAR} "ppc64" PARENT_SCOPE) + elseif(ARCH MATCHES "86") + # Catches x86, i386, i486, i586, i686, etc. + set(${OUTVAR} "x86_32" PARENT_SCOPE) else() - set(${ALIAS} "unknown" PARENT_SCOPE ) - endif () + # Default value is whatever the processor is. + set(${OUTVAR} ${CMAKE_SYSTEM_PROCESSOR} PARENT_SCOPE) + endif() endfunction() # Function to define all the options. -function( godotcpp_options ) +function(godotcpp_options) #NOTE: platform is managed using toolchain files. + #NOTE: arch is managed by using toolchain files. + # To create a universal build for macos, set CMAKE_OSX_ARCHITECTURES + + set(GODOTCPP_TARGET + "template_debug" + CACHE STRING + "Which target to generate. valid values are: template_debug, template_release, and editor" + ) + set_property(CACHE GODOTCPP_TARGET PROPERTY STRINGS "template_debug;template_release;editor") # Input from user for GDExtension interface header and the API JSON file - set(GODOT_GDEXTENSION_DIR "gdextension" CACHE PATH - "Path to a custom directory containing GDExtension interface header and API JSON file ( /path/to/gdextension_dir )" ) - set(GODOT_CUSTOM_API_FILE "" CACHE FILEPATH - "Path to a custom GDExtension API JSON file (takes precedence over `GODOT_GDEXTENSION_DIR`) ( /path/to/custom_api_file )") + set(GODOTCPP_GDEXTENSION_DIR + "gdextension" + CACHE PATH + "Path to a custom directory containing GDExtension interface header and API JSON file ( /path/to/gdextension_dir )" + ) + set(GODOTCPP_CUSTOM_API_FILE + "" + CACHE FILEPATH + "Path to a custom GDExtension API JSON file (takes precedence over `GODOTCPP_GDEXTENSION_DIR`) ( /path/to/custom_api_file )" + ) #TODO generate_bindings - option(GODOT_GENERATE_TEMPLATE_GET_NODE - "Generate a template version of the Node class's get_node. (ON|OFF)" ON) + option(GODOTCPP_GENERATE_TEMPLATE_GET_NODE "Generate a template version of the Node class's get_node. (ON|OFF)" ON) #TODO build_library - set(GODOT_PRECISION "single" CACHE STRING - "Set the floating-point precision level (single|double)") + set(GODOTCPP_PRECISION "single" CACHE STRING "Set the floating-point precision level (single|double)") - # The arch is typically set by the toolchain - # however for Apple multi-arch setting it here will override. - set( GODOT_ARCH "" CACHE STRING "Target CPU Architecture") - set_property( CACHE GODOT_ARCH PROPERTY STRINGS ${ARCH_LIST} ) + set(GODOTCPP_THREADS ON CACHE BOOL "Enable threading support") - #TODO threads #TODO compiledb #TODO compiledb_file - #NOTE: build_profile's equivalent in cmake is CMakePresets.json + set(GODOTCPP_BUILD_PROFILE "" CACHE PATH "Path to a file containing a feature build profile") - set(GODOT_USE_HOT_RELOAD "" CACHE BOOL - "Enable the extra accounting required to support hot reload. (ON|OFF)") + set(GODOTCPP_USE_HOT_RELOAD "" CACHE BOOL "Enable the extra accounting required to support hot reload. (ON|OFF)") # Disable exception handling. Godot doesn't use exceptions anywhere, and this # saves around 20% of binary size and very significant build time (GH-80513). - option(GODOT_DISABLE_EXCEPTIONS "Force disabling exception handling code (ON|OFF)" ON ) + option(GODOTCPP_DISABLE_EXCEPTIONS "Force disabling exception handling code (ON|OFF)" ON) - set( GODOT_SYMBOL_VISIBILITY "hidden" CACHE STRING - "Symbols visibility on GNU platforms. Use 'auto' to apply the default value. (auto|visible|hidden)") - set_property( CACHE GODOT_SYMBOL_VISIBILITY PROPERTY STRINGS "auto;visible;hidden" ) + set(GODOTCPP_SYMBOL_VISIBILITY + "hidden" + CACHE STRING + "Symbols visibility on GNU platforms. Use 'auto' to apply the default value. (auto|visible|hidden)" + ) + set_property(CACHE GODOTCPP_SYMBOL_VISIBILITY PROPERTY STRINGS "auto;visible;hidden") #TODO optimize - #TODO debug_symbols - option( GODOT_DEBUG_SYMBOLS "" OFF ) - option( GODOT_DEV_BUILD "Developer build with dev-only debugging code (DEV_ENABLED)" OFF ) + + option(GODOTCPP_DEV_BUILD "Developer build with dev-only debugging code (DEV_ENABLED)" OFF) + + #[[ debug_symbols + Debug symbols are enabled by using the Debug or RelWithDebInfo build configurations. + Single Config Generator is set at configure time + + cmake ../ -DCMAKE_BUILD_TYPE=Debug + + Multi-Config Generator is set at build time + + cmake --build . --config Debug + + ]] # FIXME These options are not present in SCons, and perhaps should be added there. - option( GODOT_SYSTEM_HEADERS "Expose headers as SYSTEM." OFF ) - option( GODOT_WARNING_AS_ERROR "Treat warnings as errors" OFF ) + option(GODOTCPP_SYSTEM_HEADERS "Expose headers as SYSTEM." OFF) + option(GODOTCPP_WARNING_AS_ERROR "Treat warnings as errors" OFF) + + # Enable Testing + option(GODOTCPP_ENABLE_TESTING "Enable the godot-cpp.test. integration testing targets" OFF) - # Run options commands on the following to populate cache for all - # platforms. This type of thing is typically done conditionally But as - # scons shows all options so shall we. + #[[ Target Platform Options ]] android_options() ios_options() linux_options() @@ -133,10 +185,9 @@ function( godotcpp_options ) windows_options() endfunction() -# Function to configure and generate the targets -function( godotcpp_generate ) +#[===========================[ Target Generation ]===========================] +function(godotcpp_generate) #[[ Multi-Threaded MSVC Compilation - When using the MSVC compiler the build command -j only specifies parallel jobs or targets, and not multi-threaded compilation To speed up compile times on msvc, the /MP flag can be set. But we need to set it @@ -144,157 +195,196 @@ function( godotcpp_generate ) MSVC is true when the compiler is some version of Microsoft Visual C++ or another compiler simulating the Visual C++ cl command-line syntax. ]] - if( MSVC ) - math( EXPR PROC_N "(${PROC_MAX}-1) | (${X}-2)>>31 & 1" ) - message( "Using ${PROC_N} cores for multi-threaded compilation.") + if(MSVC) + math(EXPR PROC_N "(${PROC_MAX}-1) | (${X}-2)>>31 & 1") + message("Using ${PROC_N} cores for multi-threaded compilation.") # TODO You can override it at configure time with ...." ) - else () - message( "Using ${CMAKE_BUILD_PARALLEL_LEVEL} cores, You can override" - " it at configure time by using -j or --parallel on the build" - " command.") - message( " eg. cmake --build . -j 7 ...") - endif () - - #[[ GODOT_SYMBOL_VISIBLITY + else() + message( + "Using ${CMAKE_BUILD_PARALLEL_LEVEL} cores, You can override" + " it at configure time by using -j or --parallel on the build" + " command." + ) + message(" eg. cmake --build . -j 7 ...") + endif() + + #[[ GODOTCPP_SYMBOL_VISIBLITY To match the SCons options, the allowed values are "auto", "visible", and "hidden" - This effects the compiler flag -fvisibility=[default|internal|hidden|protected] - The corresponding CMake option CXX_VISIBILITY_PRESET accepts the compiler values. + This effects the compiler flag_ -fvisibility=[default|internal|hidden|protected] + The corresponding target option CXX_VISIBILITY_PRESET accepts the compiler values. TODO: It is probably worth a pull request which changes both to use the compiler values - https://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html#index-fvisibility - - This performs the necessary conversion + .. _flag:https://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html#index-fvisibility ]] - if( ${GODOT_SYMBOL_VISIBILITY} STREQUAL "auto" OR ${GODOT_SYMBOL_VISIBILITY} STREQUAL "visible" ) - set( GODOT_SYMBOL_VISIBILITY "default" ) - endif () + if(${GODOTCPP_SYMBOL_VISIBILITY} STREQUAL "auto" OR ${GODOTCPP_SYMBOL_VISIBILITY} STREQUAL "visible") + set(GODOTCPP_SYMBOL_VISIBILITY "default") + endif() # Setup variable to optionally mark headers as SYSTEM - set(GODOT_SYSTEM_HEADERS_ATTRIBUTE "") - if (GODOT_SYSTEM_HEADERS) - set(GODOT_SYSTEM_HEADERS_ATTRIBUTE SYSTEM) - endif () - - #[[ Generate Bindings ]] - if(NOT DEFINED BITS) - set(BITS 32) - if(CMAKE_SIZEOF_VOID_P EQUAL 8) - set(BITS 64) - endif(CMAKE_SIZEOF_VOID_P EQUAL 8) + set(GODOTCPP_SYSTEM_HEADERS_ATTRIBUTE "") + if(GODOTCPP_SYSTEM_HEADERS) + set(GODOTCPP_SYSTEM_HEADERS_ATTRIBUTE SYSTEM) endif() - set(GODOT_GDEXTENSION_API_FILE "${GODOT_GDEXTENSION_DIR}/extension_api.json") - if (NOT "${GODOT_CUSTOM_API_FILE}" STREQUAL "") # User-defined override. - set(GODOT_GDEXTENSION_API_FILE "${GODOT_CUSTOM_API_FILE}") + #[[ Configure Binding Variables ]] + # Generate Binding Parameters (True|False) + set(USE_TEMPLATE_GET_NODE "False") + if(GODOTCPP_GENERATE_TEMPLATE_GET_NODE) + set(USE_TEMPLATE_GET_NODE "True") endif() - # Code Generation option - if(GODOT_GENERATE_TEMPLATE_GET_NODE) - set(GENERATE_BINDING_PARAMETERS "True") - else() - set(GENERATE_BINDING_PARAMETERS "False") + # Bits (32|64) + math(EXPR BITS "${CMAKE_SIZEOF_VOID_P} * 8") # CMAKE_SIZEOF_VOID_P refers to target architecture. + + # API json File + set(GODOTCPP_GDEXTENSION_API_FILE "${GODOTCPP_GDEXTENSION_DIR}/extension_api.json") + if(GODOTCPP_CUSTOM_API_FILE) # User-defined override. + set(GODOTCPP_GDEXTENSION_API_FILE "${GODOTCPP_CUSTOM_API_FILE}") endif() - execute_process(COMMAND "${Python3_EXECUTABLE}" "-c" "import binding_generator; binding_generator.print_file_list('${GODOT_GDEXTENSION_API_FILE}', '${CMAKE_CURRENT_BINARY_DIR}', headers=True, sources=True)" - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} - OUTPUT_VARIABLE GENERATED_FILES_LIST - OUTPUT_STRIP_TRAILING_WHITESPACE + # Build Profile + if(GODOTCPP_BUILD_PROFILE) + message(STATUS "Using build profile to trim api file") + message("\tBUILD_PROFILE = '${GODOTCPP_BUILD_PROFILE}'") + message("\tAPI_SOURCE = '${GODOTCPP_GDEXTENSION_API_FILE}'") + build_profile_generate_trimmed_api( + "${GODOTCPP_BUILD_PROFILE}" + "${GODOTCPP_GDEXTENSION_API_FILE}" + "${CMAKE_CURRENT_BINARY_DIR}/extension_api.json" + ) + set(GODOTCPP_GDEXTENSION_API_FILE "${CMAKE_CURRENT_BINARY_DIR}/extension_api.json") + endif() + + message(STATUS "GODOTCPP_GDEXTENSION_API_FILE = '${GODOTCPP_GDEXTENSION_API_FILE}'") + + # generate the file list to use + binding_generator_get_file_list( GENERATED_FILES_LIST + "${GODOTCPP_GDEXTENSION_API_FILE}" + "${CMAKE_CURRENT_BINARY_DIR}" ) - add_custom_command(OUTPUT ${GENERATED_FILES_LIST} - COMMAND "${Python3_EXECUTABLE}" "-c" "import binding_generator; binding_generator.generate_bindings('${GODOT_GDEXTENSION_API_FILE}', '${GENERATE_BINDING_PARAMETERS}', '${BITS}', '${GODOT_PRECISION}', '${CMAKE_CURRENT_BINARY_DIR}')" - VERBATIM - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} - MAIN_DEPENDENCY ${GODOT_GDEXTENSION_API_FILE} - DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/binding_generator.py - COMMENT "Generating bindings" + binding_generator_generate_bindings( + "${GODOTCPP_GDEXTENSION_API_FILE}" + "${USE_TEMPLATE_GET_NODE}" + "${BITS}" + "${GODOTCPP_PRECISION}" + "${CMAKE_CURRENT_BINARY_DIR}" ) ### Platform is derived from the toolchain target # See GeneratorExpressions PLATFORM_ID and CMAKE_SYSTEM_NAME - set( SYSTEM_NAME - $<$:android.${ANDROID_ABI}> - $<$:ios> - $<$:linux> - $<$:macos> - $<$:web> - $<$:windows> - $<$:windows> + string( + CONCAT + SYSTEM_NAME + "$<$:android>" + "$<$:ios>" + "$<$:linux>" + "$<$:macos>" + "$<$:web>" + "$<$:windows>" + "$<$:windows>" ) - string(REPLACE ";" "" SYSTEM_NAME "${SYSTEM_NAME}") - ### Use the arch from the toolchain if it isn't set manually - if( GODOT_ARCH ) - set(SYSTEM_ARCH ${GODOT_ARCH}) - else() - godot_arch_map( SYSTEM_ARCH ${CMAKE_SYSTEM_PROCESSOR} ) + # Process CPU architecture argument. + godot_arch_name( ARCH_NAME ) + + # Transform options into generator expressions + set(HOT_RELOAD-UNSET "$") + + set(DISABLE_EXCEPTIONS "$") + + set(THREADS_ENABLED "$") + + # GODOTCPP_DEV_BUILD + set(RELEASE_TYPES "Release;MinSizeRel") + get_property(IS_MULTI_CONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) + if(IS_MULTI_CONFIG) + message(NOTICE "=> Default build type is Debug. For other build types add --config to build command") + elseif(GODOTCPP_DEV_BUILD AND CMAKE_BUILD_TYPE IN_LIST RELEASE_TYPES) + message( + WARNING + "=> GODOTCPP_DEV_BUILD implies a Debug-like build but CMAKE_BUILD_TYPE is '${CMAKE_BUILD_TYPE}'" + ) endif() + set(IS_DEV_BUILD "$") ### Define our godot-cpp library targets - foreach ( TARGET_NAME template_debug template_release editor ) + # Generator Expressions that rely on the target + set(DEBUG_FEATURES "$>") + set(HOT_RELOAD "$>") + + # Suffix + string( + CONCAT + GODOTCPP_SUFFIX + "$<1:.${SYSTEM_NAME}>" + "$<1:.${GODOTCPP_TARGET}>" + "$<${IS_DEV_BUILD}:.dev>" + "$<$:.double>" + "$<1:.${ARCH_NAME}>" + # TODO IOS_SIMULATOR + "$<$:.nothreads>" + ) - # Useful genex snippits used in subsequent genex's - set( IS_RELEASE "$") - set( IS_DEV "$") - set( DEBUG_FEATURES "$,$>" ) - set( HOT_RELOAD "$,$>" ) + # the godot-cpp.* library targets + add_library(godot-cpp STATIC) - # the godot-cpp.* library targets - add_library( ${TARGET_NAME} STATIC ${EXCLUDE} ) - add_library( godot-cpp::${TARGET_NAME} ALIAS ${TARGET_NAME} ) + # Without adding this dependency to the binding generator, XCode will complain. + add_dependencies(godot-cpp generate_bindings) - file( GLOB_RECURSE GODOTCPP_SOURCES LIST_DIRECTORIES NO CONFIGURE_DEPENDS src/*.cpp ) + # Added for backwards compatibility with prior cmake solution so that builds dont immediately break + # from a missing target. + add_library(godot::cpp ALIAS godot-cpp) - target_sources( ${TARGET_NAME} - PRIVATE - ${GODOTCPP_SOURCES} - ${GENERATED_FILES_LIST} - ) + file(GLOB_RECURSE GODOTCPP_SOURCES LIST_DIRECTORIES NO CONFIGURE_DEPENDS src/*.cpp) - target_include_directories( ${TARGET_NAME} ${GODOT_SYSTEM_HEADERS_ATTRIBUTE} PUBLIC - include - ${CMAKE_CURRENT_BINARY_DIR}/gen/include - ${GODOT_GDEXTENSION_DIR} - ) + target_sources(godot-cpp PRIVATE ${GODOTCPP_SOURCES} ${GENERATED_FILES_LIST}) - set_target_properties( ${TARGET_NAME} - PROPERTIES - CXX_STANDARD 17 - CXX_EXTENSIONS OFF - CXX_VISIBILITY_PRESET ${GODOT_SYMBOL_VISIBILITY} + target_include_directories( + godot-cpp + ${GODOTCPP_SYSTEM_HEADERS_ATTRIBUTE} + PUBLIC include ${CMAKE_CURRENT_BINARY_DIR}/gen/include ${GODOTCPP_GDEXTENSION_DIR} + ) - COMPILE_WARNING_AS_ERROR ${GODOT_WARNING_AS_ERROR} - POSITION_INDEPENDENT_CODE ON - BUILD_RPATH_USE_ORIGIN ON + # gersemi: off + set_target_properties( + godot-cpp + PROPERTIES + CXX_STANDARD 17 + CXX_EXTENSIONS OFF + CXX_VISIBILITY_PRESET ${GODOTCPP_SYMBOL_VISIBILITY} - PREFIX lib - OUTPUT_NAME "${PROJECT_NAME}.${SYSTEM_NAME}.${TARGET_NAME}.${SYSTEM_ARCH}" - ARCHIVE_OUTPUT_DIRECTORY "$<1:${CMAKE_BINARY_DIR}/bin>" + COMPILE_WARNING_AS_ERROR ${GODOTCPP_WARNING_AS_ERROR} + POSITION_INDEPENDENT_CODE ON + BUILD_RPATH_USE_ORIGIN ON - # Things that are handy to know for dependent targets - GODOT_PLATFORM "${SYSTEM_NAME}" - GODOT_TARGET "${TARGET_NAME}" - GODOT_ARCH "${SYSTEM_ARCH}" - ) + PREFIX "lib" + OUTPUT_NAME "${PROJECT_NAME}${GODOTCPP_SUFFIX}" - if( CMAKE_SYSTEM_NAME STREQUAL Android ) - android_generate( ${TARGET_NAME} ) - elseif ( CMAKE_SYSTEM_NAME STREQUAL iOS ) - ios_generate( ${TARGET_NAME} ) - elseif ( CMAKE_SYSTEM_NAME STREQUAL Linux ) - linux_generate( ${TARGET_NAME} ) - elseif ( CMAKE_SYSTEM_NAME STREQUAL Darwin ) - macos_generate( ${TARGET_NAME} ) - elseif ( CMAKE_SYSTEM_NAME STREQUAL Emscripten ) - web_generate( ${TARGET_NAME} ) - elseif ( CMAKE_SYSTEM_NAME STREQUAL Windows ) - windows_generate( ${TARGET_NAME} ) - endif () - - endforeach () + ARCHIVE_OUTPUT_DIRECTORY "$<1:${CMAKE_BINARY_DIR}/bin>" - # Added for backwards compatibility with prior cmake solution so that builds dont immediately break - # from a missing target. - add_library( godot::cpp ALIAS template_debug ) + # Things that are handy to know for dependent targets + GODOTCPP_PLATFORM "${SYSTEM_NAME}" + GODOTCPP_TARGET "${GODOTCPP_TARGET}" + GODOTCPP_ARCH "${ARCH_NAME}" + GODOTCPP_PRECISION "${GODOTCPP_PRECISION}" + GODOTCPP_SUFFIX "${GODOTCPP_SUFFIX}" + # Some IDE's respect this property to logically group targets + FOLDER "godot-cpp" + ) + # gersemi: on + if(CMAKE_SYSTEM_NAME STREQUAL Android) + android_generate() + elseif(CMAKE_SYSTEM_NAME STREQUAL iOS) + ios_generate() + elseif(CMAKE_SYSTEM_NAME STREQUAL Linux) + linux_generate() + elseif(CMAKE_SYSTEM_NAME STREQUAL Darwin) + macos_generate() + elseif(CMAKE_SYSTEM_NAME STREQUAL Emscripten) + web_generate() + elseif(CMAKE_SYSTEM_NAME STREQUAL Windows) + windows_generate() + endif() endfunction() diff --git a/cmake/ios.cmake b/cmake/ios.cmake index bb9642210..52b2c012a 100644 --- a/cmake/ios.cmake +++ b/cmake/ios.cmake @@ -1,22 +1,36 @@ #[=======================================================================[.rst: -Ios +iOS --- This file contains functions for options and configuration for targeting the -Ios platform +iOS platform ]=======================================================================] + +#[==============================[ iOS Options ]==============================] function(ios_options) - # iOS options -endfunction() + #[[ Options from SCons + + TODO ios_simulator: Target iOS Simulator + Default: False + + TODO ios_min_version: Target minimum iphoneos/iphonesimulator version + Default: 12.0 -function(ios_generate TARGET_NAME) + TODO IOS_TOOLCHAIN_PATH: Path to iOS toolchain + Default: "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain", + + TODO IOS_SDK_PATH: Path to the iOS SDK + Default: '' + + TODO ios_triple: Triple for ios toolchain + Default: if has_ios_osxcross(): 'ios_triple' else '' + ]] +endfunction() - target_compile_definitions(${TARGET_NAME} - PUBLIC - IOS_ENABLED - UNIX_ENABLED - ) +#[===========================[ Target Generation ]===========================] +function(ios_generate) + target_compile_definitions(godot-cpp PUBLIC IOS_ENABLED UNIX_ENABLED) - common_compiler_flags(${TARGET_NAME}) + common_compiler_flags() endfunction() diff --git a/cmake/ios.toolchain.cmake b/cmake/ios.toolchain.cmake new file mode 100644 index 000000000..d82518162 --- /dev/null +++ b/cmake/ios.toolchain.cmake @@ -0,0 +1,1147 @@ +# gersemi: off +# This file is part of the ios-cmake project. It was retrieved from +# https://github.com/leetal/ios-cmake.git, which is a fork of +# https://github.com/gerstrong/ios-cmake.git, which is a fork of +# https://github.com/cristeab/ios-cmake.git, which is a fork of +# https://code.google.com/p/ios-cmake/. Which in turn is based off of +# the Platform/Darwin.cmake and Platform/UnixPaths.cmake files which +# are included with CMake 2.8.4 +# +# The ios-cmake project is licensed under the new BSD license. +# +# Copyright (c) 2014, Bogdan Cristea and LTE Engineering Software, +# Kitware, Inc., Insight Software Consortium. All rights reserved. +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# 3. Neither the name of the copyright holder nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +# This file is based on the Platform/Darwin.cmake and +# Platform/UnixPaths.cmake files which are included with CMake 2.8.4 +# It has been altered for iOS development. +# +# Updated by Alex Stewart (alexs.mac@gmail.com) +# +# ***************************************************************************** +# Now maintained by Alexander Widerberg (widerbergaren [at] gmail.com) +# under the BSD-3-Clause license +# https://github.com/leetal/ios-cmake +# ***************************************************************************** +# +# INFORMATION / HELP +# +############################################################################### +# OPTIONS # +############################################################################### +# +# PLATFORM: (default "OS64") +# OS = Build for iPhoneOS. +# OS64 = Build for arm64 iphoneOS. +# OS64COMBINED = Build for arm64 x86_64 iphoneOS + iphoneOS Simulator. Combined into FAT STATIC lib (only supported on 3.14+ of CMake with "-G Xcode" argument in combination with the "cmake --install" CMake build step) +# SIMULATOR = Build for x86 i386 iphoneOS Simulator. +# SIMULATOR64 = Build for x86_64 iphoneOS Simulator. +# SIMULATORARM64 = Build for arm64 iphoneOS Simulator. +# SIMULATOR64COMBINED = Build for arm64 x86_64 iphoneOS Simulator. Combined into FAT STATIC lib (supported on 3.14+ of CMakewith "-G Xcode" argument ONLY) +# TVOS = Build for arm64 tvOS. +# TVOSCOMBINED = Build for arm64 x86_64 tvOS + tvOS Simulator. Combined into FAT STATIC lib (only supported on 3.14+ of CMake with "-G Xcode" argument in combination with the "cmake --install" CMake build step) +# SIMULATOR_TVOS = Build for x86_64 tvOS Simulator. +# SIMULATORARM64_TVOS = Build for arm64 tvOS Simulator. +# VISIONOSCOMBINED = Build for arm64 visionOS + visionOS Simulator. Combined into FAT STATIC lib (only supported on 3.14+ of CMake with "-G Xcode" argument in combination with the "cmake --install" CMake build step) +# VISIONOS = Build for arm64 visionOS. +# SIMULATOR_VISIONOS = Build for arm64 visionOS Simulator. +# WATCHOS = Build for armv7k arm64_32 for watchOS. +# WATCHOSCOMBINED = Build for armv7k arm64_32 x86_64 watchOS + watchOS Simulator. Combined into FAT STATIC lib (only supported on 3.14+ of CMake with "-G Xcode" argument in combination with the "cmake --install" CMake build step) +# SIMULATOR_WATCHOS = Build for x86_64 for watchOS Simulator. +# SIMULATORARM64_WATCHOS = Build for arm64 for watchOS Simulator. +# MAC = Build for x86_64 macOS. +# MAC_ARM64 = Build for Apple Silicon macOS. +# MAC_UNIVERSAL = Combined build for x86_64 and Apple Silicon on macOS. +# MAC_CATALYST = Build for x86_64 macOS with Catalyst support (iOS toolchain on macOS). +# Note: The build argument "MACOSX_DEPLOYMENT_TARGET" can be used to control min-version of macOS +# MAC_CATALYST_ARM64 = Build for Apple Silicon macOS with Catalyst support (iOS toolchain on macOS). +# Note: The build argument "MACOSX_DEPLOYMENT_TARGET" can be used to control min-version of macOS +# MAC_CATALYST_UNIVERSAL = Combined build for x86_64 and Apple Silicon on Catalyst. +# +# CMAKE_OSX_SYSROOT: Path to the SDK to use. By default this is +# automatically determined from PLATFORM and xcodebuild, but +# can also be manually specified (although this should not be required). +# +# CMAKE_DEVELOPER_ROOT: Path to the Developer directory for the platform +# being compiled for. By default, this is automatically determined from +# CMAKE_OSX_SYSROOT, but can also be manually specified (although this should +# not be required). +# +# DEPLOYMENT_TARGET: Minimum SDK version to target. Default 6.0 on watchOS, 13.0 on tvOS+iOS/iPadOS, 11.0 on macOS, 1.0 on visionOS +# +# NAMED_LANGUAGE_SUPPORT: +# ON (default) = Will require "enable_language(OBJC) and/or enable_language(OBJCXX)" for full OBJC|OBJCXX support +# OFF = Will embed the OBJC and OBJCXX flags into the CMAKE_C_FLAGS and CMAKE_CXX_FLAGS (legacy behavior, CMake version < 3.16) +# +# ENABLE_BITCODE: (ON|OFF) Enables or disables bitcode support. Default OFF +# +# ENABLE_ARC: (ON|OFF) Enables or disables ARC support. Default ON (ARC enabled by default) +# +# ENABLE_VISIBILITY: (ON|OFF) Enables or disables symbol visibility support. Default OFF (visibility hidden by default) +# +# ENABLE_STRICT_TRY_COMPILE: (ON|OFF) Enables or disables strict try_compile() on all Check* directives (will run linker +# to actually check if linking is possible). Default OFF (will set CMAKE_TRY_COMPILE_TARGET_TYPE to STATIC_LIBRARY) +# +# ARCHS: (armv7 armv7s armv7k arm64 arm64_32 i386 x86_64) If specified, will override the default architectures for the given PLATFORM +# OS = armv7 armv7s arm64 (if applicable) +# OS64 = arm64 (if applicable) +# SIMULATOR = i386 +# SIMULATOR64 = x86_64 +# SIMULATORARM64 = arm64 +# TVOS = arm64 +# SIMULATOR_TVOS = x86_64 (i386 has since long been deprecated) +# SIMULATORARM64_TVOS = arm64 +# WATCHOS = armv7k arm64_32 (if applicable) +# SIMULATOR_WATCHOS = x86_64 (i386 has since long been deprecated) +# SIMULATORARM64_WATCHOS = arm64 +# MAC = x86_64 +# MAC_ARM64 = arm64 +# MAC_UNIVERSAL = x86_64 arm64 +# MAC_CATALYST = x86_64 +# MAC_CATALYST_ARM64 = arm64 +# MAC_CATALYST_UNIVERSAL = x86_64 arm64 +# +# NOTE: When manually specifying ARCHS, put a semi-colon between the entries. E.g., -DARCHS="armv7;arm64" +# +############################################################################### +# END OPTIONS # +############################################################################### +# +# This toolchain defines the following properties (available via get_property()) for use externally: +# +# PLATFORM: The currently targeted platform. +# XCODE_VERSION: Version number (not including Build version) of Xcode detected. +# SDK_VERSION: Version of SDK being used. +# OSX_ARCHITECTURES: Architectures being compiled for (generated from PLATFORM). +# APPLE_TARGET_TRIPLE: Used by autoconf build systems. NOTE: If "ARCHS" is overridden, this will *NOT* be set! +# +# This toolchain defines the following macros for use externally: +# +# set_xcode_property (TARGET XCODE_PROPERTY XCODE_VALUE XCODE_VARIANT) +# A convenience macro for setting xcode specific properties on targets. +# Available variants are: All, Release, RelWithDebInfo, Debug, MinSizeRel +# example: set_xcode_property (myioslib IPHONEOS_DEPLOYMENT_TARGET "3.1" "all"). +# +# find_host_package (PROGRAM ARGS) +# A macro used to find executable programs on the host system, not within the +# environment. Thanks to the android-cmake project for providing the +# command. +# + +cmake_minimum_required(VERSION 3.8.0) + +# CMake invokes the toolchain file twice during the first build, but only once during subsequent rebuilds. +# NOTE: To improve single-library build-times, provide the flag "OS_SINGLE_BUILD" as a build argument. +if(DEFINED OS_SINGLE_BUILD AND DEFINED ENV{_IOS_TOOLCHAIN_HAS_RUN}) + return() +endif() +set(ENV{_IOS_TOOLCHAIN_HAS_RUN} true) + +# List of supported platform values +list(APPEND _supported_platforms + "OS" "OS64" "OS64COMBINED" "SIMULATOR" "SIMULATOR64" "SIMULATORARM64" "SIMULATOR64COMBINED" + "TVOS" "TVOSCOMBINED" "SIMULATOR_TVOS" "SIMULATORARM64_TVOS" + "WATCHOS" "WATCHOSCOMBINED" "SIMULATOR_WATCHOS" "SIMULATORARM64_WATCHOS" + "MAC" "MAC_ARM64" "MAC_UNIVERSAL" + "VISIONOS" "SIMULATOR_VISIONOS" "VISIONOSCOMBINED" + "MAC_CATALYST" "MAC_CATALYST_ARM64" "MAC_CATALYST_UNIVERSAL") + +# Cache what generator is used +set(USED_CMAKE_GENERATOR "${CMAKE_GENERATOR}") + +# Check if using a CMake version capable of building combined FAT builds (simulator and target slices combined in one static lib) +if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.14") + set(MODERN_CMAKE YES) +endif() + +# Get the Xcode version being used. +# Problem: CMake runs toolchain files multiple times, but can't read cache variables on some runs. +# Workaround: On the first run (in which cache variables are always accessible), set an intermediary environment variable. +# +# NOTE: This pattern is used in many places in this toolchain to speed up checks of all sorts +if(DEFINED XCODE_VERSION_INT) + # Environment variables are always preserved. + set(ENV{_XCODE_VERSION_INT} "${XCODE_VERSION_INT}") +elseif(DEFINED ENV{_XCODE_VERSION_INT}) + set(XCODE_VERSION_INT "$ENV{_XCODE_VERSION_INT}") +elseif(NOT DEFINED XCODE_VERSION_INT) + find_program(XCODEBUILD_EXECUTABLE xcodebuild) + if(NOT XCODEBUILD_EXECUTABLE) + message(FATAL_ERROR "xcodebuild not found. Please install either the standalone commandline tools or Xcode.") + endif() + execute_process(COMMAND ${XCODEBUILD_EXECUTABLE} -version + OUTPUT_VARIABLE XCODE_VERSION_INT + ERROR_QUIET + OUTPUT_STRIP_TRAILING_WHITESPACE) + string(REGEX MATCH "Xcode [0-9\\.]+" XCODE_VERSION_INT "${XCODE_VERSION_INT}") + string(REGEX REPLACE "Xcode ([0-9\\.]+)" "\\1" XCODE_VERSION_INT "${XCODE_VERSION_INT}") + set(XCODE_VERSION_INT "${XCODE_VERSION_INT}" CACHE INTERNAL "") +endif() + +# Assuming that xcode 12.0 is installed you most probably have ios sdk 14.0 or later installed (tested on Big Sur) +# if you don't set a deployment target it will be set the way you only get 64-bit builds +#if(NOT DEFINED DEPLOYMENT_TARGET AND XCODE_VERSION_INT VERSION_GREATER 12.0) +# Temporarily fix the arm64 issues in CMake install-combined by excluding arm64 for simulator builds (needed for Apple Silicon...) +# set(CMAKE_XCODE_ATTRIBUTE_EXCLUDED_ARCHS[sdk=iphonesimulator*] "arm64") +#endif() + +# Check if the platform variable is set +if(DEFINED PLATFORM) + # Environment variables are always preserved. + set(ENV{_PLATFORM} "${PLATFORM}") +elseif(DEFINED ENV{_PLATFORM}) + set(PLATFORM "$ENV{_PLATFORM}") +elseif(NOT DEFINED PLATFORM) + message(FATAL_ERROR "PLATFORM argument not set. Bailing configure since I don't know what target you want to build for!") +endif () + +if(PLATFORM MATCHES ".*COMBINED" AND NOT CMAKE_GENERATOR MATCHES "Xcode") + message(FATAL_ERROR "The combined builds support requires Xcode to be used as a generator via '-G Xcode' command-line argument in CMake") +endif() + +# Safeguard that the platform value is set and is one of the supported values +list(FIND _supported_platforms ${PLATFORM} contains_PLATFORM) +if("${contains_PLATFORM}" EQUAL "-1") + string(REPLACE ";" "\n * " _supported_platforms_formatted "${_supported_platforms}") + message(FATAL_ERROR " Invalid PLATFORM specified! Current value: ${PLATFORM}.\n" + " Supported PLATFORM values: \n * ${_supported_platforms_formatted}") +endif() + +# Check if Apple Silicon is supported +if(PLATFORM MATCHES "^(MAC_ARM64)$|^(MAC_CATALYST_ARM64)$|^(MAC_UNIVERSAL)$|^(MAC_CATALYST_UNIVERSAL)$" AND ${CMAKE_VERSION} VERSION_LESS "3.19.5") + message(FATAL_ERROR "Apple Silicon builds requires a minimum of CMake 3.19.5") +endif() + +# Touch the toolchain variable to suppress the "unused variable" warning. +# This happens if CMake is invoked with the same command line the second time. +if(CMAKE_TOOLCHAIN_FILE) +endif() + +# Fix for PThread library not in path +set(CMAKE_THREAD_LIBS_INIT "-lpthread") +set(CMAKE_HAVE_THREADS_LIBRARY 1) +set(CMAKE_USE_WIN32_THREADS_INIT 0) +set(CMAKE_USE_PTHREADS_INIT 1) + +# Specify named language support defaults. +if(NOT DEFINED NAMED_LANGUAGE_SUPPORT AND ${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.16") + set(NAMED_LANGUAGE_SUPPORT ON) + message(STATUS "[DEFAULTS] Using explicit named language support! E.g., enable_language(CXX) is needed in the project files.") +elseif(NOT DEFINED NAMED_LANGUAGE_SUPPORT AND ${CMAKE_VERSION} VERSION_LESS "3.16") + set(NAMED_LANGUAGE_SUPPORT OFF) + message(STATUS "[DEFAULTS] Disabling explicit named language support. Falling back to legacy behavior.") +elseif(DEFINED NAMED_LANGUAGE_SUPPORT AND ${CMAKE_VERSION} VERSION_LESS "3.16") + message(FATAL_ERROR "CMake named language support for OBJC and OBJCXX was added in CMake 3.16.") +endif() +set(NAMED_LANGUAGE_SUPPORT_INT ${NAMED_LANGUAGE_SUPPORT} CACHE BOOL + "Whether or not to enable explicit named language support" FORCE) + +# Specify the minimum version of the deployment target. +if(NOT DEFINED DEPLOYMENT_TARGET) + if (PLATFORM MATCHES "WATCHOS") + # Unless specified, SDK version 4.0 is used by default as minimum target version (watchOS). + set(DEPLOYMENT_TARGET "6.0") + elseif(PLATFORM STREQUAL "MAC") + # Unless specified, SDK version 10.13 (High Sierra) is used by default as the minimum target version (macos). + set(DEPLOYMENT_TARGET "11.0") + elseif(PLATFORM STREQUAL "VISIONOS" OR PLATFORM STREQUAL "SIMULATOR_VISIONOS" OR PLATFORM STREQUAL "VISIONOSCOMBINED") + # Unless specified, SDK version 1.0 is used by default as minimum target version (visionOS). + set(DEPLOYMENT_TARGET "1.0") + elseif(PLATFORM STREQUAL "MAC_ARM64") + # Unless specified, SDK version 11.0 (Big Sur) is used by default as the minimum target version (macOS on arm). + set(DEPLOYMENT_TARGET "11.0") + elseif(PLATFORM STREQUAL "MAC_UNIVERSAL") + # Unless specified, SDK version 11.0 (Big Sur) is used by default as minimum target version for universal builds. + set(DEPLOYMENT_TARGET "11.0") + elseif(PLATFORM STREQUAL "MAC_CATALYST" OR PLATFORM STREQUAL "MAC_CATALYST_ARM64" OR PLATFORM STREQUAL "MAC_CATALYST_UNIVERSAL") + # Unless specified, SDK version 13.0 is used by default as the minimum target version (mac catalyst minimum requirement). + set(DEPLOYMENT_TARGET "13.1") + else() + # Unless specified, SDK version 11.0 is used by default as the minimum target version (iOS, tvOS). + set(DEPLOYMENT_TARGET "13.0") + endif() + message(STATUS "[DEFAULTS] Using the default min-version since DEPLOYMENT_TARGET not provided!") +elseif(DEFINED DEPLOYMENT_TARGET AND PLATFORM MATCHES "^MAC_CATALYST" AND ${DEPLOYMENT_TARGET} VERSION_LESS "13.1") + message(FATAL_ERROR "Mac Catalyst builds requires a minimum deployment target of 13.1!") +endif() + +# Store the DEPLOYMENT_TARGET in the cache +set(DEPLOYMENT_TARGET "${DEPLOYMENT_TARGET}" CACHE INTERNAL "") + +# Handle the case where we are targeting iOS and a version above 10.3.4 (32-bit support dropped officially) +if(PLATFORM STREQUAL "OS" AND DEPLOYMENT_TARGET VERSION_GREATER_EQUAL 10.3.4) + set(PLATFORM "OS64") + message(STATUS "Targeting minimum SDK version ${DEPLOYMENT_TARGET}. Dropping 32-bit support.") +elseif(PLATFORM STREQUAL "SIMULATOR" AND DEPLOYMENT_TARGET VERSION_GREATER_EQUAL 10.3.4) + set(PLATFORM "SIMULATOR64") + message(STATUS "Targeting minimum SDK version ${DEPLOYMENT_TARGET}. Dropping 32-bit support.") +endif() + +set(PLATFORM_INT "${PLATFORM}") + +if(DEFINED ARCHS) + string(REPLACE ";" "-" ARCHS_SPLIT "${ARCHS}") +endif() + +# Determine the platform name and architectures for use in xcodebuild commands +# from the specified PLATFORM_INT name. +if(PLATFORM_INT STREQUAL "OS") + set(SDK_NAME iphoneos) + if(NOT ARCHS) + set(ARCHS armv7 armv7s arm64) + set(APPLE_TARGET_TRIPLE_INT arm-apple-ios${DEPLOYMENT_TARGET}) + else() + set(APPLE_TARGET_TRIPLE_INT ${ARCHS_SPLIT}-apple-ios${DEPLOYMENT_TARGET}) + endif() +elseif(PLATFORM_INT STREQUAL "OS64") + set(SDK_NAME iphoneos) + if(NOT ARCHS) + if (XCODE_VERSION_INT VERSION_GREATER 10.0) + set(ARCHS arm64) # FIXME: Add arm64e when Apple has fixed the integration issues with it, libarclite_iphoneos.a is currently missing bitcode markers for example + else() + set(ARCHS arm64) + endif() + set(APPLE_TARGET_TRIPLE_INT arm64-apple-ios${DEPLOYMENT_TARGET}) + else() + set(APPLE_TARGET_TRIPLE_INT ${ARCHS_SPLIT}-apple-ios${DEPLOYMENT_TARGET}) + endif() +elseif(PLATFORM_INT STREQUAL "OS64COMBINED") + set(SDK_NAME iphoneos) + if(MODERN_CMAKE) + if(NOT ARCHS) + if (XCODE_VERSION_INT VERSION_GREATER 12.0) + set(ARCHS arm64 x86_64) + set(CMAKE_XCODE_ATTRIBUTE_ARCHS[sdk=iphoneos*] "arm64") + set(CMAKE_XCODE_ATTRIBUTE_ARCHS[sdk=iphonesimulator*] "x86_64 arm64") + set(CMAKE_XCODE_ATTRIBUTE_VALID_ARCHS[sdk=iphoneos*] "arm64") + set(CMAKE_XCODE_ATTRIBUTE_VALID_ARCHS[sdk=iphonesimulator*] "x86_64 arm64") + else() + set(ARCHS arm64 x86_64) + set(CMAKE_XCODE_ATTRIBUTE_ARCHS[sdk=iphoneos*] "arm64") + set(CMAKE_XCODE_ATTRIBUTE_ARCHS[sdk=iphonesimulator*] "x86_64") + set(CMAKE_XCODE_ATTRIBUTE_VALID_ARCHS[sdk=iphoneos*] "arm64") + set(CMAKE_XCODE_ATTRIBUTE_VALID_ARCHS[sdk=iphonesimulator*] "x86_64") + endif() + set(APPLE_TARGET_TRIPLE_INT arm64-x86_64-apple-ios${DEPLOYMENT_TARGET}) + else() + set(APPLE_TARGET_TRIPLE_INT ${ARCHS_SPLIT}-apple-ios${DEPLOYMENT_TARGET}) + endif() + else() + message(FATAL_ERROR "Please make sure that you are running CMake 3.14+ to make the OS64COMBINED setting work") + endif() +elseif(PLATFORM_INT STREQUAL "SIMULATOR64COMBINED") + set(SDK_NAME iphonesimulator) + if(MODERN_CMAKE) + if(NOT ARCHS) + if (XCODE_VERSION_INT VERSION_GREATER 12.0) + set(ARCHS arm64 x86_64) # FIXME: Add arm64e when Apple have fixed the integration issues with it, libarclite_iphoneos.a is currently missing bitcode markers for example + set(CMAKE_XCODE_ATTRIBUTE_ARCHS[sdk=iphoneos*] "") + set(CMAKE_XCODE_ATTRIBUTE_ARCHS[sdk=iphonesimulator*] "x86_64 arm64") + set(CMAKE_XCODE_ATTRIBUTE_VALID_ARCHS[sdk=iphoneos*] "") + set(CMAKE_XCODE_ATTRIBUTE_VALID_ARCHS[sdk=iphonesimulator*] "x86_64 arm64") + else() + set(ARCHS arm64 x86_64) + set(CMAKE_XCODE_ATTRIBUTE_ARCHS[sdk=iphoneos*] "") + set(CMAKE_XCODE_ATTRIBUTE_ARCHS[sdk=iphonesimulator*] "x86_64") + set(CMAKE_XCODE_ATTRIBUTE_VALID_ARCHS[sdk=iphoneos*] "") + set(CMAKE_XCODE_ATTRIBUTE_VALID_ARCHS[sdk=iphonesimulator*] "x86_64") + endif() + set(APPLE_TARGET_TRIPLE_INT aarch64-x86_64-apple-ios${DEPLOYMENT_TARGET}-simulator) + else() + set(APPLE_TARGET_TRIPLE_INT ${ARCHS_SPLIT}-apple-ios${DEPLOYMENT_TARGET}-simulator) + endif() + else() + message(FATAL_ERROR "Please make sure that you are running CMake 3.14+ to make the SIMULATOR64COMBINED setting work") + endif() +elseif(PLATFORM_INT STREQUAL "SIMULATOR") + set(SDK_NAME iphonesimulator) + if(NOT ARCHS) + set(ARCHS i386) + set(APPLE_TARGET_TRIPLE_INT i386-apple-ios${DEPLOYMENT_TARGET}-simulator) + else() + set(APPLE_TARGET_TRIPLE_INT ${ARCHS_SPLIT}-apple-ios${DEPLOYMENT_TARGET}-simulator) + endif() + message(DEPRECATION "SIMULATOR IS DEPRECATED. Consider using SIMULATOR64 instead.") +elseif(PLATFORM_INT STREQUAL "SIMULATOR64") + set(SDK_NAME iphonesimulator) + if(NOT ARCHS) + set(ARCHS x86_64) + set(APPLE_TARGET_TRIPLE_INT x86_64-apple-ios${DEPLOYMENT_TARGET}-simulator) + else() + set(APPLE_TARGET_TRIPLE_INT ${ARCHS_SPLIT}-apple-ios${DEPLOYMENT_TARGET}-simulator) + endif() +elseif(PLATFORM_INT STREQUAL "SIMULATORARM64") + set(SDK_NAME iphonesimulator) + if(NOT ARCHS) + set(ARCHS arm64) + set(APPLE_TARGET_TRIPLE_INT arm64-apple-ios${DEPLOYMENT_TARGET}-simulator) + else() + set(APPLE_TARGET_TRIPLE_INT ${ARCHS_SPLIT}-apple-ios${DEPLOYMENT_TARGET}-simulator) + endif() +elseif(PLATFORM_INT STREQUAL "TVOS") + set(SDK_NAME appletvos) + if(NOT ARCHS) + set(ARCHS arm64) + set(APPLE_TARGET_TRIPLE_INT arm64-apple-tvos${DEPLOYMENT_TARGET}) + else() + set(APPLE_TARGET_TRIPLE_INT ${ARCHS_SPLIT}-apple-tvos${DEPLOYMENT_TARGET}) + endif() +elseif (PLATFORM_INT STREQUAL "TVOSCOMBINED") + set(SDK_NAME appletvos) + if(MODERN_CMAKE) + if(NOT ARCHS) + set(ARCHS arm64 x86_64) + set(APPLE_TARGET_TRIPLE_INT arm64-x86_64-apple-tvos${DEPLOYMENT_TARGET}) + set(CMAKE_XCODE_ATTRIBUTE_ARCHS[sdk=appletvos*] "arm64") + set(CMAKE_XCODE_ATTRIBUTE_ARCHS[sdk=appletvsimulator*] "x86_64 arm64") + set(CMAKE_XCODE_ATTRIBUTE_VALID_ARCHS[sdk=appletvos*] "arm64") + set(CMAKE_XCODE_ATTRIBUTE_VALID_ARCHS[sdk=appletvsimulator*] "x86_64 arm64") + else() + set(APPLE_TARGET_TRIPLE_INT ${ARCHS_SPLIT}-apple-tvos${DEPLOYMENT_TARGET}) + endif() + else() + message(FATAL_ERROR "Please make sure that you are running CMake 3.14+ to make the TVOSCOMBINED setting work") + endif() +elseif(PLATFORM_INT STREQUAL "SIMULATOR_TVOS") + set(SDK_NAME appletvsimulator) + if(NOT ARCHS) + set(ARCHS x86_64) + set(APPLE_TARGET_TRIPLE_INT x86_64-apple-tvos${DEPLOYMENT_TARGET}-simulator) + else() + set(APPLE_TARGET_TRIPLE_INT ${ARCHS_SPLIT}-apple-tvos${DEPLOYMENT_TARGET}-simulator) + endif() +elseif(PLATFORM_INT STREQUAL "SIMULATORARM64_TVOS") + set(SDK_NAME appletvsimulator) + if(NOT ARCHS) + set(ARCHS arm64) + set(APPLE_TARGET_TRIPLE_INT arm64-apple-tvos${DEPLOYMENT_TARGET}-simulator) + else() + set(APPLE_TARGET_TRIPLE_INT ${ARCHS_SPLIT}-apple-tvos${DEPLOYMENT_TARGET}-simulator) + endif() +elseif(PLATFORM_INT STREQUAL "WATCHOS") + set(SDK_NAME watchos) + if(NOT ARCHS) + if (XCODE_VERSION_INT VERSION_GREATER 10.0) + set(ARCHS armv7k arm64_32) + set(APPLE_TARGET_TRIPLE_INT arm64_32-apple-watchos${DEPLOYMENT_TARGET}) + else() + set(ARCHS armv7k) + set(APPLE_TARGET_TRIPLE_INT arm-apple-watchos${DEPLOYMENT_TARGET}) + endif() + else() + set(APPLE_TARGET_TRIPLE_INT ${ARCHS_SPLIT}-apple-watchos${DEPLOYMENT_TARGET}) + endif() +elseif(PLATFORM_INT STREQUAL "WATCHOSCOMBINED") + set(SDK_NAME watchos) + if(MODERN_CMAKE) + if(NOT ARCHS) + if (XCODE_VERSION_INT VERSION_GREATER 10.0) + set(ARCHS armv7k arm64_32 i386) + set(APPLE_TARGET_TRIPLE_INT arm64_32-i386-apple-watchos${DEPLOYMENT_TARGET}) + set(CMAKE_XCODE_ATTRIBUTE_ARCHS[sdk=watchos*] "armv7k arm64_32") + set(CMAKE_XCODE_ATTRIBUTE_ARCHS[sdk=watchsimulator*] "i386") + set(CMAKE_XCODE_ATTRIBUTE_VALID_ARCHS[sdk=watchos*] "armv7k arm64_32") + set(CMAKE_XCODE_ATTRIBUTE_VALID_ARCHS[sdk=watchsimulator*] "i386") + else() + set(ARCHS armv7k i386) + set(APPLE_TARGET_TRIPLE_INT arm-i386-apple-watchos${DEPLOYMENT_TARGET}) + set(CMAKE_XCODE_ATTRIBUTE_ARCHS[sdk=watchos*] "armv7k") + set(CMAKE_XCODE_ATTRIBUTE_ARCHS[sdk=watchsimulator*] "i386") + set(CMAKE_XCODE_ATTRIBUTE_VALID_ARCHS[sdk=watchos*] "armv7k") + set(CMAKE_XCODE_ATTRIBUTE_VALID_ARCHS[sdk=watchsimulator*] "i386") + endif() + else() + set(APPLE_TARGET_TRIPLE_INT ${ARCHS_SPLIT}-apple-watchos${DEPLOYMENT_TARGET}) + endif() + else() + message(FATAL_ERROR "Please make sure that you are running CMake 3.14+ to make the WATCHOSCOMBINED setting work") + endif() +elseif(PLATFORM_INT STREQUAL "SIMULATOR_WATCHOS") + set(SDK_NAME watchsimulator) + if(NOT ARCHS) + set(ARCHS i386) + set(APPLE_TARGET_TRIPLE_INT i386-apple-watchos${DEPLOYMENT_TARGET}-simulator) + else() + set(APPLE_TARGET_TRIPLE_INT ${ARCHS_SPLIT}-apple-watchos${DEPLOYMENT_TARGET}-simulator) + endif() +elseif(PLATFORM_INT STREQUAL "SIMULATORARM64_WATCHOS") + set(SDK_NAME watchsimulator) + if(NOT ARCHS) + set(ARCHS arm64) + set(APPLE_TARGET_TRIPLE_INT arm64-apple-watchos${DEPLOYMENT_TARGET}-simulator) + else() + set(APPLE_TARGET_TRIPLE_INT ${ARCHS_SPLIT}-apple-watchos${DEPLOYMENT_TARGET}-simulator) + endif() +elseif(PLATFORM_INT STREQUAL "SIMULATOR_VISIONOS") + set(SDK_NAME xrsimulator) + if(NOT ARCHS) + set(ARCHS arm64) + set(APPLE_TARGET_TRIPLE_INT arm64-apple-xros${DEPLOYMENT_TARGET}-simulator) + else() + set(APPLE_TARGET_TRIPLE_INT ${ARCHS_SPLIT}-apple-xros${DEPLOYMENT_TARGET}-simulator) + endif() +elseif(PLATFORM_INT STREQUAL "VISIONOS") + set(SDK_NAME xros) + if(NOT ARCHS) + set(ARCHS arm64) + set(APPLE_TARGET_TRIPLE_INT arm64-apple-xros${DEPLOYMENT_TARGET}) + else() + set(APPLE_TARGET_TRIPLE_INT ${ARCHS_SPLIT}-apple-xros${DEPLOYMENT_TARGET}) + endif() +elseif(PLATFORM_INT STREQUAL "VISIONOSCOMBINED") + set(SDK_NAME xros) + if(MODERN_CMAKE) + if(NOT ARCHS) + set(ARCHS arm64) + set(APPLE_TARGET_TRIPLE_INT arm64-apple-xros${DEPLOYMENT_TARGET}) + set(CMAKE_XCODE_ATTRIBUTE_ARCHS[sdk=xros*] "arm64") + set(CMAKE_XCODE_ATTRIBUTE_ARCHS[sdk=xrsimulator*] "arm64") + else() + set(APPLE_TARGET_TRIPLE_INT ${ARCHS_SPLIT}-apple-xros${DEPLOYMENT_TARGET}) + endif() + else() + message(FATAL_ERROR "Please make sure that you are running CMake 3.14+ to make the VISIONOSCOMBINED setting work") + endif() +elseif(PLATFORM_INT STREQUAL "MAC" OR PLATFORM_INT STREQUAL "MAC_CATALYST") + set(SDK_NAME macosx) + if(NOT ARCHS) + set(ARCHS x86_64) + endif() + string(REPLACE ";" "-" ARCHS_SPLIT "${ARCHS}") + if(PLATFORM_INT STREQUAL "MAC") + set(APPLE_TARGET_TRIPLE_INT ${ARCHS_SPLIT}-apple-macosx${DEPLOYMENT_TARGET}) + elseif(PLATFORM_INT STREQUAL "MAC_CATALYST") + set(APPLE_TARGET_TRIPLE_INT ${ARCHS_SPLIT}-apple-ios${DEPLOYMENT_TARGET}-macabi) + endif() +elseif(PLATFORM_INT MATCHES "^(MAC_ARM64)$|^(MAC_CATALYST_ARM64)$") + set(SDK_NAME macosx) + if(NOT ARCHS) + set(ARCHS arm64) + endif() + string(REPLACE ";" "-" ARCHS_SPLIT "${ARCHS}") + if(PLATFORM_INT STREQUAL "MAC_ARM64") + set(APPLE_TARGET_TRIPLE_INT ${ARCHS_SPLIT}-apple-macosx${DEPLOYMENT_TARGET}) + elseif(PLATFORM_INT STREQUAL "MAC_CATALYST_ARM64") + set(APPLE_TARGET_TRIPLE_INT ${ARCHS_SPLIT}-apple-ios${DEPLOYMENT_TARGET}-macabi) + endif() +elseif(PLATFORM_INT STREQUAL "MAC_UNIVERSAL") + set(SDK_NAME macosx) + if(NOT ARCHS) + set(ARCHS "x86_64;arm64") + endif() + string(REPLACE ";" "-" ARCHS_SPLIT "${ARCHS}") + set(APPLE_TARGET_TRIPLE_INT ${ARCHS_SPLIT}-apple-macosx${DEPLOYMENT_TARGET}) +elseif(PLATFORM_INT STREQUAL "MAC_CATALYST_UNIVERSAL") + set(SDK_NAME macosx) + if(NOT ARCHS) + set(ARCHS "x86_64;arm64") + endif() + string(REPLACE ";" "-" ARCHS_SPLIT "${ARCHS}") + set(APPLE_TARGET_TRIPLE_INT ${ARCHS_SPLIT}-apple-ios${DEPLOYMENT_TARGET}-macabi) +else() + message(FATAL_ERROR "Invalid PLATFORM: ${PLATFORM_INT}") +endif() + +string(REPLACE ";" " " ARCHS_SPACED "${ARCHS}") + +if(MODERN_CMAKE AND PLATFORM_INT MATCHES ".*COMBINED" AND NOT CMAKE_GENERATOR MATCHES "Xcode") + message(FATAL_ERROR "The COMBINED options only work with Xcode generator, -G Xcode") +endif() + +if(CMAKE_GENERATOR MATCHES "Xcode" AND PLATFORM_INT MATCHES "^MAC_CATALYST") + set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libc++") + set(CMAKE_XCODE_ATTRIBUTE_SUPPORTED_PLATFORMS "macosx") + set(CMAKE_XCODE_ATTRIBUTE_SUPPORTS_MACCATALYST "YES") + if(NOT DEFINED MACOSX_DEPLOYMENT_TARGET) + set(CMAKE_XCODE_ATTRIBUTE_MACOSX_DEPLOYMENT_TARGET "10.15") + else() + set(CMAKE_XCODE_ATTRIBUTE_MACOSX_DEPLOYMENT_TARGET "${MACOSX_DEPLOYMENT_TARGET}") + endif() +elseif(CMAKE_GENERATOR MATCHES "Xcode") + set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libc++") + set(CMAKE_XCODE_ATTRIBUTE_IPHONEOS_DEPLOYMENT_TARGET "${DEPLOYMENT_TARGET}") + if(NOT PLATFORM_INT MATCHES ".*COMBINED") + set(CMAKE_XCODE_ATTRIBUTE_ARCHS[sdk=${SDK_NAME}*] "${ARCHS_SPACED}") + set(CMAKE_XCODE_ATTRIBUTE_VALID_ARCHS[sdk=${SDK_NAME}*] "${ARCHS_SPACED}") + endif() +endif() + +# If the user did not specify the SDK root to use, then query xcodebuild for it. +if(DEFINED CMAKE_OSX_SYSROOT_INT) + # Environment variables are always preserved. + set(ENV{_CMAKE_OSX_SYSROOT_INT} "${CMAKE_OSX_SYSROOT_INT}") +elseif(DEFINED ENV{_CMAKE_OSX_SYSROOT_INT}) + set(CMAKE_OSX_SYSROOT_INT "$ENV{_CMAKE_OSX_SYSROOT_INT}") +elseif(NOT DEFINED CMAKE_OSX_SYSROOT_INT) + execute_process(COMMAND ${XCODEBUILD_EXECUTABLE} -version -sdk ${SDK_NAME} Path + OUTPUT_VARIABLE CMAKE_OSX_SYSROOT_INT + ERROR_QUIET + OUTPUT_STRIP_TRAILING_WHITESPACE) +endif() + +if (NOT DEFINED CMAKE_OSX_SYSROOT_INT AND NOT DEFINED CMAKE_OSX_SYSROOT) + message(SEND_ERROR "Please make sure that Xcode is installed and that the toolchain" + "is pointing to the correct path. Please run:" + "sudo xcode-select -s /Applications/Xcode.app/Contents/Developer" + "and see if that fixes the problem for you.") + message(FATAL_ERROR "Invalid CMAKE_OSX_SYSROOT: ${CMAKE_OSX_SYSROOT} " + "does not exist.") +elseif(DEFINED CMAKE_OSX_SYSROOT_INT) + set(CMAKE_OSX_SYSROOT_INT "${CMAKE_OSX_SYSROOT_INT}" CACHE INTERNAL "") + # Specify the location or name of the platform SDK to be used in CMAKE_OSX_SYSROOT. + set(CMAKE_OSX_SYSROOT "${CMAKE_OSX_SYSROOT_INT}" CACHE INTERNAL "") +endif() + +# Use bitcode or not +if(NOT DEFINED ENABLE_BITCODE) + message(STATUS "[DEFAULTS] Disabling bitcode support by default. ENABLE_BITCODE not provided for override!") + set(ENABLE_BITCODE OFF) +endif() +set(ENABLE_BITCODE_INT ${ENABLE_BITCODE} CACHE BOOL + "Whether or not to enable bitcode" FORCE) +# Use ARC or not +if(NOT DEFINED ENABLE_ARC) + # Unless specified, enable ARC support by default + set(ENABLE_ARC ON) + message(STATUS "[DEFAULTS] Enabling ARC support by default. ENABLE_ARC not provided!") +endif() +set(ENABLE_ARC_INT ${ENABLE_ARC} CACHE BOOL "Whether or not to enable ARC" FORCE) +# Use hidden visibility or not +if(NOT DEFINED ENABLE_VISIBILITY) + # Unless specified, disable symbols visibility by default + set(ENABLE_VISIBILITY OFF) + message(STATUS "[DEFAULTS] Hiding symbols visibility by default. ENABLE_VISIBILITY not provided!") +endif() +set(ENABLE_VISIBILITY_INT ${ENABLE_VISIBILITY} CACHE BOOL "Whether or not to hide symbols from the dynamic linker (-fvisibility=hidden)" FORCE) +# Set strict compiler checks or not +if(NOT DEFINED ENABLE_STRICT_TRY_COMPILE) + # Unless specified, disable strict try_compile() + set(ENABLE_STRICT_TRY_COMPILE OFF) + message(STATUS "[DEFAULTS] Using NON-strict compiler checks by default. ENABLE_STRICT_TRY_COMPILE not provided!") +endif() +set(ENABLE_STRICT_TRY_COMPILE_INT ${ENABLE_STRICT_TRY_COMPILE} CACHE BOOL + "Whether or not to use strict compiler checks" FORCE) + +# Get the SDK version information. +if(DEFINED SDK_VERSION) + # Environment variables are always preserved. + set(ENV{_SDK_VERSION} "${SDK_VERSION}") +elseif(DEFINED ENV{_SDK_VERSION}) + set(SDK_VERSION "$ENV{_SDK_VERSION}") +elseif(NOT DEFINED SDK_VERSION) + execute_process(COMMAND ${XCODEBUILD_EXECUTABLE} -sdk ${CMAKE_OSX_SYSROOT_INT} -version SDKVersion + OUTPUT_VARIABLE SDK_VERSION + ERROR_QUIET + OUTPUT_STRIP_TRAILING_WHITESPACE) +endif() + +# Find the Developer root for the specific iOS platform being compiled for +# from CMAKE_OSX_SYSROOT. Should be ../../ from SDK specified in +# CMAKE_OSX_SYSROOT. There does not appear to be a direct way to obtain +# this information from xcrun or xcodebuild. +if (NOT DEFINED CMAKE_DEVELOPER_ROOT AND NOT CMAKE_GENERATOR MATCHES "Xcode") + get_filename_component(PLATFORM_SDK_DIR ${CMAKE_OSX_SYSROOT_INT} PATH) + get_filename_component(CMAKE_DEVELOPER_ROOT ${PLATFORM_SDK_DIR} PATH) + if (NOT EXISTS "${CMAKE_DEVELOPER_ROOT}") + message(FATAL_ERROR "Invalid CMAKE_DEVELOPER_ROOT: ${CMAKE_DEVELOPER_ROOT} does not exist.") + endif() +endif() + +# Find the C & C++ compilers for the specified SDK. +if(DEFINED CMAKE_C_COMPILER) + # Environment variables are always preserved. + set(ENV{_CMAKE_C_COMPILER} "${CMAKE_C_COMPILER}") +elseif(DEFINED ENV{_CMAKE_C_COMPILER}) + set(CMAKE_C_COMPILER "$ENV{_CMAKE_C_COMPILER}") + set(CMAKE_ASM_COMPILER ${CMAKE_C_COMPILER}) +elseif(NOT DEFINED CMAKE_C_COMPILER) + execute_process(COMMAND xcrun -sdk ${CMAKE_OSX_SYSROOT_INT} -find clang + OUTPUT_VARIABLE CMAKE_C_COMPILER + ERROR_QUIET + OUTPUT_STRIP_TRAILING_WHITESPACE) + set(CMAKE_ASM_COMPILER ${CMAKE_C_COMPILER}) +endif() +if(DEFINED CMAKE_CXX_COMPILER) + # Environment variables are always preserved. + set(ENV{_CMAKE_CXX_COMPILER} "${CMAKE_CXX_COMPILER}") +elseif(DEFINED ENV{_CMAKE_CXX_COMPILER}) + set(CMAKE_CXX_COMPILER "$ENV{_CMAKE_CXX_COMPILER}") +elseif(NOT DEFINED CMAKE_CXX_COMPILER) + execute_process(COMMAND xcrun -sdk ${CMAKE_OSX_SYSROOT_INT} -find clang++ + OUTPUT_VARIABLE CMAKE_CXX_COMPILER + ERROR_QUIET + OUTPUT_STRIP_TRAILING_WHITESPACE) +endif() +# Find (Apple's) libtool. +if(DEFINED BUILD_LIBTOOL) + # Environment variables are always preserved. + set(ENV{_BUILD_LIBTOOL} "${BUILD_LIBTOOL}") +elseif(DEFINED ENV{_BUILD_LIBTOOL}) + set(BUILD_LIBTOOL "$ENV{_BUILD_LIBTOOL}") +elseif(NOT DEFINED BUILD_LIBTOOL) + execute_process(COMMAND xcrun -sdk ${CMAKE_OSX_SYSROOT_INT} -find libtool + OUTPUT_VARIABLE BUILD_LIBTOOL + ERROR_QUIET + OUTPUT_STRIP_TRAILING_WHITESPACE) +endif() +# Find the toolchain's provided install_name_tool if none is found on the host +if(DEFINED CMAKE_INSTALL_NAME_TOOL) + # Environment variables are always preserved. + set(ENV{_CMAKE_INSTALL_NAME_TOOL} "${CMAKE_INSTALL_NAME_TOOL}") +elseif(DEFINED ENV{_CMAKE_INSTALL_NAME_TOOL}) + set(CMAKE_INSTALL_NAME_TOOL "$ENV{_CMAKE_INSTALL_NAME_TOOL}") +elseif(NOT DEFINED CMAKE_INSTALL_NAME_TOOL) + execute_process(COMMAND xcrun -sdk ${CMAKE_OSX_SYSROOT_INT} -find install_name_tool + OUTPUT_VARIABLE CMAKE_INSTALL_NAME_TOOL_INT + ERROR_QUIET + OUTPUT_STRIP_TRAILING_WHITESPACE) + set(CMAKE_INSTALL_NAME_TOOL ${CMAKE_INSTALL_NAME_TOOL_INT} CACHE INTERNAL "") +endif() + +# Configure libtool to be used instead of ar + ranlib to build static libraries. +# This is required on Xcode 7+, but should also work on previous versions of +# Xcode. +get_property(languages GLOBAL PROPERTY ENABLED_LANGUAGES) +foreach(lang ${languages}) + set(CMAKE_${lang}_CREATE_STATIC_LIBRARY "${BUILD_LIBTOOL} -static -o " CACHE INTERNAL "") +endforeach() + +# CMake 3.14+ support building for iOS, watchOS, and tvOS out of the box. +if(MODERN_CMAKE) + if(SDK_NAME MATCHES "iphone") + set(CMAKE_SYSTEM_NAME iOS) + elseif(SDK_NAME MATCHES "xros") + set(CMAKE_SYSTEM_NAME visionOS) + elseif(SDK_NAME MATCHES "xrsimulator") + set(CMAKE_SYSTEM_NAME visionOS) + elseif(SDK_NAME MATCHES "macosx") + set(CMAKE_SYSTEM_NAME Darwin) + elseif(SDK_NAME MATCHES "appletv") + set(CMAKE_SYSTEM_NAME tvOS) + elseif(SDK_NAME MATCHES "watch") + set(CMAKE_SYSTEM_NAME watchOS) + endif() + # Provide flags for a combined FAT library build on newer CMake versions + if(PLATFORM_INT MATCHES ".*COMBINED") + set(CMAKE_IOS_INSTALL_COMBINED YES) + if(CMAKE_GENERATOR MATCHES "Xcode") + # Set the SDKROOT Xcode properties to a Xcode-friendly value (the SDK_NAME, E.g, iphoneos) + # This way, Xcode will automatically switch between the simulator and device SDK when building. + set(CMAKE_XCODE_ATTRIBUTE_SDKROOT "${SDK_NAME}") + # Force to not build just one ARCH, but all! + set(CMAKE_XCODE_ATTRIBUTE_ONLY_ACTIVE_ARCH "NO") + endif() + endif() +elseif(NOT DEFINED CMAKE_SYSTEM_NAME AND ${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.10") + # Legacy code path prior to CMake 3.14 or fallback if no CMAKE_SYSTEM_NAME specified + set(CMAKE_SYSTEM_NAME iOS) +elseif(NOT DEFINED CMAKE_SYSTEM_NAME) + # Legacy code path before CMake 3.14 or fallback if no CMAKE_SYSTEM_NAME specified + set(CMAKE_SYSTEM_NAME Darwin) +endif() +# Standard settings. +set(CMAKE_SYSTEM_VERSION ${SDK_VERSION} CACHE INTERNAL "") +set(UNIX ON CACHE BOOL "") +set(APPLE ON CACHE BOOL "") +if(PLATFORM STREQUAL "MAC" OR PLATFORM STREQUAL "MAC_ARM64" OR PLATFORM STREQUAL "MAC_UNIVERSAL") + set(IOS OFF CACHE BOOL "") + set(MACOS ON CACHE BOOL "") +elseif(PLATFORM STREQUAL "MAC_CATALYST" OR PLATFORM STREQUAL "MAC_CATALYST_ARM64" OR PLATFORM STREQUAL "MAC_CATALYST_UNIVERSAL") + set(IOS ON CACHE BOOL "") + set(MACOS ON CACHE BOOL "") +elseif(PLATFORM STREQUAL "VISIONOS" OR PLATFORM STREQUAL "SIMULATOR_VISIONOS" OR PLATFORM STREQUAL "VISIONOSCOMBINED") + set(IOS OFF CACHE BOOL "") + set(VISIONOS ON CACHE BOOL "") +else() + set(IOS ON CACHE BOOL "") +endif() +# Set the architectures for which to build. +set(CMAKE_OSX_ARCHITECTURES ${ARCHS} CACHE INTERNAL "") +# Change the type of target generated for try_compile() so it'll work when cross-compiling, weak compiler checks +if(NOT ENABLE_STRICT_TRY_COMPILE_INT) + set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY) +endif() +# All iOS/Darwin specific settings - some may be redundant. +if (NOT DEFINED CMAKE_MACOSX_BUNDLE) + set(CMAKE_MACOSX_BUNDLE YES) +endif() +set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED "NO") +set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED "NO") +set(CMAKE_SHARED_LIBRARY_PREFIX "lib") +set(CMAKE_SHARED_LIBRARY_SUFFIX ".dylib") +set(CMAKE_EXTRA_SHARED_LIBRARY_SUFFIXES ".tbd" ".so") +set(CMAKE_SHARED_MODULE_PREFIX "lib") +set(CMAKE_SHARED_MODULE_SUFFIX ".so") +set(CMAKE_C_COMPILER_ABI ELF) +set(CMAKE_CXX_COMPILER_ABI ELF) +set(CMAKE_C_HAS_ISYSROOT 1) +set(CMAKE_CXX_HAS_ISYSROOT 1) +set(CMAKE_MODULE_EXISTS 1) +set(CMAKE_DL_LIBS "") +set(CMAKE_C_OSX_COMPATIBILITY_VERSION_FLAG "-compatibility_version ") +set(CMAKE_C_OSX_CURRENT_VERSION_FLAG "-current_version ") +set(CMAKE_CXX_OSX_COMPATIBILITY_VERSION_FLAG "${CMAKE_C_OSX_COMPATIBILITY_VERSION_FLAG}") +set(CMAKE_CXX_OSX_CURRENT_VERSION_FLAG "${CMAKE_C_OSX_CURRENT_VERSION_FLAG}") + +if(ARCHS MATCHES "((^|;|, )(arm64|arm64e|x86_64))+") + set(CMAKE_C_SIZEOF_DATA_PTR 8) + set(CMAKE_CXX_SIZEOF_DATA_PTR 8) + if(ARCHS MATCHES "((^|;|, )(arm64|arm64e))+") + set(CMAKE_SYSTEM_PROCESSOR "aarch64") + else() + set(CMAKE_SYSTEM_PROCESSOR "x86_64") + endif() +else() + set(CMAKE_C_SIZEOF_DATA_PTR 4) + set(CMAKE_CXX_SIZEOF_DATA_PTR 4) + set(CMAKE_SYSTEM_PROCESSOR "arm") +endif() + +# Note that only Xcode 7+ supports the newer more specific: +# -m${SDK_NAME}-version-min flags, older versions of Xcode use: +# -m(ios/ios-simulator)-version-min instead. +if(${CMAKE_VERSION} VERSION_LESS "3.11") + if(PLATFORM_INT STREQUAL "OS" OR PLATFORM_INT STREQUAL "OS64") + if(XCODE_VERSION_INT VERSION_LESS 7.0) + set(SDK_NAME_VERSION_FLAGS + "-mios-version-min=${DEPLOYMENT_TARGET}") + else() + # Xcode 7.0+ uses flags we can build directly from SDK_NAME. + set(SDK_NAME_VERSION_FLAGS + "-m${SDK_NAME}-version-min=${DEPLOYMENT_TARGET}") + endif() + elseif(PLATFORM_INT STREQUAL "TVOS") + set(SDK_NAME_VERSION_FLAGS + "-mtvos-version-min=${DEPLOYMENT_TARGET}") + elseif(PLATFORM_INT STREQUAL "SIMULATOR_TVOS") + set(SDK_NAME_VERSION_FLAGS + "-mtvos-simulator-version-min=${DEPLOYMENT_TARGET}") +elseif(PLATFORM_INT STREQUAL "SIMULATORARM64_TVOS") + set(SDK_NAME_VERSION_FLAGS + "-mtvos-simulator-version-min=${DEPLOYMENT_TARGET}") + elseif(PLATFORM_INT STREQUAL "WATCHOS") + set(SDK_NAME_VERSION_FLAGS + "-mwatchos-version-min=${DEPLOYMENT_TARGET}") + elseif(PLATFORM_INT STREQUAL "SIMULATOR_WATCHOS") + set(SDK_NAME_VERSION_FLAGS + "-mwatchos-simulator-version-min=${DEPLOYMENT_TARGET}") + elseif(PLATFORM_INT STREQUAL "SIMULATORARM64_WATCHOS") + set(SDK_NAME_VERSION_FLAGS + "-mwatchos-simulator-version-min=${DEPLOYMENT_TARGET}") + elseif(PLATFORM_INT STREQUAL "MAC") + set(SDK_NAME_VERSION_FLAGS + "-mmacosx-version-min=${DEPLOYMENT_TARGET}") + else() + # SIMULATOR or SIMULATOR64 both use -mios-simulator-version-min. + set(SDK_NAME_VERSION_FLAGS + "-mios-simulator-version-min=${DEPLOYMENT_TARGET}") + endif() +elseif(NOT PLATFORM_INT MATCHES "^MAC_CATALYST") + # Newer versions of CMake sets the version min flags correctly, skip this for Mac Catalyst targets + set(CMAKE_OSX_DEPLOYMENT_TARGET ${DEPLOYMENT_TARGET} CACHE INTERNAL "Minimum OS X deployment version") +endif() + +if(DEFINED APPLE_TARGET_TRIPLE_INT) + set(APPLE_TARGET_TRIPLE ${APPLE_TARGET_TRIPLE_INT} CACHE INTERNAL "") + set(CMAKE_C_COMPILER_TARGET ${APPLE_TARGET_TRIPLE}) + set(CMAKE_CXX_COMPILER_TARGET ${APPLE_TARGET_TRIPLE}) + set(CMAKE_ASM_COMPILER_TARGET ${APPLE_TARGET_TRIPLE}) +endif() + +if(PLATFORM_INT MATCHES "^MAC_CATALYST") + set(C_TARGET_FLAGS "-isystem ${CMAKE_OSX_SYSROOT_INT}/System/iOSSupport/usr/include -iframework ${CMAKE_OSX_SYSROOT_INT}/System/iOSSupport/System/Library/Frameworks") +endif() + +if(ENABLE_BITCODE_INT) + set(BITCODE "-fembed-bitcode") + set(CMAKE_XCODE_ATTRIBUTE_BITCODE_GENERATION_MODE "bitcode") + set(CMAKE_XCODE_ATTRIBUTE_ENABLE_BITCODE "YES") +else() + set(BITCODE "") + set(CMAKE_XCODE_ATTRIBUTE_ENABLE_BITCODE "NO") +endif() + +if(ENABLE_ARC_INT) + set(FOBJC_ARC "-fobjc-arc") + set(CMAKE_XCODE_ATTRIBUTE_CLANG_ENABLE_OBJC_ARC "YES") +else() + set(FOBJC_ARC "-fno-objc-arc") + set(CMAKE_XCODE_ATTRIBUTE_CLANG_ENABLE_OBJC_ARC "NO") +endif() + +if(NAMED_LANGUAGE_SUPPORT_INT) + set(OBJC_VARS "-fobjc-abi-version=2 -DOBJC_OLD_DISPATCH_PROTOTYPES=0") + set(OBJC_LEGACY_VARS "") +else() + set(OBJC_VARS "") + set(OBJC_LEGACY_VARS "-fobjc-abi-version=2 -DOBJC_OLD_DISPATCH_PROTOTYPES=0") +endif() + +if(NOT ENABLE_VISIBILITY_INT) + foreach(lang ${languages}) + set(CMAKE_${lang}_VISIBILITY_PRESET "hidden" CACHE INTERNAL "") + endforeach() + set(CMAKE_XCODE_ATTRIBUTE_GCC_SYMBOLS_PRIVATE_EXTERN "YES") + set(VISIBILITY "-fvisibility=hidden -fvisibility-inlines-hidden") +else() + foreach(lang ${languages}) + set(CMAKE_${lang}_VISIBILITY_PRESET "default" CACHE INTERNAL "") + endforeach() + set(CMAKE_XCODE_ATTRIBUTE_GCC_SYMBOLS_PRIVATE_EXTERN "NO") + set(VISIBILITY "-fvisibility=default") +endif() + +if(DEFINED APPLE_TARGET_TRIPLE) + set(APPLE_TARGET_TRIPLE_FLAG "-target ${APPLE_TARGET_TRIPLE}") +endif() + +#Check if Xcode generator is used since that will handle these flags automagically +if(CMAKE_GENERATOR MATCHES "Xcode") + message(STATUS "Not setting any manual command-line buildflags, since Xcode is selected as the generator. Modifying the Xcode build-settings directly instead.") +else() + set(CMAKE_C_FLAGS "${C_TARGET_FLAGS} ${APPLE_TARGET_TRIPLE_FLAG} ${SDK_NAME_VERSION_FLAGS} ${OBJC_LEGACY_VARS} ${BITCODE} ${VISIBILITY} ${CMAKE_C_FLAGS}" CACHE INTERNAL + "Flags used by the compiler during all C build types.") + set(CMAKE_C_FLAGS_DEBUG "-O0 -g ${CMAKE_C_FLAGS_DEBUG}") + set(CMAKE_C_FLAGS_MINSIZEREL "-DNDEBUG -Os ${CMAKE_C_FLAGS_MINSIZEREL}") + set(CMAKE_C_FLAGS_RELWITHDEBINFO "-DNDEBUG -O2 -g ${CMAKE_C_FLAGS_RELWITHDEBINFO}") + set(CMAKE_C_FLAGS_RELEASE "-DNDEBUG -O3 ${CMAKE_C_FLAGS_RELEASE}") + set(CMAKE_CXX_FLAGS "${C_TARGET_FLAGS} ${APPLE_TARGET_TRIPLE_FLAG} ${SDK_NAME_VERSION_FLAGS} ${OBJC_LEGACY_VARS} ${BITCODE} ${VISIBILITY} ${CMAKE_CXX_FLAGS}" CACHE INTERNAL + "Flags used by the compiler during all CXX build types.") + set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g ${CMAKE_CXX_FLAGS_DEBUG}") + set(CMAKE_CXX_FLAGS_MINSIZEREL "-DNDEBUG -Os ${CMAKE_CXX_FLAGS_MINSIZEREL}") + set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-DNDEBUG -O2 -g ${CMAKE_CXX_FLAGS_RELWITHDEBINFO}") + set(CMAKE_CXX_FLAGS_RELEASE "-DNDEBUG -O3 ${CMAKE_CXX_FLAGS_RELEASE}") + if(NAMED_LANGUAGE_SUPPORT_INT) + set(CMAKE_OBJC_FLAGS "${C_TARGET_FLAGS} ${APPLE_TARGET_TRIPLE_FLAG} ${SDK_NAME_VERSION_FLAGS} ${BITCODE} ${VISIBILITY} ${FOBJC_ARC} ${OBJC_VARS} ${CMAKE_OBJC_FLAGS}" CACHE INTERNAL + "Flags used by the compiler during all OBJC build types.") + set(CMAKE_OBJC_FLAGS_DEBUG "-O0 -g ${CMAKE_OBJC_FLAGS_DEBUG}") + set(CMAKE_OBJC_FLAGS_MINSIZEREL "-DNDEBUG -Os ${CMAKE_OBJC_FLAGS_MINSIZEREL}") + set(CMAKE_OBJC_FLAGS_RELWITHDEBINFO "-DNDEBUG -O2 -g ${CMAKE_OBJC_FLAGS_RELWITHDEBINFO}") + set(CMAKE_OBJC_FLAGS_RELEASE "-DNDEBUG -O3 ${CMAKE_OBJC_FLAGS_RELEASE}") + set(CMAKE_OBJCXX_FLAGS "${C_TARGET_FLAGS} ${APPLE_TARGET_TRIPLE_FLAG} ${SDK_NAME_VERSION_FLAGS} ${BITCODE} ${VISIBILITY} ${FOBJC_ARC} ${OBJC_VARS} ${CMAKE_OBJCXX_FLAGS}" CACHE INTERNAL + "Flags used by the compiler during all OBJCXX build types.") + set(CMAKE_OBJCXX_FLAGS_DEBUG "-O0 -g ${CMAKE_OBJCXX_FLAGS_DEBUG}") + set(CMAKE_OBJCXX_FLAGS_MINSIZEREL "-DNDEBUG -Os ${CMAKE_OBJCXX_FLAGS_MINSIZEREL}") + set(CMAKE_OBJCXX_FLAGS_RELWITHDEBINFO "-DNDEBUG -O2 -g ${CMAKE_OBJCXX_FLAGS_RELWITHDEBINFO}") + set(CMAKE_OBJCXX_FLAGS_RELEASE "-DNDEBUG -O3 ${CMAKE_OBJCXX_FLAGS_RELEASE}") + endif() + set(CMAKE_C_LINK_FLAGS "${C_TARGET_FLAGS} ${SDK_NAME_VERSION_FLAGS} -Wl,-search_paths_first ${CMAKE_C_LINK_FLAGS}" CACHE INTERNAL + "Flags used by the compiler for all C link types.") + set(CMAKE_CXX_LINK_FLAGS "${C_TARGET_FLAGS} ${SDK_NAME_VERSION_FLAGS} -Wl,-search_paths_first ${CMAKE_CXX_LINK_FLAGS}" CACHE INTERNAL + "Flags used by the compiler for all CXX link types.") + if(NAMED_LANGUAGE_SUPPORT_INT) + set(CMAKE_OBJC_LINK_FLAGS "${C_TARGET_FLAGS} ${SDK_NAME_VERSION_FLAGS} -Wl,-search_paths_first ${CMAKE_OBJC_LINK_FLAGS}" CACHE INTERNAL + "Flags used by the compiler for all OBJC link types.") + set(CMAKE_OBJCXX_LINK_FLAGS "${C_TARGET_FLAGS} ${SDK_NAME_VERSION_FLAGS} -Wl,-search_paths_first ${CMAKE_OBJCXX_LINK_FLAGS}" CACHE INTERNAL + "Flags used by the compiler for all OBJCXX link types.") + endif() + set(CMAKE_ASM_FLAGS "${CMAKE_C_FLAGS} -x assembler-with-cpp -arch ${CMAKE_OSX_ARCHITECTURES} ${APPLE_TARGET_TRIPLE_FLAG}" CACHE INTERNAL + "Flags used by the compiler for all ASM build types.") +endif() + +## Print status messages to inform of the current state +message(STATUS "Configuring ${SDK_NAME} build for platform: ${PLATFORM_INT}, architecture(s): ${ARCHS}") +message(STATUS "Using SDK: ${CMAKE_OSX_SYSROOT_INT}") +message(STATUS "Using C compiler: ${CMAKE_C_COMPILER}") +message(STATUS "Using CXX compiler: ${CMAKE_CXX_COMPILER}") +message(STATUS "Using libtool: ${BUILD_LIBTOOL}") +message(STATUS "Using install name tool: ${CMAKE_INSTALL_NAME_TOOL}") +if(DEFINED APPLE_TARGET_TRIPLE) + message(STATUS "Autoconf target triple: ${APPLE_TARGET_TRIPLE}") +endif() +message(STATUS "Using minimum deployment version: ${DEPLOYMENT_TARGET}" + " (SDK version: ${SDK_VERSION})") +if(MODERN_CMAKE) + message(STATUS "Merging integrated CMake 3.14+ iOS,tvOS,watchOS,macOS toolchain(s) with this toolchain!") + if(PLATFORM_INT MATCHES ".*COMBINED") + message(STATUS "Will combine built (static) artifacts into FAT lib...") + endif() +endif() +if(CMAKE_GENERATOR MATCHES "Xcode") + message(STATUS "Using Xcode version: ${XCODE_VERSION_INT}") +endif() +message(STATUS "CMake version: ${CMAKE_VERSION}") +if(DEFINED SDK_NAME_VERSION_FLAGS) + message(STATUS "Using version flags: ${SDK_NAME_VERSION_FLAGS}") +endif() +message(STATUS "Using a data_ptr size of: ${CMAKE_CXX_SIZEOF_DATA_PTR}") +if(ENABLE_BITCODE_INT) + message(STATUS "Bitcode: Enabled") +else() + message(STATUS "Bitcode: Disabled") +endif() + +if(ENABLE_ARC_INT) + message(STATUS "ARC: Enabled") +else() + message(STATUS "ARC: Disabled") +endif() + +if(ENABLE_VISIBILITY_INT) + message(STATUS "Hiding symbols: Disabled") +else() + message(STATUS "Hiding symbols: Enabled") +endif() + +# Set global properties +set_property(GLOBAL PROPERTY PLATFORM "${PLATFORM}") +set_property(GLOBAL PROPERTY APPLE_TARGET_TRIPLE "${APPLE_TARGET_TRIPLE_INT}") +set_property(GLOBAL PROPERTY SDK_VERSION "${SDK_VERSION}") +set_property(GLOBAL PROPERTY XCODE_VERSION "${XCODE_VERSION_INT}") +set_property(GLOBAL PROPERTY OSX_ARCHITECTURES "${CMAKE_OSX_ARCHITECTURES}") + +# Export configurable variables for the try_compile() command. +set(CMAKE_TRY_COMPILE_PLATFORM_VARIABLES + PLATFORM + XCODE_VERSION_INT + SDK_VERSION + NAMED_LANGUAGE_SUPPORT + DEPLOYMENT_TARGET + CMAKE_DEVELOPER_ROOT + CMAKE_OSX_SYSROOT_INT + ENABLE_BITCODE + ENABLE_ARC + CMAKE_ASM_COMPILER + CMAKE_C_COMPILER + CMAKE_C_COMPILER_TARGET + CMAKE_CXX_COMPILER + CMAKE_CXX_COMPILER_TARGET + BUILD_LIBTOOL + CMAKE_INSTALL_NAME_TOOL + CMAKE_C_FLAGS + CMAKE_C_DEBUG + CMAKE_C_MINSIZEREL + CMAKE_C_RELWITHDEBINFO + CMAKE_C_RELEASE + CMAKE_CXX_FLAGS + CMAKE_CXX_FLAGS_DEBUG + CMAKE_CXX_FLAGS_MINSIZEREL + CMAKE_CXX_FLAGS_RELWITHDEBINFO + CMAKE_CXX_FLAGS_RELEASE + CMAKE_C_LINK_FLAGS + CMAKE_CXX_LINK_FLAGS + CMAKE_ASM_FLAGS +) + +if(NAMED_LANGUAGE_SUPPORT_INT) + list(APPEND CMAKE_TRY_COMPILE_PLATFORM_VARIABLES + CMAKE_OBJC_FLAGS + CMAKE_OBJC_DEBUG + CMAKE_OBJC_MINSIZEREL + CMAKE_OBJC_RELWITHDEBINFO + CMAKE_OBJC_RELEASE + CMAKE_OBJCXX_FLAGS + CMAKE_OBJCXX_DEBUG + CMAKE_OBJCXX_MINSIZEREL + CMAKE_OBJCXX_RELWITHDEBINFO + CMAKE_OBJCXX_RELEASE + CMAKE_OBJC_LINK_FLAGS + CMAKE_OBJCXX_LINK_FLAGS + ) +endif() + +set(CMAKE_PLATFORM_HAS_INSTALLNAME 1) +set(CMAKE_SHARED_LINKER_FLAGS "-rpath @executable_path/Frameworks -rpath @loader_path/Frameworks") +set(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-dynamiclib -Wl,-headerpad_max_install_names") +set(CMAKE_SHARED_MODULE_CREATE_C_FLAGS "-bundle -Wl,-headerpad_max_install_names") +set(CMAKE_SHARED_MODULE_LOADER_C_FLAG "-Wl,-bundle_loader,") +set(CMAKE_SHARED_MODULE_LOADER_CXX_FLAG "-Wl,-bundle_loader,") +set(CMAKE_FIND_LIBRARY_SUFFIXES ".tbd" ".dylib" ".so" ".a") +set(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-install_name") + +# Set the find root to the SDK developer roots. +# Note: CMAKE_FIND_ROOT_PATH is only useful when cross-compiling. Thus, do not set on macOS builds. +if(NOT PLATFORM_INT MATCHES "^MAC.*$") + list(APPEND CMAKE_FIND_ROOT_PATH "${CMAKE_OSX_SYSROOT_INT}" CACHE INTERNAL "") + set(CMAKE_IGNORE_PATH "/System/Library/Frameworks;/usr/local/lib;/opt/homebrew" CACHE INTERNAL "") +endif() + +# Default to searching for frameworks first. +IF(NOT DEFINED CMAKE_FIND_FRAMEWORK) + set(CMAKE_FIND_FRAMEWORK FIRST) +ENDIF(NOT DEFINED CMAKE_FIND_FRAMEWORK) + +# Set up the default search directories for frameworks. +if(PLATFORM_INT MATCHES "^MAC_CATALYST") + set(CMAKE_FRAMEWORK_PATH + ${CMAKE_DEVELOPER_ROOT}/Library/PrivateFrameworks + ${CMAKE_OSX_SYSROOT_INT}/System/Library/Frameworks + ${CMAKE_OSX_SYSROOT_INT}/System/iOSSupport/System/Library/Frameworks + ${CMAKE_FRAMEWORK_PATH} CACHE INTERNAL "") +else() + set(CMAKE_FRAMEWORK_PATH + ${CMAKE_DEVELOPER_ROOT}/Library/PrivateFrameworks + ${CMAKE_OSX_SYSROOT_INT}/System/Library/Frameworks + ${CMAKE_FRAMEWORK_PATH} CACHE INTERNAL "") +endif() + +# By default, search both the specified iOS SDK and the remainder of the host filesystem. +if(NOT CMAKE_FIND_ROOT_PATH_MODE_PROGRAM) + set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM BOTH CACHE INTERNAL "") +endif() +if(NOT CMAKE_FIND_ROOT_PATH_MODE_LIBRARY) + set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY BOTH CACHE INTERNAL "") +endif() +if(NOT CMAKE_FIND_ROOT_PATH_MODE_INCLUDE) + set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE BOTH CACHE INTERNAL "") +endif() +if(NOT CMAKE_FIND_ROOT_PATH_MODE_PACKAGE) + set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE BOTH CACHE INTERNAL "") +endif() + +# +# Some helper-macros below to simplify and beautify the CMakeFile +# + +# This little macro lets you set any Xcode specific property. +macro(set_xcode_property TARGET XCODE_PROPERTY XCODE_VALUE XCODE_RELVERSION) + set(XCODE_RELVERSION_I "${XCODE_RELVERSION}") + if(XCODE_RELVERSION_I STREQUAL "All") + set_property(TARGET ${TARGET} PROPERTY XCODE_ATTRIBUTE_${XCODE_PROPERTY} "${XCODE_VALUE}") + else() + set_property(TARGET ${TARGET} PROPERTY XCODE_ATTRIBUTE_${XCODE_PROPERTY}[variant=${XCODE_RELVERSION_I}] "${XCODE_VALUE}") + endif() +endmacro(set_xcode_property) + +# This macro lets you find executable programs on the host system. +macro(find_host_package) + set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) + set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY NEVER) + set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE NEVER) + set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE NEVER) + set(_TOOLCHAIN_IOS ${IOS}) + set(IOS OFF) + find_package(${ARGN}) + set(IOS ${_TOOLCHAIN_IOS}) + set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM BOTH) + set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY BOTH) + set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE BOTH) + set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE BOTH) +endmacro(find_host_package) +# gersemi: on diff --git a/cmake/linux.cmake b/cmake/linux.cmake index fae620e0e..f01d75da9 100644 --- a/cmake/linux.cmake +++ b/cmake/linux.cmake @@ -6,17 +6,33 @@ This file contains functions for options and configuration for targeting the Linux platform ]=======================================================================] -function( linux_options ) - # Linux Options + +#[=============================[ Linux Options ]=============================] +function(linux_options) + #[[ Options from SCons + use_llvm : Use the LLVM compiler + Not implemented as compiler selection is managed by CMake. Look to + doc/cmake.rst for examples. + ]] + option(GODOTCPP_USE_STATIC_CPP "Link libgcc and libstdc++ statically for better portability" ON) endfunction() -function( linux_generate TARGET_NAME ) +#[===========================[ Target Generation ]===========================] +function(linux_generate) + set(STATIC_CPP "$") + + target_compile_definitions(godot-cpp PUBLIC LINUX_ENABLED UNIX_ENABLED) - target_compile_definitions( ${TARGET_NAME} - PUBLIC - LINUX_ENABLED - UNIX_ENABLED + # gersemi: off + target_link_options( + godot-cpp + PUBLIC + $<${STATIC_CPP}: + -static-libgcc + -static-libstdc++ + > ) + # gersemi: on - common_compiler_flags( ${TARGET_NAME} ) + common_compiler_flags() endfunction() diff --git a/cmake/macos.cmake b/cmake/macos.cmake index 1bb4dbcfb..33db862d7 100644 --- a/cmake/macos.cmake +++ b/cmake/macos.cmake @@ -5,55 +5,37 @@ MacOS This file contains functions for options and configuration for targeting the MacOS platform +Universal Builds +---------------- + +To build universal binaries, ie targeting both x86_64 and arm64, use +the CMAKE_OSX_ARCHITECTURES variable prior to any project calls. +https://cmake.org/cmake/help/latest/variable/CMAKE_OSX_ARCHITECTURES.html + ]=======================================================================] # Find Requirements -IF(APPLE) - set( CMAKE_OSX_SYSROOT $ENV{SDKROOT} ) - find_library( COCOA_LIBRARY REQUIRED - NAMES Cocoa - PATHS ${CMAKE_OSX_SYSROOT}/System/Library - PATH_SUFFIXES Frameworks - NO_DEFAULT_PATH) -ENDIF (APPLE) - - -function( macos_options ) - # macos options here +if(APPLE) + set(CMAKE_OSX_SYSROOT $ENV{SDKROOT}) +endif(APPLE) + +#[=============================[ MacOS Options ]=============================] +function(macos_options) + #[[ Options from SCons + TODO macos_deployment_target: macOS deployment target + Default: 'default' + + TODO macos_sdk_path: macOS SDK path + Default: '' + + TODO osxcross_sdk: OSXCross SDK version + Default: if has_osxcross(): "darwin16" else None + ]] endfunction() +#[===========================[ Target Generation ]===========================] +function(macos_generate) + target_compile_definitions(godot-cpp PUBLIC MACOS_ENABLED UNIX_ENABLED) -function( macos_generate TARGET_NAME ) - - # OSX_ARCHITECTURES does not support generator expressions. - if( NOT GODOT_ARCH OR GODOT_ARCH STREQUAL universal ) - set( OSX_ARCH "x86_64;arm64" ) - set( SYSTEM_ARCH universal ) - else() - set( OSX_ARCH ${GODOT_ARCH} ) - endif() - - set_target_properties( ${TARGET_NAME} - PROPERTIES - - OSX_ARCHITECTURES "${OSX_ARCH}" - ) - - target_compile_definitions(${TARGET_NAME} - PUBLIC - MACOS_ENABLED - UNIX_ENABLED - ) - - target_link_options( ${TARGET_NAME} - PUBLIC - -Wl,-undefined,dynamic_lookup - ) - - target_link_libraries( ${TARGET_NAME} - INTERFACE - ${COCOA_LIBRARY} - ) - - common_compiler_flags( ${TARGET_NAME} ) + common_compiler_flags() endfunction() diff --git a/cmake/web.cmake b/cmake/web.cmake index b7d6c13aa..819aa89af 100644 --- a/cmake/web.cmake +++ b/cmake/web.cmake @@ -8,35 +8,32 @@ Web platform ]=======================================================================] # Emscripten requires this hack for use of the SHARED option -set( CMAKE_PROJECT_godot-cpp_INCLUDE cmake/emsdkHack.cmake ) +set(CMAKE_PROJECT_godot-cpp_INCLUDE cmake/emsdkHack.cmake) -function( web_options ) - # web options +#[==============================[ Web Options ]==============================] +function(web_options) endfunction() +#[===========================[ Target Generation ]===========================] +function(web_generate) + target_compile_definitions(godot-cpp PUBLIC WEB_ENABLED UNIX_ENABLED) -function( web_generate TARGET_NAME ) - - target_compile_definitions(${TARGET_NAME} - PUBLIC - WEB_ENABLED - UNIX_ENABLED - ) - - target_compile_options( ${TARGET_NAME} - PUBLIC + target_compile_options( + godot-cpp + PUBLIC # -sSIDE_MODULE -sSUPPORT_LONGJMP=wasm - -fno-exceptions + $<${THREADS_ENABLED}:-sUSE_PTHREADS=1> ) - target_link_options( ${TARGET_NAME} - INTERFACE + target_link_options( + godot-cpp + INTERFACE # -sWASM_BIGINT -sSUPPORT_LONGJMP=wasm -fvisibility=hidden -shared ) - common_compiler_flags( ${TARGET_NAME} ) + common_compiler_flags() endfunction() diff --git a/cmake/windows.cmake b/cmake/windows.cmake index bf17f74f9..75ae4707e 100644 --- a/cmake/windows.cmake +++ b/cmake/windows.cmake @@ -1,47 +1,104 @@ #[=======================================================================[.rst: Windows ------- - This file contains functions for options and configuration for targeting the Windows platform +Because this file is included into the top level CMakelists.txt before the +project directive, it means that + +* ``CMAKE_CURRENT_SOURCE_DIR`` is the location of godot-cpp's CMakeLists.txt +* ``CMAKE_SOURCE_DIR`` is the location where any prior ``project(...)`` + directive was + +MSVC Runtime Selection +---------------------- + +There are two main ways to set the msvc runtime library; +Using ``target_compile_options()`` to add the flags +or using the ``CMAKE_MSVC_RUNTIME_LIBRARY`` property_ abstraction, introduced +in CMake version 3.15 with the policy CMP0091_ to remove the flags from +``CMAKE__FLAGS_``. + +Default: ``CMAKE_MSVC_RUNTIME_LIBRARY="MultiThreaded$<$:Debug>DLL"`` + +This initializes each target's ``MSVC_RUNTIME_LIBRARY`` property at the time of +target creation. + +it is stated in the msvc_ documentation that: "All modules passed to a given +invocation of the linker must have been compiled with the same runtime library +compiler option (/MD, /MT, /LD)." + +This creates a conundrum for us, the ``CMAKE_MSVC_RUNTIME_LIBRARY`` needs to be +correct at the time the target is created, but we have no control over the +consumers CMake scripts, and the per-target ``MSVC_RUNTIME_LIBRARY`` property +is not transient. + +It has been raised that not using ``CMAKE_MSVC_RUNTIME_LIBRARY`` can also cause +issues_ when a dependency( independent to godot-cpp ) that doesn't set any +runtime flags, which relies purely on the ``CMAKE_MSVC_RUNTIME_LIBRARY`` +variable will very likely not have the correct msvc runtime flags set. + +So we'll set ``CMAKE_MSVC_RUNTIME_LIBRARY`` as CACHE STRING so that it will be +available for consumer target definitions, but also be able to be overridden if +needed. + +Additionally we message consumers notifying them and pointing to this +documentation. + +.. _CMP0091:https://cmake.org/cmake/help/latest/policy/CMP0091.html +.. _property:https://cmake.org/cmake/help/latest/variable/CMAKE_MSVC_RUNTIME_LIBRARY.html +.. https://discourse.cmake.org/t/mt-staticrelease-doesnt-match-value-md-dynamicrelease/5428/4 +.. _msvc: https://learn.microsoft.com/en-us/cpp/build/reference/md-mt-ld-use-run-time-library +.. _issues: https://github.com/godotengine/godot-cpp/issues/1699 + ]=======================================================================] -function( windows_options ) +#[============================[ Windows Options ]============================] +function(windows_options) + #[[ Options from SCons - option( GODOT_USE_STATIC_CPP "Link MinGW/MSVC C++ runtime libraries statically" ON ) + TODO silence_msvc: Silence MSVC's cl/link stdout bloat, redirecting errors to stderr + Default: True - option( GODOT_DEBUG_CRT "Compile with MSVC's debug CRT (/MDd)" OFF ) + These three options will not implemented as compiler selection is managed + by CMake toolchain files. Look to doc/cmake.rst for examples. + use_mingw: Use the MinGW compiler instead of MSVC - only effective on Windows + use_llvm: Use the LLVM compiler (MVSC or MinGW depending on the use_mingw flag + mingw_prefix: MinGW prefix + ]] -endfunction() + option(GODOTCPP_USE_STATIC_CPP "Link MinGW/MSVC C++ runtime libraries statically" ON) + option(GODOTCPP_DEBUG_CRT "Compile with MSVC's debug CRT (/MDd)" OFF) -function( windows_generate TARGET_NAME ) - set( IS_MSVC "$" ) - set( IS_CLANG "$,$>" ) - set( NOT_MSVC "$" ) - set( STATIC_CPP "$") - set( DISABLE_EXCEPTIONS "$") - set( DEBUG_CRT "$" ) - - set_target_properties( ${TARGET_NAME} - PROPERTIES - PDB_OUTPUT_DIRECTORY "$<1:${CMAKE_SOURCE_DIR}/bin>" - INTERFACE_MSVC_RUNTIME_LIBRARY - "$>" + message( + STATUS + "If not already cached, setting CMAKE_MSVC_RUNTIME_LIBRARY.\n" + "\tFor more information please read godot-cpp/cmake/windows.cmake" ) - target_compile_definitions( ${TARGET_NAME} - PUBLIC - WINDOWS_ENABLED - $<${IS_MSVC}: - TYPED_METHOD_BIND - NOMINMAX - > + set(CMAKE_MSVC_RUNTIME_LIBRARY + "MultiThreaded$,DebugDLL,$<$>:DLL>>" + CACHE STRING + "Select the MSVC runtime library for use by compilers targeting the MSVC ABI." ) +endfunction() + +#[===========================[ Target Generation ]===========================] +function(windows_generate) + set(STATIC_CPP "$") - target_link_options( ${TARGET_NAME} - PUBLIC + set_target_properties(godot-cpp PROPERTIES PDB_OUTPUT_DIRECTORY "$<1:${CMAKE_SOURCE_DIR}/bin>") + target_compile_definitions( + godot-cpp + PUBLIC WINDOWS_ENABLED $<${IS_MSVC}: TYPED_METHOD_BIND NOMINMAX > + ) + + # gersemi: off + target_link_options( + godot-cpp + PUBLIC $<${NOT_MSVC}: -Wl,--no-undefined $<${STATIC_CPP}: @@ -53,6 +110,7 @@ function( windows_generate TARGET_NAME ) $<${IS_CLANG}:-lstdc++> ) + # gersemi: on - common_compiler_flags( ${TARGET_NAME} ) + common_compiler_flags() endfunction() diff --git a/doc/cmake.rst b/doc/cmake.rst index d47dadd87..760d45611 100644 --- a/doc/cmake.rst +++ b/doc/cmake.rst @@ -24,56 +24,100 @@ Configuration examples are listed at the bottom of the page. .. _godot-cpp-template: https://github.com/godotengine/godot-cpp-template -Basic walkthrough ------------------ +Debug vs template_debug +----------------------- -.. topic:: Clone the git repository +Something I've seen come up many times is the conflation of a compilation of c++ +source code with debug symbols enabled, and compiling a Godot extension with +debug features enabled. The two concepts are not mutually inclusive. - .. code-block:: +- debug_features + Enables a pre-processor definition to selectively compile code to help + users of a Godot extension with their own project. - git clone https://github.com/godotengine/godot-cpp.git - Cloning into 'godot-cpp'... - ... - cd godot-cpp + debug features are enabled in editor and template_debug builds, which can be specified during the configure phase like so + ``cmake -S . -B cmake-build -DGODOTCPP_TARGET=`` -.. topic:: Out-of-tree build directory +- Debug + Sets compiler flags so that debug symbols are generated to help godot + extension developers debug their extension. - Create a build directory for CMake to put caches and build artifacts in and - change directory to it. This is typically as a sub-directory of the project - root but can be outside the source tree. This is so that generated files do - not clutter up the source tree. + ``Debug`` is the default build type for CMake projects, to select another it depends on the generator used - .. code-block:: + For single configuration generators, add to the configure command: - mkdir cmake-build - cd cmake-build + ``-DCMAKE_BUILD_TYPE=`` -.. topic:: Configure the build + For multi-config generators add to the build command: - CMake doesn't build the code, it generates the files that another tool uses - to build the code. To see the list of generators run ``cmake --help``. The - first phase of which is running through the configuration scripts. + ``--config `` + + where ```` is one of ``Debug``, ``Release``, ``RelWithDebInfo``, ``MinSizeRel`` + + +SCons Deviations +---------------- + +Not everything from SCons can be perfectly representable in CMake, here are +the notable differences. + +- debug_symbols + No longer has an explicit option, and is enabled via Debug-like CMake + build configurations; ``Debug``, ``RelWithDebInfo``. + +- dev_build + Does not define ``NDEBUG`` when disabled, ``NDEBUG`` is set via Release-like + CMake build configurations; ``Release``, ``MinSizeRel``. + +- arch + CMake sets the architecture via the toolchain files, macos universal is controlled vua the ``CMAKE_OSX_ARCHITECTURES`` + property which is copied to targets when they are defined. + +- debug_crt + CMake controls linking to windows runtime libraries by copying the value of ``CMAKE_MSVC_RUNTIME_LIBRARIES`` to targets as they are defined. + godot-cpp will set this variable if it isn't already set. so include it before other dependencies to have the value propagate across the projects. + +Testing Integration +------------------- +The testing target ``godot-cpp-test`` is guarded by ``GODOTCPP_ENABLE_TESTING`` which is off by default. + +To configure and build the godot-cpp project to enable the integration +testing targets the command will look something like: + +.. code-block:: + + # Assuming our current directory is the godot-cpp source root + cmake -S . -B cmake-build -DGODOTCPP_ENABLE_TESTING=YES + cmake --build cmake-build --target godot-cpp-test + +Basic walkthrough +----------------- - Configure and generate Ninja build files. +.. topic:: Clone the git repository .. code-block:: - cmake ../ -G "Ninja" + git clone https://github.com/godotengine/godot-cpp.git + Cloning into 'godot-cpp'... + ... + cd godot-cpp + +.. topic:: Options To list the available options CMake use the ``-L[AH]`` option. ``A`` is for advanced, and ``H`` is for help strings. .. code-block:: - cmake ../ -LH + cmake .. -LH - Options are specified on the command line when configuring + Options are specified on the command line when configuring eg. .. code-block:: - cmake ../ -DGODOT_USE_HOT_RELOAD:BOOL=ON \ - -DGODOT_PRECISION:STRING=double \ + cmake .. -DGODOTCPP_USE_HOT_RELOAD:BOOL=ON \ + -DGODOTCPP_PRECISION:STRING=double \ -DCMAKE_BUILD_TYPE:STRING=Debug Review setting-build-variables_ and build-configurations_ for more information. @@ -85,116 +129,118 @@ Basic walkthrough .. code-block:: - // Path to a custom GDExtension API JSON file (takes precedence over `GODOT_GDEXTENSION_DIR`) ( /path/to/custom_api_file ) - `GODOT_CUSTOM_API_FILE:FILEPATH=` + // Path to a custom GDExtension API JSON file (takes precedence over `GODOTCPP_GDEXTENSION_DIR`) ( /path/to/custom_api_file ) + `GODOTCPP_CUSTOM_API_FILE:FILEPATH=` // Force disabling exception handling code (ON|OFF) - GODOT_DISABLE_EXCEPTIONS:BOOL=ON + GODOTCPP_DISABLE_EXCEPTIONS:BOOL=ON // Path to a custom directory containing GDExtension interface header and API JSON file ( /path/to/gdextension_dir ) - GODOT_GDEXTENSION_DIR:PATH=gdextension - - // Generate a template version of the Node class's get_node. (ON|OFF) - GODOT_GENERATE_TEMPLATE_GET_NODE:BOOL=ON + GODOTCPP_GDEXTENSION_DIR:PATH=gdextension // Set the floating-point precision level (single|double) - GODOT_PRECISION:STRING=single + GODOTCPP_PRECISION:STRING=single - // Symbols visibility on GNU platforms. Use 'auto' to apply the default value. (auto|visible|hidden) - GODOT_SYMBOL_VISIBILITY:STRING=hidden + // Enable the extra accounting required to support hot reload. (ON|OFF) + GODOTCPP_USE_HOT_RELOAD:BOOL= - // Expose headers as SYSTEM. - GODOT_SYSTEM_HEADERS:BOOL=ON +.. topic:: Configure the build - // Enable the extra accounting required to support hot reload. (ON|OFF) - GODOT_USE_HOT_RELOAD:BOOL= + .. code-block:: - // Treat warnings as errors - GODOT_WARNING_AS_ERROR:BOOL=OFF + cmake -S . -B cmake-build -G Ninja + ``-S .`` Specifies the source directory + + ``-B cmake-build`` Specifies the build directory + + ``-G Ninja`` Specifies the Generator + + The source directory in this example is the source code for godot-cpp. + The build directory is so that generated files do not clutter up the source tree. + CMake doesn't build the code, it generates the files that another tool uses + to build the code, in this case Ninja. + To see the list of generators run ``cmake --help``. .. topic:: Compiling - A target and a configuration is required, as the default ``all`` target does - not include anything and when using multi-config generators like ``Ninja - Multi-Config``, ``Visual Studio *`` or ``Xcode`` the build configuration - needs to be specified at build time. Build in Release mode unless you need - debug symbols. + Tell cmake to invoke the build system it generated in the specified directory. + The default target is template_debug and the default build configuration is Debug. .. code-block:: - cmake --build . -t template_debug --config Release + cmake --build cmake-build Examples -------- -Windows and MSVC -~~~~~~~~~~~~~~~~ +Windows and MSVC - Release +~~~~~~~~~~~~~~~~~~~~~~~~~~ So long as CMake is installed from the `CMake Downloads`_ page and in the PATH, and Microsoft Visual Studio is installed with c++ support, CMake will detect the MSVC compiler. -.. _CMake downloads: https://cmake.org/download/ +Note that Visual Studio is a Multi-Config Generator so the build configuration +needs to be specified at build time ie ``--config Release`` -Assuming the current working directory is the godot-cpp project root: +.. _CMake downloads: https://cmake.org/download/ .. code-block:: - mkdir build-msvc - cd build-msvc - cmake ../ - cmake --build . -t godot-cpp-test --config Release + # Assuming our current directory is the godot-cpp source root + cmake -S . -B cmake-build -DGODOTCPP_ENABLE_TESTING=YES + cmake --build cmake-build -t godot-cpp-test --config Release -MSys2/clang64, "Ninja", godot-cpp-test target with debug symbols -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +MSys2/clang64, "Ninja" - Debug +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Assumes the ming-w64-clang-x86_64-toolchain is installed +Note that Ninja is a Single-Config Generator so the build type +needs to be specified at Configure time. + Using the msys2/clang64 shell .. code-block:: - mkdir build-clang - cd build-clang - cmake ../ -G"Ninja" -DCMAKE_BUILD_TYPE:STRING=Debug - cmake --build . -t godot-cpp-test + # Assuming our current directory is the godot-cpp source root + cmake -S . -B cmake-build -G"Ninja" -DGODOTCPP_ENABLE_TESTING=YES -DCMAKE_BUILD_TYPE=Release + cmake --build cmake-build -t godot-cpp-test -MSys2/clang64, "Ninja Multi-Config", godot-cpp-test target with GODOT_DEV_BUILD -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +MSys2/clang64, "Ninja Multi-Config" - dev_build, Debug Symbols +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Assumes the ming-w64-clang-x86_64-toolchain is installed +This time we are choosing the 'Ninja Multi-Config' generator, so the build +type is specified at build time. + Using the msys2/clang64 shell .. code-block:: - mkdir build-clang - cd build-clang - cmake ../ -G"Ninja Multi-Config" -DGODOT_DEV_BUILD:BOOL=ON - cmake --build . -t godot-cpp-test --config Debug + # Assuming our current directory is the godot-cpp source root + cmake -S . -B cmake-build -G"Ninja Multi-Config" -DGODOTCPP_ENABLE_TESTING=YES -DGODOTCPP_DEV_BUILD:BOOL=ON + cmake --build cmake-build -t godot-cpp-test --config Debug -Emscripten for web, template_release target -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Emscripten for web platform +~~~~~~~~~~~~~~~~~~~~~~~~~~~ I've only tested this on windows so far. -I cloned, installed, and activating the latest Emscripten tools(for me it was -3.1.69) to ``c:\emsdk`` +I cloned and installed the latest Emscripten tools to ``c:\emsdk`` +At the time of writing that was v3.1.69 -From a terminal running the ``c:\emsdk\emcmdprompt.bat`` puts me in a cmdprompt -context which I dislike, so after that I run pwsh to get my powershell 7.4.5 -context back. +I've been using ``C:\emsdk\emsdk.ps1 activate latest`` to enable the +environment from powershell in the current shell. -using the ``emcmake.bat`` command adds the emscripten toolchain to the CMake -command +The ``emcmake.bat`` utility adds the emscripten toolchain to the CMake command +It can also be added manually, the location is listed inside the emcmake.bat file .. code-block:: - C:\emsdk\emcmdprompt.bat - pwsh - cd - mkdir build-wasm32 - cd build-wasm32 - emcmake.bat cmake ../ - cmake --build . --verbose -t template_release + # Assuming our current directory is the godot-cpp source root + C:\emsdk\emsdk.ps1 activate latest + emcmake.bat cmake -S . -B cmake-build-web -DCMAKE_BUILD_TYPE=Release + cmake --build cmake-build-web Android Cross Compile from Windows ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -207,7 +253,7 @@ own toolchain file as listed in the cmake-toolchains_ documentation Or use the toolchain and scripts provided by the Android SDK and make changes using the ``ANDROID_*`` variables listed there. Where ```` is whatever -ndk version you have installed ( tested with `23.2.8568313`) and ```` +ndk version you have installed (tested with `23.2.8568313`) and ```` is for android sdk platform, (tested with ``android-29``) .. warning:: @@ -220,23 +266,21 @@ is for android sdk platform, (tested with ``android-29``) .. code-block:: - mkdir build-android - cd build-android - cmake ../ --toolchain my_toolchain.cmake - cmake --build . -t template_release + # Assuming our current directory is the godot-cpp source root + cmake -S . -B cmake-build --toolchain my_toolchain.cmake + cmake --build cmake-build -t template_release Doing the equivalent on just using the command line .. code-block:: - mkdir build-android - cd build-android - cmake ../ \ + # Assuming our current directory is the godot-cpp source root + cmake -S . -B cmake-build \ -DCMAKE_SYSTEM_NAME=Android \ -DCMAKE_SYSTEM_VERSION= \ -DCMAKE_ANDROID_ARCH_ABI= \ -DCMAKE_ANDROID_NDK=/path/to/android-ndk - cmake --build . -t template_release + cmake --build cmake-build .. topic:: Using the toolchain file from the Android SDK @@ -244,21 +288,19 @@ is for android sdk platform, (tested with ``android-29``) .. code-block:: - mkdir build-android - cd build-android - cmake ../ --toolchain $ANDROID_HOME/ndk//build/cmake/android.toolchain.cmake - cmake --build . -t template_release + # Assuming our current directory is the godot-cpp source root + cmake -S . -B cmake-build --toolchain $ANDROID_HOME/ndk//build/cmake/android.toolchain.cmake + cmake --build cmake-build Specify Android platform and ABI .. code-block:: - mkdir build-android - cd build-android - cmake ../ --toolchain $ANDROID_HOME/ndk//build/cmake/android.toolchain.cmake \ - -DANDROID_PLATFORM:STRING=android-29 \ - -DANDROID_ABI:STRING=armeabi-v7a - cmake --build . -t template_release + # Assuming our current directory is the godot-cpp source root + cmake -S . -B cmake-build --toolchain $ANDROID_HOME/ndk//build/cmake/android.toolchain.cmake \ + -DANDROID_PLATFORM:STRING=android-29 \ + -DANDROID_ABI:STRING=armeabi-v7a + cmake --build cmake-build Toolchains @@ -266,22 +308,9 @@ Toolchains This section attempts to list the host and target combinations that have been at tested. -Info on cross compiling triplets indicates that the naming is a little more -freeform that expected, and tailored to its use case. Triplets tend to have the -format ``[sub][-vendor][-OS][-env]`` - -* `osdev.org `_ -* `stack overflow `_ -* `LLVM `_ -* `clang target triple `_ -* `vcpkg `_ -* `wasm32-unknown-emscripten `_ - Linux Host ~~~~~~~~~~ -:Target: x86_64-linux - Macos Host ~~~~~~~~~~ @@ -289,43 +318,36 @@ Macos Host :OS Name: Sequoia 15.0.1 :Processor: Apple M2 +* AppleClang + Windows Host ~~~~~~~~~~~~ -:OS Name: Microsoft Windows 11 Home, 10.0.22631 N/A Build 22631 +:OS Name: Windows 11 :Processor: AMD Ryzen 7 6800HS Creator Edition -`Microsoft Visual Studio 17 2022 `_ - :Target: x86_64-w64 - -`LLVM `_ - :Target: x86_64-pc-windows-msvc - -`AndroidSDK `_ - armv7-none-linux-androideabi16 - -`Emscripten `_ - :Compiler: Emscripten - :Target: wasm32-unknown-emscripten - -`MinGW-w64 `_ based toolchains - `MSYS2 `_ - Necessary reading about MSYS2 `environments `_ +* `Microsoft Visual Studio 17 2022 `_ +* `LLVM `_ +* `LLVM-MinGW `_ - ucrt64 - :Compiler: gcc version 14.2.0 (Rev1, Built by MSYS2 project) - :Target: x86_64-w64-mingw32 + * aarch64-w64-mingw32 + * armv7-w64-mingw32 + * i686-w64-mingw32 + * x86_64-w64-mingw32 - clang64 - :Compiler: clang version 18.1.8 - :Target: x86_64-w64-windows-gnu +* `AndroidSDK `_ +* `Emscripten `_ +* `MinGW-W64-builds `_ +* `Jetbrains-CLion `_ - `LLVM-MinGW `_ + Jetbrains builtin compiler is just the MingW64 above. - `MinGW-W64-builds `_ - :Compiler: gcc - :Target: x86_64-w64-mingw32-ucrt +* `MSYS2 `_ + Necessary reading about MSYS2 `environments `_ - `Jetbrains-CLion `_ - :Target: x86_64-w64-mingw32-msvcrt + * ucrt64 + * clang64 + * mingw32 + * mingw64 + * clangarm64 diff --git a/doc_source_generator.py b/doc_source_generator.py new file mode 100644 index 000000000..4f6efb1f3 --- /dev/null +++ b/doc_source_generator.py @@ -0,0 +1,55 @@ +#!/usr/bin/env python + +import glob +import os +import zlib + + +def generate_doc_source(dst, source): + g = open(dst, "w", encoding="utf-8") + buf = "" + docbegin = "" + docend = "" + for src in source: + src_path = str(src) + if not src_path.endswith(".xml"): + continue + with open(src_path, "r", encoding="utf-8") as f: + content = f.read() + buf += content + + buf = (docbegin + buf + docend).encode("utf-8") + decomp_size = len(buf) + + # Use maximum zlib compression level to further reduce file size + # (at the cost of initial build times). + buf = zlib.compress(buf, zlib.Z_BEST_COMPRESSION) + + g.write("/* THIS FILE IS GENERATED DO NOT EDIT */\n") + g.write("\n") + g.write("#include \n") + g.write("\n") + + g.write('static const char *_doc_data_hash = "' + str(hash(buf)) + '";\n') + g.write("static const int _doc_data_uncompressed_size = " + str(decomp_size) + ";\n") + g.write("static const int _doc_data_compressed_size = " + str(len(buf)) + ";\n") + g.write("static const unsigned char _doc_data_compressed[] = {\n") + for i in range(len(buf)): + g.write("\t" + str(buf[i]) + ",\n") + g.write("};\n") + g.write("\n") + + g.write( + "static godot::internal::DocDataRegistration _doc_data_registration(_doc_data_hash, _doc_data_uncompressed_size, _doc_data_compressed_size, _doc_data_compressed);\n" + ) + g.write("\n") + + g.close() + + +def scons_generate_doc_source(target, source, env): + generate_doc_source(str(target[0]), source) + + +def generate_doc_source_from_directory(target, directory): + generate_doc_source(target, glob.glob(os.path.join(directory, "*.xml"))) diff --git a/gdextension/extension_api.json b/gdextension/extension_api.json index d85608a4d..d80c52cff 100644 --- a/gdextension/extension_api.json +++ b/gdextension/extension_api.json @@ -3,9 +3,9 @@ "version_major": 4, "version_minor": 4, "version_patch": 0, - "version_status": "dev2", + "version_status": "stable", "version_build": "official", - "version_full_name": "Godot Engine v4.4.dev2.official" + "version_full_name": "Godot Engine v4.4.stable.official" }, "builtin_class_sizes": [ { @@ -2925,7 +2925,7 @@ }, { "name": "KEY_MODIFIER_MASK", - "value": 532676608 + "value": 2130706432 }, { "name": "KEY_MASK_CMD_OR_CTRL", @@ -3636,8 +3636,16 @@ "value": 36 }, { - "name": "PROPERTY_HINT_MAX", + "name": "PROPERTY_HINT_TOOL_BUTTON", "value": 39 + }, + { + "name": "PROPERTY_HINT_ONESHOT", + "value": 40 + }, + { + "name": "PROPERTY_HINT_MAX", + "value": 42 } ] }, @@ -3807,6 +3815,10 @@ "name": "METHOD_FLAG_OBJECT_CORE", "value": 64 }, + { + "name": "METHOD_FLAG_VIRTUAL_REQUIRED", + "value": 128 + }, { "name": "METHOD_FLAGS_DEFAULT", "value": 1 @@ -8914,16 +8926,6 @@ } ], "constants": [ - { - "name": "AXIS_X", - "type": "int", - "value": "0" - }, - { - "name": "AXIS_Y", - "type": "int", - "value": "1" - }, { "name": "ZERO", "type": "Vector2", @@ -9801,16 +9803,6 @@ } ], "constants": [ - { - "name": "AXIS_X", - "type": "int", - "value": "0" - }, - { - "name": "AXIS_Y", - "type": "int", - "value": "1" - }, { "name": "ZERO", "type": "Vector2i", @@ -10866,21 +10858,6 @@ } ], "constants": [ - { - "name": "AXIS_X", - "type": "int", - "value": "0" - }, - { - "name": "AXIS_Y", - "type": "int", - "value": "1" - }, - { - "name": "AXIS_Z", - "type": "int", - "value": "2" - }, { "name": "ZERO", "type": "Vector3", @@ -11834,21 +11811,6 @@ } ], "constants": [ - { - "name": "AXIS_X", - "type": "int", - "value": "0" - }, - { - "name": "AXIS_Y", - "type": "int", - "value": "1" - }, - { - "name": "AXIS_Z", - "type": "int", - "value": "2" - }, { "name": "ZERO", "type": "Vector3i", @@ -12715,26 +12677,6 @@ } ], "constants": [ - { - "name": "AXIS_X", - "type": "int", - "value": "0" - }, - { - "name": "AXIS_Y", - "type": "int", - "value": "1" - }, - { - "name": "AXIS_Z", - "type": "int", - "value": "2" - }, - { - "name": "AXIS_W", - "type": "int", - "value": "3" - }, { "name": "ZERO", "type": "Vector4", @@ -13371,26 +13313,6 @@ } ], "constants": [ - { - "name": "AXIS_X", - "type": "int", - "value": "0" - }, - { - "name": "AXIS_Y", - "type": "int", - "value": "1" - }, - { - "name": "AXIS_Z", - "type": "int", - "value": "2" - }, - { - "name": "AXIS_W", - "type": "int", - "value": "3" - }, { "name": "ZERO", "type": "Vector4i", @@ -15726,36 +15648,6 @@ } ], "constants": [ - { - "name": "PLANE_NEAR", - "type": "int", - "value": "0" - }, - { - "name": "PLANE_FAR", - "type": "int", - "value": "1" - }, - { - "name": "PLANE_LEFT", - "type": "int", - "value": "2" - }, - { - "name": "PLANE_TOP", - "type": "int", - "value": "3" - }, - { - "name": "PLANE_RIGHT", - "type": "int", - "value": "4" - }, - { - "name": "PLANE_BOTTOM", - "type": "int", - "value": "5" - }, { "name": "IDENTITY", "type": "Projection", @@ -16393,6 +16285,18 @@ { "name": "v", "type": "float" + }, + { + "name": "ok_hsl_h", + "type": "float" + }, + { + "name": "ok_hsl_s", + "type": "float" + }, + { + "name": "ok_hsl_l", + "type": "float" } ], "constants": [ @@ -17547,6 +17451,33 @@ "type": "int" } ] + }, + { + "name": "from_rgba8", + "return_type": "Color", + "is_vararg": false, + "is_const": false, + "is_static": true, + "hash": 3072934735, + "arguments": [ + { + "name": "r8", + "type": "int" + }, + { + "name": "g8", + "type": "int" + }, + { + "name": "b8", + "type": "int" + }, + { + "name": "a8", + "type": "int", + "default_value": "255" + } + ] } ], "constructors": [ @@ -19428,6 +19359,16 @@ "name": ">=", "right_type": "RID", "return_type": "bool" + }, + { + "name": "in", + "right_type": "Dictionary", + "return_type": "bool" + }, + { + "name": "in", + "right_type": "Array", + "return_type": "bool" } ], "methods": [ @@ -19616,6 +19557,14 @@ "is_static": false, "hash": 4144163970 }, + { + "name": "get_unbound_arguments_count", + "return_type": "int", + "is_vararg": false, + "is_const": true, + "is_static": false, + "hash": 3173160232 + }, { "name": "hash", "return_type": "int", @@ -19851,6 +19800,14 @@ "is_static": false, "hash": 4144163970 }, + { + "name": "has_connections", + "return_type": "bool", + "is_vararg": false, + "is_const": true, + "is_static": false, + "hash": 3918633141 + }, { "name": "emit", "is_vararg": true, @@ -19965,6 +19922,13 @@ } ] }, + { + "name": "sort", + "is_vararg": false, + "is_const": false, + "is_static": false, + "hash": 3218959716 + }, { "name": "merge", "is_vararg": false, @@ -20135,6 +20099,24 @@ } ] }, + { + "name": "set", + "return_type": "bool", + "is_vararg": false, + "is_const": false, + "is_static": false, + "hash": 2175348267, + "arguments": [ + { + "name": "key", + "type": "Variant" + }, + { + "name": "value", + "type": "Variant" + } + ] + }, { "name": "is_typed", "return_type": "bool", @@ -20442,6 +20424,37 @@ } ] }, + { + "name": "get", + "return_type": "Variant", + "is_vararg": false, + "is_const": true, + "is_static": false, + "hash": 708700221, + "arguments": [ + { + "name": "index", + "type": "int" + } + ] + }, + { + "name": "set", + "is_vararg": false, + "is_const": false, + "is_static": false, + "hash": 3798478031, + "arguments": [ + { + "name": "index", + "type": "int" + }, + { + "name": "value", + "type": "Variant" + } + ] + }, { "name": "push_back", "is_vararg": false, @@ -20608,6 +20621,25 @@ } ] }, + { + "name": "find_custom", + "return_type": "int", + "is_vararg": false, + "is_const": true, + "is_static": false, + "hash": 2145562546, + "arguments": [ + { + "name": "method", + "type": "Callable" + }, + { + "name": "from", + "type": "int", + "default_value": "0" + } + ] + }, { "name": "rfind", "return_type": "int", @@ -20627,6 +20659,25 @@ } ] }, + { + "name": "rfind_custom", + "return_type": "int", + "is_vararg": false, + "is_const": true, + "is_static": false, + "hash": 2145562546, + "arguments": [ + { + "name": "method", + "type": "Callable" + }, + { + "name": "from", + "type": "int", + "default_value": "-1" + } + ] + }, { "name": "count", "return_type": "int", @@ -21132,20 +21183,18 @@ ], "methods": [ { - "name": "size", + "name": "get", "return_type": "int", "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3173160232 - }, - { - "name": "is_empty", - "return_type": "bool", - "is_vararg": false, - "is_const": true, - "is_static": false, - "hash": 3918633141 + "hash": 4103005248, + "arguments": [ + { + "name": "index", + "type": "int" + } + ] }, { "name": "set", @@ -21164,6 +21213,22 @@ } ] }, + { + "name": "size", + "return_type": "int", + "is_vararg": false, + "is_const": true, + "is_static": false, + "hash": 3173160232 + }, + { + "name": "is_empty", + "return_type": "bool", + "is_vararg": false, + "is_const": true, + "is_static": false, + "hash": 3918633141 + }, { "name": "push_back", "return_type": "bool", @@ -22023,20 +22088,18 @@ ], "methods": [ { - "name": "size", + "name": "get", "return_type": "int", "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3173160232 - }, - { - "name": "is_empty", - "return_type": "bool", - "is_vararg": false, - "is_const": true, - "is_static": false, - "hash": 3918633141 + "hash": 4103005248, + "arguments": [ + { + "name": "index", + "type": "int" + } + ] }, { "name": "set", @@ -22055,6 +22118,22 @@ } ] }, + { + "name": "size", + "return_type": "int", + "is_vararg": false, + "is_const": true, + "is_static": false, + "hash": 3173160232 + }, + { + "name": "is_empty", + "return_type": "bool", + "is_vararg": false, + "is_const": true, + "is_static": false, + "hash": 3918633141 + }, { "name": "push_back", "return_type": "bool", @@ -22368,20 +22447,18 @@ ], "methods": [ { - "name": "size", + "name": "get", "return_type": "int", "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3173160232 - }, - { - "name": "is_empty", - "return_type": "bool", - "is_vararg": false, - "is_const": true, - "is_static": false, - "hash": 3918633141 + "hash": 4103005248, + "arguments": [ + { + "name": "index", + "type": "int" + } + ] }, { "name": "set", @@ -22400,6 +22477,22 @@ } ] }, + { + "name": "size", + "return_type": "int", + "is_vararg": false, + "is_const": true, + "is_static": false, + "hash": 3173160232 + }, + { + "name": "is_empty", + "return_type": "bool", + "is_vararg": false, + "is_const": true, + "is_static": false, + "hash": 3918633141 + }, { "name": "push_back", "return_type": "bool", @@ -22713,20 +22806,18 @@ ], "methods": [ { - "name": "size", - "return_type": "int", - "is_vararg": false, - "is_const": true, - "is_static": false, - "hash": 3173160232 - }, - { - "name": "is_empty", - "return_type": "bool", + "name": "get", + "return_type": "float", "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3918633141 + "hash": 1401583798, + "arguments": [ + { + "name": "index", + "type": "int" + } + ] }, { "name": "set", @@ -22745,6 +22836,22 @@ } ] }, + { + "name": "size", + "return_type": "int", + "is_vararg": false, + "is_const": true, + "is_static": false, + "hash": 3173160232 + }, + { + "name": "is_empty", + "return_type": "bool", + "is_vararg": false, + "is_const": true, + "is_static": false, + "hash": 3918633141 + }, { "name": "push_back", "return_type": "bool", @@ -23058,20 +23165,18 @@ ], "methods": [ { - "name": "size", - "return_type": "int", - "is_vararg": false, - "is_const": true, - "is_static": false, - "hash": 3173160232 - }, - { - "name": "is_empty", - "return_type": "bool", + "name": "get", + "return_type": "float", "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3918633141 + "hash": 1401583798, + "arguments": [ + { + "name": "index", + "type": "int" + } + ] }, { "name": "set", @@ -23090,6 +23195,22 @@ } ] }, + { + "name": "size", + "return_type": "int", + "is_vararg": false, + "is_const": true, + "is_static": false, + "hash": 3173160232 + }, + { + "name": "is_empty", + "return_type": "bool", + "is_vararg": false, + "is_const": true, + "is_static": false, + "hash": 3918633141 + }, { "name": "push_back", "return_type": "bool", @@ -23403,20 +23524,18 @@ ], "methods": [ { - "name": "size", - "return_type": "int", - "is_vararg": false, - "is_const": true, - "is_static": false, - "hash": 3173160232 - }, - { - "name": "is_empty", - "return_type": "bool", + "name": "get", + "return_type": "String", "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3918633141 + "hash": 2162347432, + "arguments": [ + { + "name": "index", + "type": "int" + } + ] }, { "name": "set", @@ -23435,6 +23554,22 @@ } ] }, + { + "name": "size", + "return_type": "int", + "is_vararg": false, + "is_const": true, + "is_static": false, + "hash": 3173160232 + }, + { + "name": "is_empty", + "return_type": "bool", + "is_vararg": false, + "is_const": true, + "is_static": false, + "hash": 3918633141 + }, { "name": "push_back", "return_type": "bool", @@ -23753,20 +23888,18 @@ ], "methods": [ { - "name": "size", - "return_type": "int", - "is_vararg": false, - "is_const": true, - "is_static": false, - "hash": 3173160232 - }, - { - "name": "is_empty", - "return_type": "bool", + "name": "get", + "return_type": "Vector2", "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3918633141 + "hash": 2609058838, + "arguments": [ + { + "name": "index", + "type": "int" + } + ] }, { "name": "set", @@ -23785,6 +23918,22 @@ } ] }, + { + "name": "size", + "return_type": "int", + "is_vararg": false, + "is_const": true, + "is_static": false, + "hash": 3173160232 + }, + { + "name": "is_empty", + "return_type": "bool", + "is_vararg": false, + "is_const": true, + "is_static": false, + "hash": 3918633141 + }, { "name": "push_back", "return_type": "bool", @@ -24103,20 +24252,18 @@ ], "methods": [ { - "name": "size", - "return_type": "int", - "is_vararg": false, - "is_const": true, - "is_static": false, - "hash": 3173160232 - }, - { - "name": "is_empty", - "return_type": "bool", + "name": "get", + "return_type": "Vector3", "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3918633141 + "hash": 1394941017, + "arguments": [ + { + "name": "index", + "type": "int" + } + ] }, { "name": "set", @@ -24135,6 +24282,22 @@ } ] }, + { + "name": "size", + "return_type": "int", + "is_vararg": false, + "is_const": true, + "is_static": false, + "hash": 3173160232 + }, + { + "name": "is_empty", + "return_type": "bool", + "is_vararg": false, + "is_const": true, + "is_static": false, + "hash": 3918633141 + }, { "name": "push_back", "return_type": "bool", @@ -24448,20 +24611,18 @@ ], "methods": [ { - "name": "size", - "return_type": "int", - "is_vararg": false, - "is_const": true, - "is_static": false, - "hash": 3173160232 - }, - { - "name": "is_empty", - "return_type": "bool", + "name": "get", + "return_type": "Color", "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3918633141 + "hash": 2972831132, + "arguments": [ + { + "name": "index", + "type": "int" + } + ] }, { "name": "set", @@ -24480,6 +24641,22 @@ } ] }, + { + "name": "size", + "return_type": "int", + "is_vararg": false, + "is_const": true, + "is_static": false, + "hash": 3173160232 + }, + { + "name": "is_empty", + "return_type": "bool", + "is_vararg": false, + "is_const": true, + "is_static": false, + "hash": 3918633141 + }, { "name": "push_back", "return_type": "bool", @@ -24793,20 +24970,18 @@ ], "methods": [ { - "name": "size", - "return_type": "int", - "is_vararg": false, - "is_const": true, - "is_static": false, - "hash": 3173160232 - }, - { - "name": "is_empty", - "return_type": "bool", + "name": "get", + "return_type": "Vector4", "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3918633141 + "hash": 1227817084, + "arguments": [ + { + "name": "index", + "type": "int" + } + ] }, { "name": "set", @@ -24825,6 +25000,22 @@ } ] }, + { + "name": "size", + "return_type": "int", + "is_vararg": false, + "is_const": true, + "is_static": false, + "hash": 3173160232 + }, + { + "name": "is_empty", + "return_type": "bool", + "is_vararg": false, + "is_const": true, + "is_static": false, + "hash": 3918633141 + }, { "name": "push_back", "return_type": "bool", @@ -25206,8 +25397,10 @@ "name": "_estimate_cost", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3085491603, "return_value": { "type": "float", "meta": "float" @@ -25229,8 +25422,10 @@ "name": "_compute_cost", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3085491603, "return_value": { "type": "float", "meta": "float" @@ -25716,8 +25911,10 @@ "name": "_estimate_cost", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3085491603, "return_value": { "type": "float", "meta": "float" @@ -25739,8 +25936,10 @@ "name": "_compute_cost", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3085491603, "return_value": { "type": "float", "meta": "float" @@ -26302,8 +26501,10 @@ "name": "_estimate_cost", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 2153177966, "return_value": { "type": "float", "meta": "float" @@ -26323,8 +26524,10 @@ "name": "_compute_cost", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 2153177966, "return_value": { "type": "float", "meta": "float" @@ -27368,7 +27571,10 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 2372066587, + "hash": 3269405555, + "hash_compatibility": [ + 2372066587 + ], "arguments": [ { "name": "name", @@ -27394,7 +27600,10 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 1421762485, + "hash": 3323268493, + "hash_compatibility": [ + 1421762485 + ], "arguments": [ { "name": "name", @@ -27812,7 +28021,10 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 2372066587, + "hash": 3269405555, + "hash_compatibility": [ + 2372066587 + ], "arguments": [ { "name": "name", @@ -27838,7 +28050,10 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 1421762485, + "hash": 3323268493, + "hash_compatibility": [ + 1421762485 + ], "arguments": [ { "name": "name", @@ -29966,6 +30181,174 @@ } ] }, + { + "name": "add_marker", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 4135858297, + "arguments": [ + { + "name": "name", + "type": "StringName" + }, + { + "name": "time", + "type": "float", + "meta": "double" + } + ] + }, + { + "name": "remove_marker", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3304788590, + "arguments": [ + { + "name": "name", + "type": "StringName" + } + ] + }, + { + "name": "has_marker", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 2619796661, + "return_value": { + "type": "bool" + }, + "arguments": [ + { + "name": "name", + "type": "StringName" + } + ] + }, + { + "name": "get_marker_at_time", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 4079494655, + "return_value": { + "type": "StringName" + }, + "arguments": [ + { + "name": "time", + "type": "float", + "meta": "double" + } + ] + }, + { + "name": "get_next_marker", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 4079494655, + "return_value": { + "type": "StringName" + }, + "arguments": [ + { + "name": "time", + "type": "float", + "meta": "double" + } + ] + }, + { + "name": "get_prev_marker", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 4079494655, + "return_value": { + "type": "StringName" + }, + "arguments": [ + { + "name": "time", + "type": "float", + "meta": "double" + } + ] + }, + { + "name": "get_marker_time", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 2349060816, + "return_value": { + "type": "float", + "meta": "double" + }, + "arguments": [ + { + "name": "name", + "type": "StringName" + } + ] + }, + { + "name": "get_marker_names", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1139954409, + "return_value": { + "type": "PackedStringArray" + } + }, + { + "name": "get_marker_color", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3742943038, + "return_value": { + "type": "Color" + }, + "arguments": [ + { + "name": "name", + "type": "StringName" + } + ] + }, + { + "name": "set_marker_color", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 4260178595, + "arguments": [ + { + "name": "name", + "type": "StringName" + }, + { + "name": "color", + "type": "Color" + } + ] + }, { "name": "set_length", "is_const": false, @@ -30072,6 +30455,34 @@ } ] }, + { + "name": "optimize", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3303583852, + "arguments": [ + { + "name": "allowed_velocity_err", + "type": "float", + "meta": "float", + "default_value": "0.01" + }, + { + "name": "allowed_angular_err", + "type": "float", + "meta": "float", + "default_value": "0.01" + }, + { + "name": "precision", + "type": "int", + "meta": "int32", + "default_value": "3" + } + ] + }, { "name": "compress", "is_const": false, @@ -30242,6 +30653,18 @@ "return_value": { "type": "typedarray::StringName" } + }, + { + "name": "get_animation_list_size", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3905245786, + "return_value": { + "type": "int", + "meta": "int32" + } } ], "signals": [ @@ -30350,8 +30773,10 @@ "name": "_post_process_key_value", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 2716908335, "return_value": { "type": "Variant" }, @@ -30726,6 +31151,31 @@ "type": "NodePath" } }, + { + "name": "set_root_motion_local", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 2586408642, + "arguments": [ + { + "name": "enabled", + "type": "bool" + } + ] + }, + { + "name": "is_root_motion_local", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 36873697, + "return_value": { + "type": "bool" + } + }, { "name": "get_root_motion_position", "is_const": true, @@ -30970,6 +31420,12 @@ "setter": "set_root_motion_track", "getter": "get_root_motion_track" }, + { + "type": "bool", + "name": "root_motion_local", + "setter": "set_root_motion_local", + "getter": "is_root_motion_local" + }, { "type": "int", "name": "audio_max_polyphony", @@ -31031,8 +31487,10 @@ "name": "_get_child_nodes", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3102165223, "return_value": { "type": "Dictionary" } @@ -31041,8 +31499,10 @@ "name": "_get_parameter_list", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3995934104, "return_value": { "type": "Array" } @@ -31051,8 +31511,10 @@ "name": "_get_child_by_name", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 625644256, "return_value": { "type": "AnimationNode" }, @@ -31067,8 +31529,10 @@ "name": "_get_parameter_default_value", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 2760726917, "return_value": { "type": "Variant" }, @@ -31083,8 +31547,10 @@ "name": "_is_parameter_read_only", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 2619796661, "return_value": { "type": "bool" }, @@ -31097,10 +31563,12 @@ }, { "name": "_process", - "is_const": true, + "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 2139827523, "return_value": { "type": "float", "meta": "double" @@ -31129,8 +31597,10 @@ "name": "_get_caption", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 201670096, "return_value": { "type": "String" } @@ -31139,8 +31609,10 @@ "name": "_has_filter", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 36873697, "return_value": { "type": "bool" } @@ -31307,6 +31779,29 @@ "type": "bool" } }, + { + "name": "get_processing_animation_tree_instance_id", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3905245786, + "return_value": { + "type": "int", + "meta": "uint64" + } + }, + { + "name": "is_process_testing", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 36873697, + "return_value": { + "type": "bool" + } + }, { "name": "blend_animation", "is_const": false, @@ -31638,6 +32133,31 @@ "type": "enum::AnimationNodeAnimation.PlayMode" } }, + { + "name": "set_advance_on_start", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 2586408642, + "arguments": [ + { + "name": "advance_on_start", + "type": "bool" + } + ] + }, + { + "name": "is_advance_on_start", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 36873697, + "return_value": { + "type": "bool" + } + }, { "name": "set_use_custom_timeline", "is_const": false, @@ -31781,6 +32301,12 @@ "setter": "set_play_mode", "getter": "get_play_mode" }, + { + "type": "bool", + "name": "advance_on_start", + "setter": "set_advance_on_start", + "getter": "is_advance_on_start" + }, { "type": "bool", "name": "use_custom_timeline", @@ -32932,6 +33458,76 @@ } ] }, + { + "name": "AnimationNodeExtension", + "is_refcounted": true, + "is_instantiable": true, + "inherits": "AnimationNode", + "api_type": "core", + "methods": [ + { + "name": "_process_animation_node", + "is_const": false, + "is_static": false, + "is_required": true, + "is_vararg": false, + "is_virtual": true, + "hash": 912931771, + "return_value": { + "type": "PackedFloat32Array" + }, + "arguments": [ + { + "name": "playback_info", + "type": "PackedFloat64Array" + }, + { + "name": "test_only", + "type": "bool" + } + ] + }, + { + "name": "is_looping", + "is_const": false, + "is_vararg": false, + "is_static": true, + "is_virtual": false, + "hash": 2035584311, + "return_value": { + "type": "bool" + }, + "arguments": [ + { + "name": "node_info", + "type": "PackedFloat32Array" + } + ] + }, + { + "name": "get_remaining_time", + "is_const": false, + "is_vararg": false, + "is_static": true, + "is_virtual": false, + "hash": 2851904656, + "return_value": { + "type": "float", + "meta": "double" + }, + "arguments": [ + { + "name": "node_info", + "type": "PackedFloat32Array" + }, + { + "name": "break_loop", + "type": "bool" + } + ] + } + ] + }, { "name": "AnimationNodeOneShot", "is_refcounted": true, @@ -34263,7 +34859,42 @@ "is_refcounted": true, "is_instantiable": true, "inherits": "AnimationNode", - "api_type": "core" + "api_type": "core", + "methods": [ + { + "name": "set_explicit_elapse", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 2586408642, + "arguments": [ + { + "name": "enable", + "type": "bool" + } + ] + }, + { + "name": "is_explicit_elapse", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 36873697, + "return_value": { + "type": "bool" + } + } + ], + "properties": [ + { + "type": "bool", + "name": "explicit_elapse", + "setter": "set_explicit_elapse", + "getter": "is_explicit_elapse" + } + ] }, { "name": "AnimationNodeTransition", @@ -34759,9 +35390,10 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 3697947785, + "hash": 3118260607, "hash_compatibility": [ - 3118260607 + 3697947785, + 2221377757 ], "arguments": [ { @@ -34788,15 +35420,101 @@ } ] }, + { + "name": "play_section_with_markers", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1421431412, + "arguments": [ + { + "name": "name", + "type": "StringName", + "default_value": "&\"\"" + }, + { + "name": "start_marker", + "type": "StringName", + "default_value": "&\"\"" + }, + { + "name": "end_marker", + "type": "StringName", + "default_value": "&\"\"" + }, + { + "name": "custom_blend", + "type": "float", + "meta": "double", + "default_value": "-1" + }, + { + "name": "custom_speed", + "type": "float", + "meta": "float", + "default_value": "1.0" + }, + { + "name": "from_end", + "type": "bool", + "default_value": "false" + } + ] + }, + { + "name": "play_section", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 284774635, + "arguments": [ + { + "name": "name", + "type": "StringName", + "default_value": "&\"\"" + }, + { + "name": "start_time", + "type": "float", + "meta": "double", + "default_value": "-1" + }, + { + "name": "end_time", + "type": "float", + "meta": "double", + "default_value": "-1" + }, + { + "name": "custom_blend", + "type": "float", + "meta": "double", + "default_value": "-1" + }, + { + "name": "custom_speed", + "type": "float", + "meta": "float", + "default_value": "1.0" + }, + { + "name": "from_end", + "type": "bool", + "default_value": "false" + } + ] + }, { "name": "play_backwards", "is_const": false, "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 3890664824, + "hash": 2787282401, "hash_compatibility": [ - 2787282401 + 3890664824 ], "arguments": [ { @@ -34812,13 +35530,80 @@ } ] }, + { + "name": "play_section_with_markers_backwards", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 910195100, + "arguments": [ + { + "name": "name", + "type": "StringName", + "default_value": "&\"\"" + }, + { + "name": "start_marker", + "type": "StringName", + "default_value": "&\"\"" + }, + { + "name": "end_marker", + "type": "StringName", + "default_value": "&\"\"" + }, + { + "name": "custom_blend", + "type": "float", + "meta": "double", + "default_value": "-1" + } + ] + }, + { + "name": "play_section_backwards", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 831955981, + "arguments": [ + { + "name": "name", + "type": "StringName", + "default_value": "&\"\"" + }, + { + "name": "start_time", + "type": "float", + "meta": "double", + "default_value": "-1" + }, + { + "name": "end_time", + "type": "float", + "meta": "double", + "default_value": "-1" + }, + { + "name": "custom_blend", + "type": "float", + "meta": "double", + "default_value": "-1" + } + ] + }, { "name": "play_with_capture", "is_const": false, "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 3180464118, + "hash": 1572969103, + "hash_compatibility": [ + 3180464118 + ], "arguments": [ { "name": "name", @@ -35090,6 +35875,91 @@ "meta": "double" } }, + { + "name": "set_section_with_markers", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 794792241, + "arguments": [ + { + "name": "start_marker", + "type": "StringName", + "default_value": "&\"\"" + }, + { + "name": "end_marker", + "type": "StringName", + "default_value": "&\"\"" + } + ] + }, + { + "name": "set_section", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3749779719, + "arguments": [ + { + "name": "start_time", + "type": "float", + "meta": "double", + "default_value": "-1" + }, + { + "name": "end_time", + "type": "float", + "meta": "double", + "default_value": "-1" + } + ] + }, + { + "name": "reset_section", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3218959716 + }, + { + "name": "get_section_start_time", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1740695150, + "return_value": { + "type": "float", + "meta": "double" + } + }, + { + "name": "get_section_end_time", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1740695150, + "return_value": { + "type": "float", + "meta": "double" + } + }, + { + "name": "has_section", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 36873697, + "return_value": { + "type": "bool" + } + }, { "name": "seek", "is_const": false, @@ -37258,6 +38128,21 @@ "is_virtual": false, "hash": 3218959716 }, + { + "name": "surface_remove", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1286410249, + "arguments": [ + { + "name": "surf_idx", + "type": "int", + "meta": "int32" + } + ] + }, { "name": "surface_update_vertex_region", "is_const": false, @@ -37962,8 +38847,10 @@ "name": "_instantiate", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1659796816, "return_value": { "type": "AudioEffectInstance" } @@ -38003,6 +38890,33 @@ "type": "float", "meta": "float" } + }, + { + "name": "set_volume_linear", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 373806689, + "arguments": [ + { + "name": "volume", + "type": "float", + "meta": "float" + } + ] + }, + { + "name": "get_volume_linear", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1740695150, + "return_value": { + "type": "float", + "meta": "float" + } } ], "properties": [ @@ -38011,6 +38925,12 @@ "name": "volume_db", "setter": "set_volume_db", "getter": "get_volume_db" + }, + { + "type": "float", + "name": "volume_linear", + "setter": "set_volume_linear", + "getter": "get_volume_linear" } ] }, @@ -39765,8 +40685,10 @@ "name": "_process", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1649997291, "arguments": [ { "name": "src_buffer", @@ -39787,8 +40709,10 @@ "name": "_process_silence", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 36873697, "return_value": { "type": "bool" } @@ -41319,6 +42243,45 @@ } ] }, + { + "name": "set_bus_volume_linear", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1602489585, + "arguments": [ + { + "name": "bus_idx", + "type": "int", + "meta": "int32" + }, + { + "name": "volume_linear", + "type": "float", + "meta": "float" + } + ] + }, + { + "name": "get_bus_volume_linear", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 2339986948, + "return_value": { + "type": "float", + "meta": "float" + }, + "arguments": [ + { + "name": "bus_idx", + "type": "int", + "meta": "int32" + } + ] + }, { "name": "set_bus_send", "is_const": false, @@ -41775,6 +42738,29 @@ "meta": "float" } }, + { + "name": "get_input_mix_rate", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1740695150, + "return_value": { + "type": "float", + "meta": "float" + } + }, + { + "name": "get_driver_name", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 201670096, + "return_value": { + "type": "String" + } + }, { "name": "get_output_device_list", "is_const": false, @@ -42014,8 +43000,10 @@ "name": "_instantiate_playback", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3093715447, "return_value": { "type": "AudioStreamPlayback" } @@ -42024,8 +43012,10 @@ "name": "_get_stream_name", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 201670096, "return_value": { "type": "String" } @@ -42034,8 +43024,10 @@ "name": "_get_length", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1740695150, "return_value": { "type": "float", "meta": "double" @@ -42045,8 +43037,10 @@ "name": "_is_monophonic", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 36873697, "return_value": { "type": "bool" } @@ -42055,8 +43049,10 @@ "name": "_get_bpm", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1740695150, "return_value": { "type": "float", "meta": "double" @@ -42066,8 +43062,10 @@ "name": "_get_beat_count", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3905245786, "return_value": { "type": "int", "meta": "int32" @@ -42077,12 +43075,39 @@ "name": "_get_parameter_list", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3995934104, "return_value": { "type": "typedarray::Dictionary" } }, + { + "name": "_has_loop", + "is_const": true, + "is_static": false, + "is_required": false, + "is_vararg": false, + "is_virtual": true, + "hash": 36873697, + "return_value": { + "type": "bool" + } + }, + { + "name": "_get_bar_beats", + "is_const": true, + "is_static": false, + "is_required": false, + "is_vararg": false, + "is_virtual": true, + "hash": 3905245786, + "return_value": { + "type": "int", + "meta": "int32" + } + }, { "name": "get_length", "is_const": true, @@ -42163,6 +43188,30 @@ "is_instantiable": true, "inherits": "AudioStream", "api_type": "core", + "enums": [ + { + "name": "AudioStreamGeneratorMixRate", + "is_bitfield": false, + "values": [ + { + "name": "MIX_RATE_OUTPUT", + "value": 0 + }, + { + "name": "MIX_RATE_INPUT", + "value": 1 + }, + { + "name": "MIX_RATE_CUSTOM", + "value": 2 + }, + { + "name": "MIX_RATE_MAX", + "value": 3 + } + ] + } + ], "methods": [ { "name": "set_mix_rate", @@ -42191,6 +43240,31 @@ "meta": "float" } }, + { + "name": "set_mix_rate_mode", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3354885803, + "arguments": [ + { + "name": "mode", + "type": "enum::AudioStreamGenerator.AudioStreamGeneratorMixRate" + } + ] + }, + { + "name": "get_mix_rate_mode", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3537132591, + "return_value": { + "type": "enum::AudioStreamGenerator.AudioStreamGeneratorMixRate" + } + }, { "name": "set_buffer_length", "is_const": false, @@ -42220,6 +43294,12 @@ } ], "properties": [ + { + "type": "int", + "name": "mix_rate_mode", + "setter": "set_mix_rate_mode", + "getter": "get_mix_rate_mode" + }, { "type": "float", "name": "mix_rate", @@ -42898,17 +43978,17 @@ } ], "properties": [ - { - "type": "int", - "name": "initial_clip", - "setter": "set_initial_clip", - "getter": "get_initial_clip" - }, { "type": "int", "name": "clip_count", "setter": "set_clip_count", "getter": "get_clip_count" + }, + { + "type": "int", + "name": "initial_clip", + "setter": "set_initial_clip", + "getter": "get_initial_clip" } ] }, @@ -42919,6 +43999,40 @@ "inherits": "AudioStream", "api_type": "core", "methods": [ + { + "name": "load_from_buffer", + "is_const": false, + "is_vararg": false, + "is_static": true, + "is_virtual": false, + "hash": 1674970313, + "return_value": { + "type": "AudioStreamMP3" + }, + "arguments": [ + { + "name": "stream_data", + "type": "PackedByteArray" + } + ] + }, + { + "name": "load_from_file", + "is_const": false, + "is_vararg": false, + "is_static": true, + "is_virtual": false, + "hash": 4238362998, + "return_value": { + "type": "AudioStreamMP3" + }, + "arguments": [ + { + "name": "path", + "type": "String" + } + ] + }, { "name": "set_data", "is_const": false, @@ -43143,7 +44257,7 @@ }, "arguments": [ { - "name": "buffer", + "name": "stream_data", "type": "PackedByteArray" } ] @@ -43374,8 +44488,10 @@ "name": "_start", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 373806689, "arguments": [ { "name": "from_pos", @@ -43388,15 +44504,19 @@ "name": "_stop", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, - "is_virtual": true + "is_virtual": true, + "hash": 3218959716 }, { "name": "_is_playing", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 36873697, "return_value": { "type": "bool" } @@ -43405,8 +44525,10 @@ "name": "_get_loop_count", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3905245786, "return_value": { "type": "int", "meta": "int32" @@ -43416,8 +44538,10 @@ "name": "_get_playback_position", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1740695150, "return_value": { "type": "float", "meta": "double" @@ -43427,8 +44551,10 @@ "name": "_seek", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 373806689, "arguments": [ { "name": "position", @@ -43441,8 +44567,10 @@ "name": "_mix", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 925936155, "return_value": { "type": "int", "meta": "int32" @@ -43468,15 +44596,19 @@ "name": "_tag_used_streams", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, - "is_virtual": true + "is_virtual": true, + "hash": 3218959716 }, { "name": "_set_parameter", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3776071444, "arguments": [ { "name": "name", @@ -43492,8 +44624,10 @@ "name": "_get_parameter", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 2760726917, "return_value": { "type": "Variant" }, @@ -43528,6 +44662,104 @@ "return_value": { "type": "AudioSamplePlayback" } + }, + { + "name": "mix_audio", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3341291446, + "return_value": { + "type": "PackedVector2Array" + }, + "arguments": [ + { + "name": "rate_scale", + "type": "float", + "meta": "float" + }, + { + "name": "frames", + "type": "int", + "meta": "int32" + } + ] + }, + { + "name": "start", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1958160172, + "arguments": [ + { + "name": "from_pos", + "type": "float", + "meta": "double", + "default_value": "0.0" + } + ] + }, + { + "name": "seek", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1958160172, + "arguments": [ + { + "name": "time", + "type": "float", + "meta": "double", + "default_value": "0.0" + } + ] + }, + { + "name": "stop", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3218959716 + }, + { + "name": "get_loop_count", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3905245786, + "return_value": { + "type": "int", + "meta": "int32" + } + }, + { + "name": "get_playback_position", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1740695150, + "return_value": { + "type": "float", + "meta": "double" + } + }, + { + "name": "is_playing", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 36873697, + "return_value": { + "type": "bool" + } } ] }, @@ -43566,6 +44798,18 @@ "meta": "int32" } ] + }, + { + "name": "get_current_clip_index", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3905245786, + "return_value": { + "type": "int", + "meta": "int32" + } } ] }, @@ -43732,8 +44976,10 @@ "name": "_mix_resampled", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 50157827, "return_value": { "type": "int", "meta": "int32" @@ -43754,8 +45000,10 @@ "name": "_get_stream_sampling_rate", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1740695150, "return_value": { "type": "float", "meta": "float" @@ -43857,6 +45105,33 @@ "meta": "float" } }, + { + "name": "set_volume_linear", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 373806689, + "arguments": [ + { + "name": "volume_linear", + "type": "float", + "meta": "float" + } + ] + }, + { + "name": "get_volume_linear", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1740695150, + "return_value": { + "type": "float", + "meta": "float" + } + }, { "name": "set_pitch_scale", "is_const": false, @@ -44156,6 +45431,12 @@ "setter": "set_volume_db", "getter": "get_volume_db" }, + { + "type": "float", + "name": "volume_linear", + "setter": "set_volume_linear", + "getter": "get_volume_linear" + }, { "type": "float", "name": "pitch_scale", @@ -44265,6 +45546,33 @@ "meta": "float" } }, + { + "name": "set_volume_linear", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 373806689, + "arguments": [ + { + "name": "volume_linear", + "type": "float", + "meta": "float" + } + ] + }, + { + "name": "get_volume_linear", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1740695150, + "return_value": { + "type": "float", + "meta": "float" + } + }, { "name": "set_pitch_scale", "is_const": false, @@ -44647,6 +45955,12 @@ "setter": "set_volume_db", "getter": "get_volume_db" }, + { + "type": "float", + "name": "volume_linear", + "setter": "set_volume_linear", + "getter": "get_volume_linear" + }, { "type": "float", "name": "pitch_scale", @@ -44816,6 +46130,33 @@ "meta": "float" } }, + { + "name": "set_volume_linear", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 373806689, + "arguments": [ + { + "name": "volume_linear", + "type": "float", + "meta": "float" + } + ] + }, + { + "name": "get_volume_linear", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1740695150, + "return_value": { + "type": "float", + "meta": "float" + } + }, { "name": "set_unit_size", "is_const": false, @@ -45414,6 +46755,12 @@ "setter": "set_volume_db", "getter": "get_volume_db" }, + { + "type": "float", + "name": "volume_linear", + "setter": "set_volume_linear", + "getter": "get_volume_linear" + }, { "type": "float", "name": "unit_size", @@ -46689,6 +48036,50 @@ } ], "methods": [ + { + "name": "load_from_buffer", + "is_const": false, + "is_vararg": false, + "is_static": true, + "is_virtual": false, + "hash": 4266838938, + "return_value": { + "type": "AudioStreamWAV" + }, + "arguments": [ + { + "name": "stream_data", + "type": "PackedByteArray" + }, + { + "name": "options", + "type": "Dictionary", + "default_value": "{}" + } + ] + }, + { + "name": "load_from_file", + "is_const": false, + "is_vararg": false, + "is_static": true, + "is_virtual": false, + "hash": 4015802384, + "return_value": { + "type": "AudioStreamWAV" + }, + "arguments": [ + { + "name": "path", + "type": "String" + }, + { + "name": "options", + "type": "Dictionary", + "default_value": "{}" + } + ] + }, { "name": "set_data", "is_const": false, @@ -47079,15 +48470,19 @@ "name": "_pressed", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, - "is_virtual": true + "is_virtual": true, + "hash": 3218959716 }, { "name": "_toggled", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 2586408642, "arguments": [ { "name": "toggled_on", @@ -52352,6 +53747,21 @@ } ] }, + { + "name": "request_particles_process", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 373806689, + "arguments": [ + { + "name": "process_time", + "type": "float", + "meta": "float" + } + ] + }, { "name": "is_emitting", "is_const": true, @@ -52492,6 +53902,58 @@ "meta": "double" } }, + { + "name": "set_use_fixed_seed", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 2586408642, + "arguments": [ + { + "name": "use_fixed_seed", + "type": "bool" + } + ] + }, + { + "name": "get_use_fixed_seed", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 36873697, + "return_value": { + "type": "bool" + } + }, + { + "name": "set_seed", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1286410249, + "arguments": [ + { + "name": "seed", + "type": "int", + "meta": "uint32" + } + ] + }, + { + "name": "get_seed", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3905245786, + "return_value": { + "type": "int", + "meta": "uint32" + } + }, { "name": "set_draw_order", "is_const": false, @@ -52548,7 +54010,17 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 3218959716 + "hash": 107499316, + "hash_compatibility": [ + 3218959716 + ], + "arguments": [ + { + "name": "keep_seed", + "type": "bool", + "default_value": "false" + } + ] }, { "name": "set_direction", @@ -53106,6 +54578,12 @@ "setter": "set_amount", "getter": "get_amount" }, + { + "type": "Texture2D", + "name": "texture", + "setter": "set_texture", + "getter": "get_texture" + }, { "type": "float", "name": "lifetime", @@ -53142,6 +54620,18 @@ "setter": "set_randomness_ratio", "getter": "get_randomness_ratio" }, + { + "type": "bool", + "name": "use_fixed_seed", + "setter": "set_use_fixed_seed", + "getter": "get_use_fixed_seed" + }, + { + "type": "int", + "name": "seed", + "setter": "set_seed", + "getter": "get_seed" + }, { "type": "float", "name": "lifetime_randomness", @@ -53172,12 +54662,6 @@ "setter": "set_draw_order", "getter": "get_draw_order" }, - { - "type": "Texture2D", - "name": "texture", - "setter": "set_texture", - "getter": "get_texture" - }, { "type": "int", "name": "emission_shape", @@ -54058,13 +55542,101 @@ "type": "Mesh" } }, + { + "name": "set_use_fixed_seed", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 2586408642, + "arguments": [ + { + "name": "use_fixed_seed", + "type": "bool" + } + ] + }, + { + "name": "get_use_fixed_seed", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 36873697, + "return_value": { + "type": "bool" + } + }, + { + "name": "set_seed", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1286410249, + "arguments": [ + { + "name": "seed", + "type": "int", + "meta": "uint32" + } + ] + }, + { + "name": "get_seed", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3905245786, + "return_value": { + "type": "int", + "meta": "uint32" + } + }, { "name": "restart", "is_const": false, "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 3218959716 + "hash": 107499316, + "hash_compatibility": [ + 3218959716 + ], + "arguments": [ + { + "name": "keep_seed", + "type": "bool", + "default_value": "false" + } + ] + }, + { + "name": "request_particles_process", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 373806689, + "arguments": [ + { + "name": "process_time", + "type": "float", + "meta": "float" + } + ] + }, + { + "name": "capture_aabb", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1068685055, + "return_value": { + "type": "AABB" + } }, { "name": "set_direction", @@ -54843,6 +56415,18 @@ "setter": "set_randomness_ratio", "getter": "get_randomness_ratio" }, + { + "type": "bool", + "name": "use_fixed_seed", + "setter": "set_use_fixed_seed", + "getter": "get_use_fixed_seed" + }, + { + "type": "int", + "name": "seed", + "setter": "set_seed", + "getter": "get_seed" + }, { "type": "float", "name": "lifetime_randomness", @@ -55628,7 +57212,7 @@ ], "properties": [ { - "type": "Mesh", + "type": "Mesh,-PlaneMesh,-PointMesh,-QuadMesh,-RibbonTrailMesh", "name": "mesh", "setter": "set_mesh", "getter": "get_mesh" @@ -55960,6 +57544,31 @@ "type": "enum::CSGPolygon3D.PathRotation" } }, + { + "name": "set_path_rotation_accurate", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 2586408642, + "arguments": [ + { + "name": "enable", + "type": "bool" + } + ] + }, + { + "name": "get_path_rotation_accurate", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 36873697, + "return_value": { + "type": "bool" + } + }, { "name": "set_path_local", "is_const": false, @@ -56174,6 +57783,12 @@ "setter": "set_path_rotation", "getter": "get_path_rotation" }, + { + "type": "bool", + "name": "path_rotation_accurate", + "setter": "set_path_rotation_accurate", + "getter": "get_path_rotation_accurate" + }, { "type": "bool", "name": "path_local", @@ -59516,6 +61131,10 @@ { "name": "FEED_YCBCR_SEP", "value": 3 + }, + { + "name": "FEED_EXTERNAL", + "value": 4 } ] }, @@ -59539,6 +61158,27 @@ } ], "methods": [ + { + "name": "_activate_feed", + "is_const": false, + "is_static": false, + "is_required": false, + "is_vararg": false, + "is_virtual": true, + "hash": 2240911060, + "return_value": { + "type": "bool" + } + }, + { + "name": "_deactivate_feed", + "is_const": false, + "is_static": false, + "is_required": false, + "is_vararg": false, + "is_virtual": true, + "hash": 3218959716 + }, { "name": "get_id", "is_const": true, @@ -59587,6 +61227,20 @@ "type": "String" } }, + { + "name": "set_name", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 83702148, + "arguments": [ + { + "name": "name", + "type": "String" + } + ] + }, { "name": "get_position", "is_const": true, @@ -59598,6 +61252,20 @@ "type": "enum::CameraFeed.FeedPosition" } }, + { + "name": "set_position", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 611162623, + "arguments": [ + { + "name": "position", + "type": "enum::CameraFeed.FeedPosition" + } + ] + }, { "name": "get_transform", "is_const": true, @@ -59623,6 +61291,72 @@ } ] }, + { + "name": "set_rgb_image", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 532598488, + "arguments": [ + { + "name": "rgb_image", + "type": "Image" + } + ] + }, + { + "name": "set_ycbcr_image", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 532598488, + "arguments": [ + { + "name": "ycbcr_image", + "type": "Image" + } + ] + }, + { + "name": "set_external", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3937882851, + "arguments": [ + { + "name": "width", + "type": "int", + "meta": "int32" + }, + { + "name": "height", + "type": "int", + "meta": "int32" + } + ] + }, + { + "name": "get_texture_tex_id", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1135699418, + "return_value": { + "type": "int", + "meta": "uint64" + }, + "arguments": [ + { + "name": "feed_image_type", + "type": "enum::CameraServer.FeedImage" + } + ] + }, { "name": "get_datatype", "is_const": true, @@ -59633,6 +61367,47 @@ "return_value": { "type": "enum::CameraFeed.FeedDataType" } + }, + { + "name": "get_formats", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3995934104, + "return_value": { + "type": "Array" + } + }, + { + "name": "set_format", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 31872775, + "return_value": { + "type": "bool" + }, + "arguments": [ + { + "name": "index", + "type": "int", + "meta": "int32" + }, + { + "name": "parameters", + "type": "Dictionary" + } + ] + } + ], + "signals": [ + { + "name": "frame_changed" + }, + { + "name": "format_changed" } ], "properties": [ @@ -59647,6 +61422,11 @@ "name": "feed_transform", "setter": "set_transform", "getter": "get_transform" + }, + { + "type": "Array", + "name": "formats", + "getter": "get_formats" } ] }, @@ -60115,8 +61895,10 @@ "name": "_draw", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, - "is_virtual": true + "is_virtual": true, + "hash": 3218959716 }, { "name": "get_canvas_item", @@ -61686,6 +63468,41 @@ "type": "Material" } }, + { + "name": "set_instance_shader_parameter", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3776071444, + "arguments": [ + { + "name": "name", + "type": "StringName" + }, + { + "name": "value", + "type": "Variant" + } + ] + }, + { + "name": "get_instance_shader_parameter", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 2760726917, + "return_value": { + "type": "Variant" + }, + "arguments": [ + { + "name": "name", + "type": "StringName" + } + ] + }, { "name": "set_use_parent_material", "is_const": false, @@ -61781,7 +63598,7 @@ }, "arguments": [ { - "name": "screen_point", + "name": "viewport_point", "type": "Vector2" } ] @@ -65216,6 +67033,34 @@ "is_instantiable": true, "inherits": "Object", "api_type": "core", + "enums": [ + { + "name": "APIType", + "is_bitfield": false, + "values": [ + { + "name": "API_CORE", + "value": 0 + }, + { + "name": "API_EDITOR", + "value": 1 + }, + { + "name": "API_EXTENSION", + "value": 2 + }, + { + "name": "API_EDITOR_EXTENSION", + "value": 3 + }, + { + "name": "API_NONE", + "value": 4 + } + ] + } + ], "methods": [ { "name": "get_class_list", @@ -65334,6 +67179,23 @@ } ] }, + { + "name": "class_get_api_type", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 2475317043, + "return_value": { + "type": "enum::ClassDB.APIType" + }, + "arguments": [ + { + "name": "class", + "type": "StringName" + } + ] + }, { "name": "class_has_signal", "is_const": true, @@ -65605,7 +67467,7 @@ ] }, { - "name": "class_call_static_method", + "name": "class_call_static", "is_const": false, "is_vararg": true, "is_static": false, @@ -65916,8 +67778,10 @@ "name": "_confirm_code_completion", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 2586408642, "arguments": [ { "name": "replace", @@ -65929,8 +67793,10 @@ "name": "_request_code_completion", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 2586408642, "arguments": [ { "name": "force", @@ -65942,8 +67808,10 @@ "name": "_filter_code_completion_candidates", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 2560709669, "return_value": { "type": "typedarray::Dictionary" }, @@ -67448,6 +69316,31 @@ } ] }, + { + "name": "set_symbol_tooltip_on_hover_enabled", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 2586408642, + "arguments": [ + { + "name": "enable", + "type": "bool" + } + ] + }, + { + "name": "is_symbol_tooltip_on_hover_enabled", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 36873697, + "return_value": { + "type": "bool" + } + }, { "name": "move_lines_up", "is_const": false, @@ -67527,6 +69420,23 @@ "type": "String" } ] + }, + { + "name": "symbol_hovered", + "arguments": [ + { + "name": "symbol", + "type": "String" + }, + { + "name": "line", + "type": "int" + }, + { + "name": "column", + "type": "int" + } + ] } ], "properties": [ @@ -67536,6 +69446,12 @@ "setter": "set_symbol_lookup_on_click_enabled", "getter": "is_symbol_lookup_on_click_enabled" }, + { + "type": "bool", + "name": "symbol_tooltip_on_hover", + "setter": "set_symbol_tooltip_on_hover_enabled", + "getter": "is_symbol_tooltip_on_hover_enabled" + }, { "type": "bool", "name": "line_folding", @@ -68125,8 +70041,10 @@ "name": "_input_event", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1847696837, "arguments": [ { "name": "viewport", @@ -68147,22 +70065,28 @@ "name": "_mouse_enter", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, - "is_virtual": true + "is_virtual": true, + "hash": 3218959716 }, { "name": "_mouse_exit", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, - "is_virtual": true + "is_virtual": true, + "hash": 3218959716 }, { "name": "_mouse_shape_enter", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1286410249, "arguments": [ { "name": "shape_idx", @@ -68175,8 +70099,10 @@ "name": "_mouse_shape_exit", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1286410249, "arguments": [ { "name": "shape_idx", @@ -68860,8 +70786,10 @@ "name": "_input_event", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 2310605070, "arguments": [ { "name": "camera", @@ -68890,15 +70818,19 @@ "name": "_mouse_enter", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, - "is_virtual": true + "is_virtual": true, + "hash": 3218959716 }, { "name": "_mouse_exit", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, - "is_virtual": true + "is_virtual": true, + "hash": 3218959716 }, { "name": "set_collision_layer", @@ -69757,6 +71689,56 @@ "type": "bool" } }, + { + "name": "set_debug_color", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 2920490490, + "arguments": [ + { + "name": "color", + "type": "Color" + } + ] + }, + { + "name": "get_debug_color", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3444240500, + "return_value": { + "type": "Color" + } + }, + { + "name": "set_enable_debug_fill", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 2586408642, + "arguments": [ + { + "name": "enable", + "type": "bool" + } + ] + }, + { + "name": "get_enable_debug_fill", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 36873697, + "return_value": { + "type": "bool" + } + }, { "name": "set_margin", "is_const": false, @@ -69809,6 +71791,18 @@ "name": "margin", "setter": "set_margin", "getter": "get_margin" + }, + { + "type": "Color", + "name": "debug_color", + "setter": "set_debug_color", + "getter": "get_debug_color" + }, + { + "type": "bool", + "name": "debug_fill", + "setter": "set_enable_debug_fill", + "getter": "get_enable_debug_fill" } ] }, @@ -70058,6 +72052,56 @@ "is_static": false, "is_virtual": false, "hash": 3218959716 + }, + { + "name": "set_debug_color", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 2920490490, + "arguments": [ + { + "name": "color", + "type": "Color" + } + ] + }, + { + "name": "get_debug_color", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3444240500, + "return_value": { + "type": "Color" + } + }, + { + "name": "set_enable_debug_fill", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 2586408642, + "arguments": [ + { + "name": "enable", + "type": "bool" + } + ] + }, + { + "name": "get_enable_debug_fill", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 36873697, + "return_value": { + "type": "bool" + } } ], "properties": [ @@ -70072,6 +72116,60 @@ "name": "disabled", "setter": "set_disabled", "getter": "is_disabled" + }, + { + "type": "Color", + "name": "debug_color", + "setter": "set_debug_color", + "getter": "get_debug_color" + }, + { + "type": "bool", + "name": "debug_fill", + "setter": "set_enable_debug_fill", + "getter": "get_enable_debug_fill" + } + ] + }, + { + "name": "ColorPalette", + "is_refcounted": true, + "is_instantiable": true, + "inherits": "Resource", + "api_type": "core", + "methods": [ + { + "name": "set_colors", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3546319833, + "arguments": [ + { + "name": "colors", + "type": "PackedColorArray" + } + ] + }, + { + "name": "get_colors", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1392750486, + "return_value": { + "type": "PackedColorArray" + } + } + ], + "properties": [ + { + "type": "PackedColorArray", + "name": "colors", + "setter": "set_colors", + "getter": "get_colors" } ] }, @@ -70823,8 +72921,10 @@ "name": "_render_callback", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 2153422729, "arguments": [ { "name": "effect_callback_type", @@ -71827,8 +73927,10 @@ "name": "_get_allowed_size_flags_horizontal", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1930428628, "return_value": { "type": "PackedInt32Array" } @@ -71837,8 +73939,10 @@ "name": "_get_allowed_size_flags_vertical", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1930428628, "return_value": { "type": "PackedInt32Array" } @@ -72205,7 +74309,7 @@ "value": 0 }, { - "name": "LAYOUT_DIRECTION_LOCALE", + "name": "LAYOUT_DIRECTION_APPLICATION_LOCALE", "value": 1 }, { @@ -72215,6 +74319,18 @@ { "name": "LAYOUT_DIRECTION_RTL", "value": 3 + }, + { + "name": "LAYOUT_DIRECTION_SYSTEM_LOCALE", + "value": 4 + }, + { + "name": "LAYOUT_DIRECTION_MAX", + "value": 5 + }, + { + "name": "LAYOUT_DIRECTION_LOCALE", + "value": 1 } ] }, @@ -72246,8 +74362,10 @@ "name": "_has_point", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 556197845, "return_value": { "type": "bool" }, @@ -72262,8 +74380,10 @@ "name": "_structured_text_parser", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1292548940, "return_value": { "type": "typedarray::Vector3i" }, @@ -72282,8 +74402,10 @@ "name": "_get_minimum_size", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3341600327, "return_value": { "type": "Vector2" } @@ -72292,8 +74414,10 @@ "name": "_get_tooltip", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3674420000, "return_value": { "type": "String" }, @@ -72308,8 +74432,10 @@ "name": "_get_drag_data", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 2233896889, "return_value": { "type": "Variant" }, @@ -72324,8 +74450,10 @@ "name": "_can_drop_data", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 2603004011, "return_value": { "type": "bool" }, @@ -72344,8 +74472,10 @@ "name": "_drop_data", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3699746064, "arguments": [ { "name": "at_position", @@ -72361,8 +74491,10 @@ "name": "_make_custom_tooltip", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1976279298, "return_value": { "type": "Object" }, @@ -72377,8 +74509,10 @@ "name": "_gui_input", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3754044979, "arguments": [ { "name": "event", @@ -73362,9 +75496,8 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 2336455395, + "hash": 3163973443, "hash_compatibility": [ - 3163973443, 2336455395 ], "return_value": { @@ -73388,9 +75521,8 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 2759935355, + "hash": 604739069, "hash_compatibility": [ - 604739069, 2759935355 ], "return_value": { @@ -73414,9 +75546,8 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 387378635, + "hash": 2826986490, "hash_compatibility": [ - 2826986490, 387378635 ], "return_value": { @@ -73440,9 +75571,8 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 229578101, + "hash": 1327056374, "hash_compatibility": [ - 1327056374, 229578101 ], "return_value": { @@ -73467,9 +75597,8 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 2377051548, + "hash": 2798751242, "hash_compatibility": [ - 2798751242, 2377051548 ], "return_value": { @@ -73493,9 +75622,8 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 229578101, + "hash": 1327056374, "hash_compatibility": [ - 1327056374, 229578101 ], "return_value": { @@ -73622,9 +75750,8 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 1187511791, + "hash": 866386512, "hash_compatibility": [ - 866386512, 1187511791 ], "return_value": { @@ -73648,9 +75775,8 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 1187511791, + "hash": 866386512, "hash_compatibility": [ - 866386512, 1187511791 ], "return_value": { @@ -73674,9 +75800,8 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 1187511791, + "hash": 866386512, "hash_compatibility": [ - 866386512, 1187511791 ], "return_value": { @@ -73700,9 +75825,8 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 1187511791, + "hash": 866386512, "hash_compatibility": [ - 866386512, 1187511791 ], "return_value": { @@ -73726,9 +75850,8 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 1187511791, + "hash": 866386512, "hash_compatibility": [ - 866386512, 1187511791 ], "return_value": { @@ -73752,9 +75875,8 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 1187511791, + "hash": 866386512, "hash_compatibility": [ - 866386512, 1187511791 ], "return_value": { @@ -73868,6 +75990,31 @@ "type": "enum::Control.GrowDirection" } }, + { + "name": "set_tooltip_auto_translate_mode", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 776149714, + "arguments": [ + { + "name": "mode", + "type": "enum::Node.AutoTranslateMode" + } + ] + }, + { + "name": "get_tooltip_auto_translate_mode", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 2498906432, + "return_value": { + "type": "enum::Node.AutoTranslateMode" + } + }, { "name": "set_tooltip_text", "is_const": false, @@ -74416,28 +76563,28 @@ "index": 3 }, { - "type": "int", + "type": "float", "name": "offset_left", "setter": "set_offset", "getter": "get_offset", "index": 0 }, { - "type": "int", + "type": "float", "name": "offset_top", "setter": "set_offset", "getter": "get_offset", "index": 1 }, { - "type": "int", + "type": "float", "name": "offset_right", "setter": "set_offset", "getter": "get_offset", "index": 2 }, { - "type": "int", + "type": "float", "name": "offset_bottom", "setter": "set_offset", "getter": "get_offset", @@ -74533,6 +76680,12 @@ "setter": "set_tooltip_text", "getter": "get_tooltip_text" }, + { + "type": "int", + "name": "tooltip_auto_translate_mode", + "setter": "set_tooltip_auto_translate_mode", + "getter": "get_tooltip_auto_translate_mode" + }, { "type": "NodePath", "name": "focus_neighbor_left", @@ -75507,6 +77660,84 @@ } ] }, + { + "name": "get_value_range", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1740695150, + "return_value": { + "type": "float", + "meta": "float" + } + }, + { + "name": "get_min_domain", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1740695150, + "return_value": { + "type": "float", + "meta": "float" + } + }, + { + "name": "set_min_domain", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 373806689, + "arguments": [ + { + "name": "min", + "type": "float", + "meta": "float" + } + ] + }, + { + "name": "get_max_domain", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1740695150, + "return_value": { + "type": "float", + "meta": "float" + } + }, + { + "name": "set_max_domain", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 373806689, + "arguments": [ + { + "name": "max", + "type": "float", + "meta": "float" + } + ] + }, + { + "name": "get_domain_range", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1740695150, + "return_value": { + "type": "float", + "meta": "float" + } + }, { "name": "clean_dupes", "is_const": false, @@ -75554,9 +77785,24 @@ "signals": [ { "name": "range_changed" + }, + { + "name": "domain_changed" } ], "properties": [ + { + "type": "float", + "name": "min_domain", + "setter": "set_min_domain", + "getter": "get_min_domain" + }, + { + "type": "float", + "name": "max_domain", + "setter": "set_max_domain", + "getter": "get_max_domain" + }, { "type": "float", "name": "min_value", @@ -76305,6 +78551,31 @@ } ] }, + { + "name": "set_closed", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 2586408642, + "arguments": [ + { + "name": "closed", + "type": "bool" + } + ] + }, + { + "name": "is_closed", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 36873697, + "return_value": { + "type": "bool" + } + }, { "name": "set_bake_interval", "is_const": false, @@ -76565,6 +78836,12 @@ } ], "properties": [ + { + "type": "bool", + "name": "closed", + "setter": "set_closed", + "getter": "is_closed" + }, { "type": "float", "name": "bake_interval", @@ -77691,28 +79968,28 @@ "getter": "get_size" }, { - "type": "Texture2D", + "type": "Texture2D,-AnimatedTexture,-AtlasTexture,-CameraTexture,-CanvasTexture,-MeshTexture,-Texture2DRD,-ViewportTexture", "name": "texture_albedo", "setter": "set_texture", "getter": "get_texture", "index": 0 }, { - "type": "Texture2D", + "type": "Texture2D,-AnimatedTexture,-AtlasTexture,-CameraTexture,-CanvasTexture,-MeshTexture,-Texture2DRD,-ViewportTexture", "name": "texture_normal", "setter": "set_texture", "getter": "get_texture", "index": 1 }, { - "type": "Texture2D", + "type": "Texture2D,-AnimatedTexture,-AtlasTexture,-CameraTexture,-CanvasTexture,-MeshTexture,-Texture2DRD,-ViewportTexture", "name": "texture_orm", "setter": "set_texture", "getter": "get_texture", "index": 2 }, { - "type": "Texture2D", + "type": "Texture2D,-AnimatedTexture,-AtlasTexture,-CameraTexture,-CanvasTexture,-MeshTexture,-Texture2DRD,-ViewportTexture", "name": "texture_emission", "setter": "set_texture", "getter": "get_texture", @@ -77815,15 +80092,39 @@ "type": "enum::Error" } }, + { + "name": "create_temp", + "is_const": false, + "is_vararg": false, + "is_static": true, + "is_virtual": false, + "hash": 812913566, + "return_value": { + "type": "DirAccess" + }, + "arguments": [ + { + "name": "prefix", + "type": "String", + "default_value": "\"\"" + }, + { + "name": "keep", + "type": "bool", + "default_value": "false" + } + ] + }, { "name": "list_dir_begin", "is_const": false, "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 2610976713, + "hash": 166280745, "hash_compatibility": [ - 2018049411 + 2018049411, + 2610976713 ], "return_value": { "type": "enum::Error" @@ -78314,6 +80615,23 @@ } ] }, + { + "name": "is_bundle", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3927539163, + "return_value": { + "type": "bool" + }, + "arguments": [ + { + "name": "path", + "type": "String" + } + ] + }, { "name": "set_include_navigational", "is_const": false, @@ -78771,6 +81089,30 @@ { "name": "FEATURE_NATIVE_DIALOG_FILE", "value": 25 + }, + { + "name": "FEATURE_NATIVE_DIALOG_FILE_EXTRA", + "value": 26 + }, + { + "name": "FEATURE_WINDOW_DRAG", + "value": 27 + }, + { + "name": "FEATURE_SCREEN_EXCLUDE_FROM_CAPTURE", + "value": 28 + }, + { + "name": "FEATURE_WINDOW_EMBEDDING", + "value": 29 + }, + { + "name": "FEATURE_NATIVE_DIALOG_FILE_MIME", + "value": 30 + }, + { + "name": "FEATURE_EMOJI_AND_SYMBOL_PICKER", + "value": 31 } ] }, @@ -78797,6 +81139,10 @@ { "name": "MOUSE_MODE_CONFINED_HIDDEN", "value": 4 + }, + { + "name": "MOUSE_MODE_MAX", + "value": 5 } ] }, @@ -79039,8 +81385,16 @@ "value": 7 }, { - "name": "WINDOW_FLAG_MAX", + "name": "WINDOW_FLAG_SHARP_CORNERS", "value": 8 + }, + { + "name": "WINDOW_FLAG_EXCLUDE_FROM_CAPTURE", + "value": 9 + }, + { + "name": "WINDOW_FLAG_MAX", + "value": 10 } ] }, @@ -79082,6 +81436,48 @@ } ] }, + { + "name": "WindowResizeEdge", + "is_bitfield": false, + "values": [ + { + "name": "WINDOW_EDGE_TOP_LEFT", + "value": 0 + }, + { + "name": "WINDOW_EDGE_TOP", + "value": 1 + }, + { + "name": "WINDOW_EDGE_TOP_RIGHT", + "value": 2 + }, + { + "name": "WINDOW_EDGE_LEFT", + "value": 3 + }, + { + "name": "WINDOW_EDGE_RIGHT", + "value": 4 + }, + { + "name": "WINDOW_EDGE_BOTTOM_LEFT", + "value": 5 + }, + { + "name": "WINDOW_EDGE_BOTTOM", + "value": 6 + }, + { + "name": "WINDOW_EDGE_BOTTOM_RIGHT", + "value": 7 + }, + { + "name": "WINDOW_EDGE_MAX", + "value": 8 + } + ] + }, { "name": "VSyncMode", "is_bitfield": false, @@ -79123,6 +81519,14 @@ { "name": "OPENGL_CONTEXT", "value": 3 + }, + { + "name": "EGL_DISPLAY", + "value": 4 + }, + { + "name": "EGL_CONFIG", + "value": 5 } ] }, @@ -79259,9 +81663,10 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 3401266716, + "hash": 3616842746, "hash_compatibility": [ - 3415468211 + 3415468211, + 3401266716 ], "return_value": { "type": "int", @@ -79310,9 +81715,10 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 3401266716, + "hash": 3616842746, "hash_compatibility": [ - 3415468211 + 3415468211, + 3401266716 ], "return_value": { "type": "int", @@ -79361,9 +81767,10 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 4245856523, + "hash": 3867083847, "hash_compatibility": [ - 1700867534 + 1700867534, + 4245856523 ], "return_value": { "type": "int", @@ -79416,9 +81823,10 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 4245856523, + "hash": 3867083847, "hash_compatibility": [ - 1700867534 + 1700867534, + 4245856523 ], "return_value": { "type": "int", @@ -79471,9 +81879,10 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 3401266716, + "hash": 3616842746, "hash_compatibility": [ - 3415468211 + 3415468211, + 3401266716 ], "return_value": { "type": "int", @@ -79522,9 +81931,10 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 4245856523, + "hash": 3867083847, "hash_compatibility": [ - 1700867534 + 1700867534, + 4245856523 ], "return_value": { "type": "int", @@ -79577,9 +81987,10 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 3431222859, + "hash": 3297554655, "hash_compatibility": [ - 635750054 + 635750054, + 3431222859 ], "return_value": { "type": "int", @@ -81037,9 +83448,10 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 3323674545, + "hash": 36873697, "hash_compatibility": [ - 4162880507 + 4162880507, + 3323674545 ], "return_value": { "type": "bool" @@ -81113,6 +83525,23 @@ } ] }, + { + "name": "screen_get_image_rect", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 2601441065, + "return_value": { + "type": "Image" + }, + "arguments": [ + { + "name": "rect", + "type": "Rect2i" + } + ] + }, { "name": "screen_set_orientation", "is_const": false, @@ -82114,6 +84543,42 @@ "type": "bool" } }, + { + "name": "window_start_drag", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1995695955, + "arguments": [ + { + "name": "window_id", + "type": "int", + "meta": "int32", + "default_value": "0" + } + ] + }, + { + "name": "window_start_resize", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 4009722312, + "arguments": [ + { + "name": "edge", + "type": "enum::DisplayServer.WindowResizeEdge" + }, + { + "name": "window_id", + "type": "int", + "meta": "int32", + "default_value": "0" + } + ] + }, { "name": "ime_get_selection", "is_const": true, @@ -82201,6 +84666,17 @@ "meta": "int32" } }, + { + "name": "has_hardware_keyboard", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 36873697, + "return_value": { + "type": "bool" + } + }, { "name": "cursor_set_shape", "is_const": false, @@ -82427,6 +84903,14 @@ } ] }, + { + "name": "beep", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 4051624405 + }, { "name": "keyboard_get_layout_count", "is_const": true, @@ -82536,6 +85020,14 @@ } ] }, + { + "name": "show_emoji_and_symbol_picker", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 4051624405 + }, { "name": "process_events", "is_const": false, @@ -83760,6 +86252,18 @@ } ] }, + { + "name": "get_packet_flags", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3905245786, + "return_value": { + "type": "int", + "meta": "int32" + } + }, { "name": "get_remote_address", "is_const": true, @@ -83896,13 +86400,51 @@ "is_instantiable": true, "inherits": "RefCounted", "api_type": "editor", + "enums": [ + { + "name": "ContextMenuSlot", + "is_bitfield": false, + "values": [ + { + "name": "CONTEXT_SLOT_SCENE_TREE", + "value": 0 + }, + { + "name": "CONTEXT_SLOT_FILESYSTEM", + "value": 1 + }, + { + "name": "CONTEXT_SLOT_SCRIPT_EDITOR", + "value": 2 + }, + { + "name": "CONTEXT_SLOT_FILESYSTEM_CREATE", + "value": 3 + }, + { + "name": "CONTEXT_SLOT_SCRIPT_EDITOR_CODE", + "value": 4 + }, + { + "name": "CONTEXT_SLOT_SCENE_TABS", + "value": 5 + }, + { + "name": "CONTEXT_SLOT_2D_EDITOR", + "value": 6 + } + ] + } + ], "methods": [ { "name": "_popup_menu", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 4015028928, "arguments": [ { "name": "paths", @@ -83934,7 +86476,7 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 1048461161, + "hash": 2748336951, "arguments": [ { "name": "name", @@ -83948,10 +86490,51 @@ "name": "icon", "type": "Texture2D", "default_value": "null" + } + ] + }, + { + "name": "add_context_menu_item_from_shortcut", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3799546916, + "arguments": [ + { + "name": "name", + "type": "String" }, { "name": "shortcut", - "type": "Shortcut", + "type": "Shortcut" + }, + { + "name": "icon", + "type": "Texture2D", + "default_value": "null" + } + ] + }, + { + "name": "add_context_submenu_item", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1994674995, + "arguments": [ + { + "name": "name", + "type": "String" + }, + { + "name": "menu", + "type": "PopupMenu" + }, + { + "name": "icon", + "type": "Texture2D", "default_value": "null" } ] @@ -83969,8 +86552,10 @@ "name": "_setup_session", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1286410249, "arguments": [ { "name": "session_id", @@ -83983,8 +86568,10 @@ "name": "_has_capture", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3927539163, "return_value": { "type": "bool" }, @@ -83999,8 +86586,10 @@ "name": "_capture", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 2607901833, "return_value": { "type": "bool" }, @@ -84024,8 +86613,10 @@ "name": "_goto_script_line", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1208513123, "arguments": [ { "name": "script", @@ -84042,15 +86633,19 @@ "name": "_breakpoints_cleared_in_tree", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, - "is_virtual": true + "is_virtual": true, + "hash": 3218959716 }, { "name": "_breakpoint_set_in_tree", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 2338735218, "arguments": [ { "name": "script", @@ -84421,6 +87016,56 @@ } ] }, + { + "name": "save_pack_patch", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1485052307, + "return_value": { + "type": "Dictionary" + }, + "arguments": [ + { + "name": "preset", + "type": "EditorExportPreset" + }, + { + "name": "debug", + "type": "bool" + }, + { + "name": "path", + "type": "String" + } + ] + }, + { + "name": "save_zip_patch", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1485052307, + "return_value": { + "type": "Dictionary" + }, + "arguments": [ + { + "name": "preset", + "type": "EditorExportPreset" + }, + { + "name": "debug", + "type": "bool" + }, + { + "name": "path", + "type": "String" + } + ] + }, { "name": "gen_export_flags", "is_const": false, @@ -84444,7 +87089,10 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 425454869, + "hash": 1063735070, + "hash_compatibility": [ + 425454869 + ], "return_value": { "type": "enum::Error" }, @@ -84558,6 +87206,76 @@ } ] }, + { + "name": "export_pack_patch", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 608021658, + "return_value": { + "type": "enum::Error" + }, + "arguments": [ + { + "name": "preset", + "type": "EditorExportPreset" + }, + { + "name": "debug", + "type": "bool" + }, + { + "name": "path", + "type": "String" + }, + { + "name": "patches", + "type": "PackedStringArray", + "default_value": "PackedStringArray()" + }, + { + "name": "flags", + "type": "bitfield::EditorExportPlatform.DebugFlags", + "default_value": "0" + } + ] + }, + { + "name": "export_zip_patch", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 608021658, + "return_value": { + "type": "enum::Error" + }, + "arguments": [ + { + "name": "preset", + "type": "EditorExportPreset" + }, + { + "name": "debug", + "type": "bool" + }, + { + "name": "path", + "type": "String" + }, + { + "name": "patches", + "type": "PackedStringArray", + "default_value": "PackedStringArray()" + }, + { + "name": "flags", + "type": "bitfield::EditorExportPlatform.DebugFlags", + "default_value": "0" + } + ] + }, { "name": "clear_messages", "is_const": false, @@ -84774,6 +87492,27 @@ } ] }, + { + "name": "get_internal_export_files", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 89550086, + "return_value": { + "type": "Dictionary" + }, + "arguments": [ + { + "name": "preset", + "type": "EditorExportPreset" + }, + { + "name": "debug", + "type": "bool" + } + ] + }, { "name": "get_forced_export_files", "is_const": false, @@ -84805,8 +87544,10 @@ "name": "_get_preset_features", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1387456631, "return_value": { "type": "PackedStringArray" }, @@ -84821,8 +87562,10 @@ "name": "_is_executable", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3927539163, "return_value": { "type": "bool" }, @@ -84837,8 +87580,10 @@ "name": "_get_export_options", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3995934104, "return_value": { "type": "typedarray::Dictionary" } @@ -84847,8 +87592,10 @@ "name": "_should_update_export_options", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 2240911060, "return_value": { "type": "bool" } @@ -84857,8 +87604,10 @@ "name": "_get_export_option_visibility", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 969350244, "return_value": { "type": "bool" }, @@ -84877,8 +87626,10 @@ "name": "_get_export_option_warning", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 805886795, "return_value": { "type": "String" }, @@ -84897,8 +87648,10 @@ "name": "_get_os_name", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 201670096, "return_value": { "type": "String" } @@ -84907,8 +87660,10 @@ "name": "_get_name", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 201670096, "return_value": { "type": "String" } @@ -84917,8 +87672,10 @@ "name": "_get_logo", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3635182373, "return_value": { "type": "Texture2D" } @@ -84927,8 +87684,10 @@ "name": "_poll_export", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 2240911060, "return_value": { "type": "bool" } @@ -84937,8 +87696,10 @@ "name": "_get_options_count", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3905245786, "return_value": { "type": "int", "meta": "int32" @@ -84948,8 +87709,10 @@ "name": "_get_options_tooltip", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 201670096, "return_value": { "type": "String" } @@ -84958,8 +87721,10 @@ "name": "_get_option_icon", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3991065292, "return_value": { "type": "ImageTexture" }, @@ -84975,8 +87740,10 @@ "name": "_get_option_label", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 844755477, "return_value": { "type": "String" }, @@ -84992,8 +87759,10 @@ "name": "_get_option_tooltip", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 844755477, "return_value": { "type": "String" }, @@ -85009,8 +87778,10 @@ "name": "_get_device_architecture", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 844755477, "return_value": { "type": "String" }, @@ -85026,15 +87797,19 @@ "name": "_cleanup", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, - "is_virtual": true + "is_virtual": true, + "hash": 3218959716 }, { "name": "_run", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1726914928, "return_value": { "type": "enum::Error" }, @@ -85058,8 +87833,10 @@ "name": "_get_run_icon", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3635182373, "return_value": { "type": "Texture2D" } @@ -85068,8 +87845,10 @@ "name": "_can_export", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 493961987, "return_value": { "type": "bool" }, @@ -85088,8 +87867,10 @@ "name": "_has_valid_export_configuration", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 493961987, "return_value": { "type": "bool" }, @@ -85108,8 +87889,10 @@ "name": "_has_valid_project_configuration", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3117166915, "return_value": { "type": "bool" }, @@ -85124,8 +87907,10 @@ "name": "_get_binary_extensions", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1387456631, "return_value": { "type": "PackedStringArray" }, @@ -85140,8 +87925,10 @@ "name": "_export_project", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1328957260, "return_value": { "type": "enum::Error" }, @@ -85168,8 +87955,10 @@ "name": "_export_pack", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1328957260, "return_value": { "type": "enum::Error" }, @@ -85196,8 +87985,74 @@ "name": "_export_zip", "is_const": false, "is_static": false, + "is_required": false, + "is_vararg": false, + "is_virtual": true, + "hash": 1328957260, + "return_value": { + "type": "enum::Error" + }, + "arguments": [ + { + "name": "preset", + "type": "EditorExportPreset" + }, + { + "name": "debug", + "type": "bool" + }, + { + "name": "path", + "type": "String" + }, + { + "name": "flags", + "type": "bitfield::EditorExportPlatform.DebugFlags" + } + ] + }, + { + "name": "_export_pack_patch", + "is_const": false, + "is_static": false, + "is_required": false, + "is_vararg": false, + "is_virtual": true, + "hash": 454765315, + "return_value": { + "type": "enum::Error" + }, + "arguments": [ + { + "name": "preset", + "type": "EditorExportPreset" + }, + { + "name": "debug", + "type": "bool" + }, + { + "name": "path", + "type": "String" + }, + { + "name": "patches", + "type": "PackedStringArray" + }, + { + "name": "flags", + "type": "bitfield::EditorExportPlatform.DebugFlags" + } + ] + }, + { + "name": "_export_zip_patch", + "is_const": false, + "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 454765315, "return_value": { "type": "enum::Error" }, @@ -85214,6 +88069,10 @@ "name": "path", "type": "String" }, + { + "name": "patches", + "type": "PackedStringArray" + }, { "name": "flags", "type": "bitfield::EditorExportPlatform.DebugFlags" @@ -85224,8 +88083,10 @@ "name": "_get_platform_features", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1139954409, "return_value": { "type": "PackedStringArray" } @@ -85234,8 +88095,10 @@ "name": "_get_debug_protocol", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 201670096, "return_value": { "type": "String" } @@ -85345,8 +88208,10 @@ "name": "_export_file", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3533781844, "arguments": [ { "name": "path", @@ -85366,8 +88231,10 @@ "name": "_export_begin", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 2765511433, "arguments": [ { "name": "features", @@ -85392,15 +88259,19 @@ "name": "_export_end", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, - "is_virtual": true + "is_virtual": true, + "hash": 3218959716 }, { "name": "_begin_customize_resources", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1312023292, "return_value": { "type": "bool" }, @@ -85419,8 +88290,10 @@ "name": "_customize_resource", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 307917495, "return_value": { "type": "Resource" }, @@ -85439,8 +88312,10 @@ "name": "_begin_customize_scenes", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1312023292, "return_value": { "type": "bool" }, @@ -85459,8 +88334,10 @@ "name": "_customize_scene", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 498701822, "return_value": { "type": "Node" }, @@ -85479,8 +88356,10 @@ "name": "_get_customization_configuration_hash", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3905245786, "return_value": { "type": "int", "meta": "uint64" @@ -85490,22 +88369,28 @@ "name": "_end_customize_scenes", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, - "is_virtual": true + "is_virtual": true, + "hash": 3218959716 }, { "name": "_end_customize_resources", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, - "is_virtual": true + "is_virtual": true, + "hash": 3218959716 }, { "name": "_get_export_options", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 488349689, "return_value": { "type": "typedarray::Dictionary" }, @@ -85520,8 +88405,10 @@ "name": "_get_export_options_overrides", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 2837326714, "return_value": { "type": "Dictionary" }, @@ -85536,8 +88423,10 @@ "name": "_should_update_export_options", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1866233299, "return_value": { "type": "bool" }, @@ -85548,12 +88437,36 @@ } ] }, + { + "name": "_get_export_option_visibility", + "is_const": true, + "is_static": false, + "is_required": false, + "is_vararg": false, + "is_virtual": true, + "hash": 3537301980, + "return_value": { + "type": "bool" + }, + "arguments": [ + { + "name": "platform", + "type": "EditorExportPlatform" + }, + { + "name": "option", + "type": "String" + } + ] + }, { "name": "_get_export_option_warning", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3340251247, "return_value": { "type": "String" }, @@ -85572,8 +88485,10 @@ "name": "_get_export_features", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1057664154, "return_value": { "type": "PackedStringArray" }, @@ -85592,8 +88507,10 @@ "name": "_get_name", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 201670096, "return_value": { "type": "String" } @@ -85602,8 +88519,10 @@ "name": "_supports_platform", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1866233299, "return_value": { "type": "bool" }, @@ -85618,8 +88537,10 @@ "name": "_get_android_dependencies", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1057664154, "return_value": { "type": "PackedStringArray" }, @@ -85638,8 +88559,10 @@ "name": "_get_android_dependencies_maven_repos", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1057664154, "return_value": { "type": "PackedStringArray" }, @@ -85658,8 +88581,10 @@ "name": "_get_android_libraries", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1057664154, "return_value": { "type": "PackedStringArray" }, @@ -85678,8 +88603,10 @@ "name": "_get_android_manifest_activity_element_contents", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 4013372917, "return_value": { "type": "String" }, @@ -85698,8 +88625,10 @@ "name": "_get_android_manifest_application_element_contents", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 4013372917, "return_value": { "type": "String" }, @@ -85718,8 +88647,10 @@ "name": "_get_android_manifest_element_contents", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 4013372917, "return_value": { "type": "String" }, @@ -86192,6 +89123,17 @@ "type": "String" } }, + { + "name": "get_patches", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1139954409, + "return_value": { + "type": "PackedStringArray" + } + }, { "name": "get_export_path", "is_const": true, @@ -86358,8 +89300,12 @@ "value": 7 }, { - "name": "FEATURE_MAX", + "name": "FEATURE_GAME", "value": 8 + }, + { + "name": "FEATURE_MAX", + "value": 9 } ] } @@ -86862,6 +89808,39 @@ "type": "Dictionary" } }, + { + "name": "clear_filename_filter", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3218959716 + }, + { + "name": "set_filename_filter", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 83702148, + "arguments": [ + { + "name": "filter", + "type": "String" + } + ] + }, + { + "name": "get_filename_filter", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 201670096, + "return_value": { + "type": "String" + } + }, { "name": "get_current_dir", "is_const": true, @@ -87147,6 +90126,15 @@ "type": "String" } ] + }, + { + "name": "filename_filter_changed", + "arguments": [ + { + "name": "filter", + "type": "String" + } + ] } ], "properties": [ @@ -87616,8 +90604,10 @@ "name": "_is_active", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 36873697, "return_value": { "type": "bool" } @@ -87626,8 +90616,10 @@ "name": "_get_file_extensions", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1139954409, "return_value": { "type": "PackedStringArray" } @@ -87636,8 +90628,10 @@ "name": "_query", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 36873697, "return_value": { "type": "bool" } @@ -87655,8 +90649,10 @@ "name": "_get_importer_name", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 201670096, "return_value": { "type": "String" } @@ -87665,8 +90661,10 @@ "name": "_get_visible_name", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 201670096, "return_value": { "type": "String" } @@ -87675,8 +90673,10 @@ "name": "_get_preset_count", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3905245786, "return_value": { "type": "int", "meta": "int32" @@ -87686,8 +90686,10 @@ "name": "_get_preset_name", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 844755477, "return_value": { "type": "String" }, @@ -87703,8 +90705,10 @@ "name": "_get_recognized_extensions", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1139954409, "return_value": { "type": "PackedStringArray" } @@ -87713,8 +90717,10 @@ "name": "_get_import_options", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 520498173, "return_value": { "type": "typedarray::Dictionary" }, @@ -87734,8 +90740,10 @@ "name": "_get_save_extension", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 201670096, "return_value": { "type": "String" } @@ -87744,8 +90752,10 @@ "name": "_get_resource_type", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 201670096, "return_value": { "type": "String" } @@ -87754,8 +90764,10 @@ "name": "_get_priority", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1740695150, "return_value": { "type": "float", "meta": "float" @@ -87765,8 +90777,23 @@ "name": "_get_import_order", "is_const": true, "is_static": false, + "is_required": false, + "is_vararg": false, + "is_virtual": true, + "hash": 3905245786, + "return_value": { + "type": "int", + "meta": "int32" + } + }, + { + "name": "_get_format_version", + "is_const": true, + "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3905245786, "return_value": { "type": "int", "meta": "int32" @@ -87776,8 +90803,10 @@ "name": "_get_option_visibility", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 240466755, "return_value": { "type": "bool" }, @@ -87800,8 +90829,10 @@ "name": "_import", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 4108152118, "return_value": { "type": "enum::Error" }, @@ -87832,8 +90863,10 @@ "name": "_can_import_threaded", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 36873697, "return_value": { "type": "bool" } @@ -87882,6 +90915,20 @@ "inherits": "ScrollContainer", "api_type": "editor", "methods": [ + { + "name": "edit", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3975164845, + "arguments": [ + { + "name": "object", + "type": "Object" + } + ] + }, { "name": "get_selected_path", "is_const": true, @@ -87903,6 +90950,49 @@ "return_value": { "type": "Object" } + }, + { + "name": "instantiate_property_editor", + "is_const": false, + "is_vararg": false, + "is_static": true, + "is_virtual": false, + "hash": 1429914152, + "return_value": { + "type": "EditorProperty" + }, + "arguments": [ + { + "name": "object", + "type": "Object" + }, + { + "name": "type", + "type": "enum::Variant.Type" + }, + { + "name": "path", + "type": "String" + }, + { + "name": "hint", + "type": "enum::PropertyHint" + }, + { + "name": "hint_text", + "type": "String" + }, + { + "name": "usage", + "type": "int", + "meta": "uint32" + }, + { + "name": "wide", + "type": "bool", + "default_value": "false" + } + ] } ], "signals": [ @@ -88004,8 +91094,10 @@ "name": "_can_handle", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 397768994, "return_value": { "type": "bool" }, @@ -88020,8 +91112,10 @@ "name": "_parse_begin", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3975164845, "arguments": [ { "name": "object", @@ -88033,8 +91127,10 @@ "name": "_parse_category", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 357144787, "arguments": [ { "name": "object", @@ -88050,8 +91146,10 @@ "name": "_parse_group", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 357144787, "arguments": [ { "name": "object", @@ -88067,8 +91165,10 @@ "name": "_parse_property", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1087679910, "return_value": { "type": "bool" }, @@ -88107,8 +91207,10 @@ "name": "_parse_end", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3975164845, "arguments": [ { "name": "object", @@ -88273,6 +91375,17 @@ "type": "EditorSettings" } }, + { + "name": "get_editor_toaster", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3612675797, + "return_value": { + "type": "EditorToaster" + } + }, { "name": "get_editor_undo_redo", "is_const": true, @@ -88655,6 +91768,82 @@ } ] }, + { + "name": "popup_method_selector", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3585505226, + "arguments": [ + { + "name": "object", + "type": "Object" + }, + { + "name": "callback", + "type": "Callable" + }, + { + "name": "current_value", + "type": "String", + "default_value": "\"\"" + } + ] + }, + { + "name": "popup_quick_open", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 2271411043, + "arguments": [ + { + "name": "callback", + "type": "Callable" + }, + { + "name": "base_types", + "type": "typedarray::StringName", + "default_value": "Array[StringName]([])" + } + ] + }, + { + "name": "popup_create_dialog", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 495277124, + "arguments": [ + { + "name": "callback", + "type": "Callable" + }, + { + "name": "base_type", + "type": "StringName", + "default_value": "\"\"" + }, + { + "name": "current_type", + "type": "String", + "default_value": "\"\"" + }, + { + "name": "dialog_title", + "type": "String", + "default_value": "\"\"" + }, + { + "name": "type_blocklist", + "type": "typedarray::StringName", + "default_value": "Array[StringName]([])" + } + ] + }, { "name": "get_file_system_dock", "is_const": true, @@ -88819,11 +92008,19 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 83702148, + "hash": 1168363258, + "hash_compatibility": [ + 83702148 + ], "arguments": [ { "name": "scene_filepath", "type": "String" + }, + { + "name": "set_inherited", + "type": "bool", + "default_value": "false" } ] }, @@ -89024,15 +92221,19 @@ "name": "_redraw", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, - "is_virtual": true + "is_virtual": true, + "hash": 3218959716 }, { "name": "_get_handle_name", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1868713439, "return_value": { "type": "String" }, @@ -89052,8 +92253,10 @@ "name": "_is_handle_highlighted", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 361316320, "return_value": { "type": "bool" }, @@ -89073,8 +92276,10 @@ "name": "_get_handle_value", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 2144196525, "return_value": { "type": "Variant" }, @@ -89094,8 +92299,10 @@ "name": "_begin_handle_action", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 300928843, "arguments": [ { "name": "id", @@ -89112,8 +92319,10 @@ "name": "_set_handle", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 2210262157, "arguments": [ { "name": "id", @@ -89138,8 +92347,10 @@ "name": "_commit_handle", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3655739840, "arguments": [ { "name": "id", @@ -89164,8 +92375,10 @@ "name": "_subgizmos_intersect_ray", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 2055005479, "return_value": { "type": "int", "meta": "int32" @@ -89185,8 +92398,10 @@ "name": "_subgizmos_intersect_frustum", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1653813165, "return_value": { "type": "PackedInt32Array" }, @@ -89205,8 +92420,10 @@ "name": "_set_subgizmo_transform", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3616898986, "arguments": [ { "name": "id", @@ -89223,8 +92440,10 @@ "name": "_get_subgizmo_transform", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1965739696, "return_value": { "type": "Transform3D" }, @@ -89240,8 +92459,10 @@ "name": "_commit_subgizmos", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3411059856, "arguments": [ { "name": "ids", @@ -89508,8 +92729,10 @@ "name": "_has_gizmo", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1905827158, "return_value": { "type": "bool" }, @@ -89524,8 +92747,10 @@ "name": "_create_gizmo", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1418965287, "return_value": { "type": "EditorNode3DGizmo" }, @@ -89540,8 +92765,10 @@ "name": "_get_gizmo_name", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 201670096, "return_value": { "type": "String" } @@ -89550,8 +92777,10 @@ "name": "_get_priority", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3905245786, "return_value": { "type": "int", "meta": "int32" @@ -89561,8 +92790,10 @@ "name": "_can_be_hidden", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 36873697, "return_value": { "type": "bool" } @@ -89571,8 +92802,10 @@ "name": "_is_selectable_when_hidden", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 36873697, "return_value": { "type": "bool" } @@ -89581,8 +92814,10 @@ "name": "_redraw", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 173330131, "arguments": [ { "name": "gizmo", @@ -89594,8 +92829,10 @@ "name": "_get_handle_name", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3888674840, "return_value": { "type": "String" }, @@ -89619,8 +92856,10 @@ "name": "_is_handle_highlighted", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 2665780718, "return_value": { "type": "bool" }, @@ -89644,8 +92883,10 @@ "name": "_get_handle_value", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 2887724832, "return_value": { "type": "Variant" }, @@ -89669,8 +92910,10 @@ "name": "_begin_handle_action", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3363704593, "arguments": [ { "name": "gizmo", @@ -89691,8 +92934,10 @@ "name": "_set_handle", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1249646868, "arguments": [ { "name": "gizmo", @@ -89721,8 +92966,10 @@ "name": "_commit_handle", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1939863962, "arguments": [ { "name": "gizmo", @@ -89751,8 +92998,10 @@ "name": "_subgizmos_intersect_ray", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1781916302, "return_value": { "type": "int", "meta": "int32" @@ -89776,8 +93025,10 @@ "name": "_subgizmos_intersect_frustum", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3514748524, "return_value": { "type": "PackedInt32Array" }, @@ -89800,8 +93051,10 @@ "name": "_get_subgizmo_transform", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3700343508, "return_value": { "type": "Transform3D" }, @@ -89821,8 +93074,10 @@ "name": "_set_subgizmo_transform", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 2435388792, "arguments": [ { "name": "gizmo", @@ -89843,8 +93098,10 @@ "name": "_commit_subgizmos", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 2282018236, "arguments": [ { "name": "gizmo", @@ -90192,28 +93449,6 @@ "value": 2 } ] - }, - { - "name": "ContextMenuSlot", - "is_bitfield": false, - "values": [ - { - "name": "CONTEXT_SLOT_SCENE_TREE", - "value": 0 - }, - { - "name": "CONTEXT_SLOT_FILESYSTEM", - "value": 1 - }, - { - "name": "CONTEXT_SLOT_SCRIPT_EDITOR", - "value": 2 - }, - { - "name": "CONTEXT_SUBMENU_SLOT_FILESYSTEM_CREATE", - "value": 3 - } - ] } ], "methods": [ @@ -90221,8 +93456,10 @@ "name": "_forward_canvas_gui_input", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1062211774, "return_value": { "type": "bool" }, @@ -90237,8 +93474,10 @@ "name": "_forward_canvas_draw_over_viewport", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1496901182, "arguments": [ { "name": "viewport_control", @@ -90250,8 +93489,10 @@ "name": "_forward_canvas_force_draw_over_viewport", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1496901182, "arguments": [ { "name": "viewport_control", @@ -90263,8 +93504,10 @@ "name": "_forward_3d_gui_input", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1018736637, "return_value": { "type": "int", "meta": "int32" @@ -90284,8 +93527,10 @@ "name": "_forward_3d_draw_over_viewport", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1496901182, "arguments": [ { "name": "viewport_control", @@ -90297,8 +93542,10 @@ "name": "_forward_3d_force_draw_over_viewport", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1496901182, "arguments": [ { "name": "viewport_control", @@ -90310,8 +93557,10 @@ "name": "_get_plugin_name", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 201670096, "return_value": { "type": "String" } @@ -90320,8 +93569,10 @@ "name": "_get_plugin_icon", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3635182373, "return_value": { "type": "Texture2D" } @@ -90330,8 +93581,10 @@ "name": "_has_main_screen", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 36873697, "return_value": { "type": "bool" } @@ -90340,8 +93593,10 @@ "name": "_make_visible", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 2586408642, "arguments": [ { "name": "visible", @@ -90353,8 +93608,10 @@ "name": "_edit", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3975164845, "arguments": [ { "name": "object", @@ -90366,8 +93623,10 @@ "name": "_handles", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 397768994, "return_value": { "type": "bool" }, @@ -90382,8 +93641,10 @@ "name": "_get_state", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3102165223, "return_value": { "type": "Dictionary" } @@ -90392,8 +93653,10 @@ "name": "_set_state", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 4155329257, "arguments": [ { "name": "state", @@ -90405,15 +93668,19 @@ "name": "_clear", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, - "is_virtual": true + "is_virtual": true, + "hash": 3218959716 }, { "name": "_get_unsaved_status", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3135753539, "return_value": { "type": "String" }, @@ -90428,22 +93695,28 @@ "name": "_save_external_data", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, - "is_virtual": true + "is_virtual": true, + "hash": 3218959716 }, { "name": "_apply_changes", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, - "is_virtual": true + "is_virtual": true, + "hash": 3218959716 }, { "name": "_get_breakpoints", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1139954409, "return_value": { "type": "PackedStringArray" } @@ -90452,8 +93725,10 @@ "name": "_set_window_layout", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 853519107, "arguments": [ { "name": "configuration", @@ -90465,8 +93740,10 @@ "name": "_get_window_layout", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 853519107, "arguments": [ { "name": "configuration", @@ -90478,8 +93755,10 @@ "name": "_build", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 2240911060, "return_value": { "type": "bool" } @@ -90488,15 +93767,19 @@ "name": "_enable_plugin", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, - "is_virtual": true + "is_virtual": true, + "hash": 3218959716 }, { "name": "_disable_plugin", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, - "is_virtual": true + "is_virtual": true, + "hash": 3218959716 }, { "name": "add_control_to_container", @@ -91138,11 +94421,11 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 2598408232, + "hash": 1904221872, "arguments": [ { "name": "slot", - "type": "enum::EditorPlugin.ContextMenuSlot" + "type": "enum::EditorContextMenuPlugin.ContextMenuSlot" }, { "name": "plugin", @@ -91156,12 +94439,8 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 2598408232, + "hash": 2281511854, "arguments": [ - { - "name": "slot", - "type": "enum::EditorPlugin.ContextMenuSlot" - }, { "name": "plugin", "type": "EditorContextMenuPlugin" @@ -91292,15 +94571,19 @@ "name": "_update_property", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, - "is_virtual": true + "is_virtual": true, + "hash": 3218959716 }, { "name": "_set_read_only", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 2586408642, "arguments": [ { "name": "read_only", @@ -91358,6 +94641,56 @@ "type": "bool" } }, + { + "name": "set_draw_label", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 2586408642, + "arguments": [ + { + "name": "draw_label", + "type": "bool" + } + ] + }, + { + "name": "is_draw_label", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 36873697, + "return_value": { + "type": "bool" + } + }, + { + "name": "set_draw_background", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 2586408642, + "arguments": [ + { + "name": "draw_background", + "type": "bool" + } + ] + }, + { + "name": "is_draw_background", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 36873697, + "return_value": { + "type": "bool" + } + }, { "name": "set_checkable", "is_const": false, @@ -91541,13 +94874,160 @@ } ] }, + { + "name": "set_selectable", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 2586408642, + "arguments": [ + { + "name": "selectable", + "type": "bool" + } + ] + }, + { + "name": "is_selectable", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 36873697, + "return_value": { + "type": "bool" + } + }, + { + "name": "set_use_folding", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 2586408642, + "arguments": [ + { + "name": "use_folding", + "type": "bool" + } + ] + }, + { + "name": "is_using_folding", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 36873697, + "return_value": { + "type": "bool" + } + }, + { + "name": "set_name_split_ratio", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 373806689, + "arguments": [ + { + "name": "ratio", + "type": "float", + "meta": "float" + } + ] + }, + { + "name": "get_name_split_ratio", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1740695150, + "return_value": { + "type": "float", + "meta": "float" + } + }, + { + "name": "deselect", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3218959716 + }, + { + "name": "is_selected", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 36873697, + "return_value": { + "type": "bool" + } + }, + { + "name": "select", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1025054187, + "arguments": [ + { + "name": "focusable", + "type": "int", + "meta": "int32", + "default_value": "-1" + } + ] + }, + { + "name": "set_object_and_property", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 4157606280, + "arguments": [ + { + "name": "object", + "type": "Object" + }, + { + "name": "property", + "type": "StringName" + } + ] + }, + { + "name": "set_label_reference", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1496901182, + "arguments": [ + { + "name": "control", + "type": "Control" + } + ] + }, { "name": "emit_changed", "is_const": false, "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 3069422438, + "hash": 1822500399, + "hash_compatibility": [ + 3069422438 + ], "arguments": [ { "name": "property", @@ -91649,6 +95129,19 @@ } ] }, + { + "name": "property_favorited", + "arguments": [ + { + "name": "property", + "type": "StringName" + }, + { + "name": "favorited", + "type": "bool" + } + ] + }, { "name": "property_pinned", "arguments": [ @@ -91728,6 +95221,18 @@ "setter": "set_read_only", "getter": "is_read_only" }, + { + "type": "bool", + "name": "draw_label", + "setter": "set_draw_label", + "getter": "is_draw_label" + }, + { + "type": "bool", + "name": "draw_background", + "setter": "set_draw_background", + "getter": "is_draw_background" + }, { "type": "bool", "name": "checkable", @@ -91757,6 +95262,24 @@ "name": "deletable", "setter": "set_deletable", "getter": "is_deletable" + }, + { + "type": "bool", + "name": "selectable", + "setter": "set_selectable", + "getter": "is_selectable" + }, + { + "type": "bool", + "name": "use_folding", + "setter": "set_use_folding", + "getter": "is_using_folding" + }, + { + "type": "float", + "name": "name_split_ratio", + "setter": "set_name_split_ratio", + "getter": "get_name_split_ratio" } ] }, @@ -91771,8 +95294,10 @@ "name": "_converts_to", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 201670096, "return_value": { "type": "String" } @@ -91781,8 +95306,10 @@ "name": "_handles", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3190994482, "return_value": { "type": "bool" }, @@ -91797,8 +95324,10 @@ "name": "_convert", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 325183270, "return_value": { "type": "Resource" }, @@ -91822,8 +95351,10 @@ "name": "_set_create_options", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3975164845, "arguments": [ { "name": "menu_node", @@ -91835,8 +95366,10 @@ "name": "_handle_menu_selected", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3067735520, "return_value": { "type": "bool" }, @@ -92150,8 +95683,10 @@ "name": "_handles", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3927539163, "return_value": { "type": "bool" }, @@ -92166,8 +95701,10 @@ "name": "_generate", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 255939159, "return_value": { "type": "Texture2D" }, @@ -92190,8 +95727,10 @@ "name": "_generate_from_path", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1601192835, "return_value": { "type": "Texture2D" }, @@ -92214,8 +95753,10 @@ "name": "_generate_small_preview_automatically", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 36873697, "return_value": { "type": "bool" } @@ -92224,8 +95765,10 @@ "name": "_can_generate_small_preview", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 36873697, "return_value": { "type": "bool" } @@ -92243,8 +95786,10 @@ "name": "_handles", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3927539163, "return_value": { "type": "bool" }, @@ -92259,8 +95804,10 @@ "name": "_make_tooltip_for_path", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 4100114520, "return_value": { "type": "Control" }, @@ -92336,23 +95883,14 @@ } ], "methods": [ - { - "name": "_get_import_flags", - "is_const": true, - "is_static": false, - "is_vararg": false, - "is_virtual": true, - "return_value": { - "type": "int", - "meta": "uint32" - } - }, { "name": "_get_extensions", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1139954409, "return_value": { "type": "PackedStringArray" } @@ -92361,8 +95899,10 @@ "name": "_import_scene", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3749238728, "return_value": { "type": "Object" }, @@ -92386,8 +95926,10 @@ "name": "_get_import_options", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 83702148, "arguments": [ { "name": "path", @@ -92399,8 +95941,10 @@ "name": "_get_option_visibility", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 298836892, "return_value": { "type": "Variant" }, @@ -92418,6 +95962,62 @@ "type": "String" } ] + }, + { + "name": "add_import_option", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 402577236, + "arguments": [ + { + "name": "name", + "type": "String" + }, + { + "name": "value", + "type": "Variant" + } + ] + }, + { + "name": "add_import_option_advanced", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3674075649, + "arguments": [ + { + "name": "type", + "type": "enum::Variant.Type" + }, + { + "name": "name", + "type": "String" + }, + { + "name": "default_value", + "type": "Variant" + }, + { + "name": "hint", + "type": "enum::PropertyHint", + "default_value": "0" + }, + { + "name": "hint_string", + "type": "String", + "default_value": "\"\"" + }, + { + "name": "usage_flags", + "type": "int", + "meta": "int32", + "default_value": "6" + } + ] } ] }, @@ -92460,8 +96060,10 @@ "name": "_post_import", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 134930648, "return_value": { "type": "Object" }, @@ -92536,8 +96138,10 @@ "name": "_get_internal_import_options", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1286410249, "arguments": [ { "name": "category", @@ -92550,8 +96154,10 @@ "name": "_get_internal_option_visibility", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3811255416, "return_value": { "type": "Variant" }, @@ -92575,8 +96181,10 @@ "name": "_get_internal_option_update_view_required", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3957349696, "return_value": { "type": "Variant" }, @@ -92596,8 +96204,10 @@ "name": "_internal_process", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3641982463, "arguments": [ { "name": "category", @@ -92622,8 +96232,10 @@ "name": "_get_import_options", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 83702148, "arguments": [ { "name": "path", @@ -92635,8 +96247,10 @@ "name": "_get_option_visibility", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 298836892, "return_value": { "type": "Variant" }, @@ -92659,8 +96273,10 @@ "name": "_pre_process", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1078189570, "arguments": [ { "name": "scene", @@ -92672,8 +96288,10 @@ "name": "_post_process", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1078189570, "arguments": [ { "name": "scene", @@ -92770,8 +96388,10 @@ "name": "_run", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, - "is_virtual": true + "is_virtual": true, + "hash": 3218959716 }, { "name": "add_root_node", @@ -93336,6 +96956,31 @@ "return_value": { "type": "bool" } + }, + { + "name": "set_editing_integer", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 2586408642, + "arguments": [ + { + "name": "editing_integer", + "type": "bool" + } + ] + }, + { + "name": "is_editing_integer", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 36873697, + "return_value": { + "type": "bool" + } } ], "signals": [ @@ -93345,6 +96990,9 @@ { "name": "ungrabbed" }, + { + "name": "updown_pressed" + }, { "name": "value_focus_entered" }, @@ -93382,6 +97030,12 @@ "name": "hide_slider", "setter": "set_hide_slider", "getter": "is_hiding_slider" + }, + { + "type": "bool", + "name": "editing_integer", + "setter": "set_editing_integer", + "getter": "is_editing_integer" } ] }, @@ -93396,8 +97050,10 @@ "name": "_get_name", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 201670096, "return_value": { "type": "String" } @@ -93406,14 +97062,69 @@ "name": "_get_supported_languages", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1139954409, "return_value": { "type": "PackedStringArray" } } ] }, + { + "name": "EditorToaster", + "is_refcounted": false, + "is_instantiable": false, + "inherits": "HBoxContainer", + "api_type": "editor", + "enums": [ + { + "name": "Severity", + "is_bitfield": false, + "values": [ + { + "name": "SEVERITY_INFO", + "value": 0 + }, + { + "name": "SEVERITY_WARNING", + "value": 1 + }, + { + "name": "SEVERITY_ERROR", + "value": 2 + } + ] + } + ], + "methods": [ + { + "name": "push_toast", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1813923476, + "arguments": [ + { + "name": "message", + "type": "String" + }, + { + "name": "severity", + "type": "enum::EditorToaster.Severity", + "default_value": "0" + }, + { + "name": "tooltip", + "type": "String", + "default_value": "\"\"" + } + ] + } + ] + }, { "name": "EditorTranslationParserPlugin", "is_refcounted": true, @@ -93425,20 +97136,20 @@ "name": "_parse_file", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1576865988, + "hash_compatibility": [ + 3567846260 + ], + "return_value": { + "type": "typedarray::PackedStringArray" + }, "arguments": [ { "name": "path", "type": "String" - }, - { - "name": "msgids", - "type": "typedarray::String" - }, - { - "name": "msgids_context_plural", - "type": "typedarray::Array" } ] }, @@ -93446,8 +97157,10 @@ "name": "_get_recognized_extensions", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1139954409, "return_value": { "type": "PackedStringArray" } @@ -93783,8 +97496,10 @@ "name": "_initialize", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2323990056, "return_value": { "type": "bool" }, @@ -93799,8 +97514,10 @@ "name": "_set_credentials", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1336744649, "arguments": [ { "name": "username", @@ -93828,8 +97545,10 @@ "name": "_get_modified_files_data", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2915620761, "return_value": { "type": "typedarray::Dictionary" } @@ -93838,8 +97557,10 @@ "name": "_stage_file", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 83702148, "arguments": [ { "name": "file_path", @@ -93851,8 +97572,10 @@ "name": "_unstage_file", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 83702148, "arguments": [ { "name": "file_path", @@ -93864,8 +97587,10 @@ "name": "_discard_file", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 83702148, "arguments": [ { "name": "file_path", @@ -93877,8 +97602,10 @@ "name": "_commit", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 83702148, "arguments": [ { "name": "msg", @@ -93890,8 +97617,10 @@ "name": "_get_diff", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1366379175, "return_value": { "type": "typedarray::Dictionary" }, @@ -93911,8 +97640,10 @@ "name": "_shut_down", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2240911060, "return_value": { "type": "bool" } @@ -93921,8 +97652,10 @@ "name": "_get_vcs_name", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2841200299, "return_value": { "type": "String" } @@ -93931,8 +97664,10 @@ "name": "_get_previous_commits", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1171824711, "return_value": { "type": "typedarray::Dictionary" }, @@ -93948,8 +97683,10 @@ "name": "_get_branch_list", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2915620761, "return_value": { "type": "typedarray::String" } @@ -93958,8 +97695,10 @@ "name": "_get_remotes", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2915620761, "return_value": { "type": "typedarray::String" } @@ -93968,8 +97707,10 @@ "name": "_create_branch", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 83702148, "arguments": [ { "name": "branch_name", @@ -93981,8 +97722,10 @@ "name": "_remove_branch", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 83702148, "arguments": [ { "name": "branch_name", @@ -93994,8 +97737,10 @@ "name": "_create_remote", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3186203200, "arguments": [ { "name": "remote_name", @@ -94011,8 +97756,10 @@ "name": "_remove_remote", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 83702148, "arguments": [ { "name": "remote_name", @@ -94024,8 +97771,10 @@ "name": "_get_current_branch_name", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2841200299, "return_value": { "type": "String" } @@ -94034,8 +97783,10 @@ "name": "_checkout_branch", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2323990056, "return_value": { "type": "bool" }, @@ -94050,8 +97801,10 @@ "name": "_pull", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 83702148, "arguments": [ { "name": "remote", @@ -94063,8 +97816,10 @@ "name": "_push", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2678287736, "arguments": [ { "name": "remote", @@ -94080,8 +97835,10 @@ "name": "_fetch", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 83702148, "arguments": [ { "name": "remote", @@ -94093,8 +97850,10 @@ "name": "_get_line_diff", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2796572089, "return_value": { "type": "typedarray::Dictionary" }, @@ -94809,6 +98568,17 @@ "type": "bool" } }, + { + "name": "is_embedded_in_editor", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 36873697, + "return_value": { + "type": "bool" + } + }, { "name": "get_write_movie_path", "is_const": true, @@ -94820,6 +98590,31 @@ "type": "String" } }, + { + "name": "set_print_to_stdout", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 2586408642, + "arguments": [ + { + "name": "enabled", + "type": "bool" + } + ] + }, + { + "name": "is_printing_to_stdout", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 36873697, + "return_value": { + "type": "bool" + } + }, { "name": "set_print_error_messages", "is_const": false, @@ -94853,6 +98648,12 @@ "setter": "set_print_error_messages", "getter": "is_printing_error_messages" }, + { + "type": "bool", + "name": "print_to_stdout", + "setter": "set_print_to_stdout", + "getter": "is_printing_to_stdout" + }, { "type": "int", "name": "physics_ticks_per_second", @@ -95278,8 +99079,10 @@ "name": "_toggle", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1157301103, "arguments": [ { "name": "enable", @@ -95295,8 +99098,10 @@ "name": "_add_frame", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 381264803, "arguments": [ { "name": "data", @@ -95308,8 +99113,10 @@ "name": "_tick", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3948312143, "arguments": [ { "name": "frame_time", @@ -95435,6 +99242,10 @@ { "name": "TONE_MAPPER_ACES", "value": 3 + }, + { + "name": "TONE_MAPPER_AGX", + "value": 4 } ] }, @@ -98577,6 +102388,64 @@ } ] }, + { + "name": "ExternalTexture", + "is_refcounted": true, + "is_instantiable": true, + "inherits": "Texture2D", + "api_type": "core", + "methods": [ + { + "name": "set_size", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 743155724, + "arguments": [ + { + "name": "size", + "type": "Vector2" + } + ] + }, + { + "name": "get_external_texture_id", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3905245786, + "return_value": { + "type": "int", + "meta": "uint64" + } + }, + { + "name": "set_external_buffer_id", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1286410249, + "arguments": [ + { + "name": "external_buffer_id", + "type": "int", + "meta": "uint64" + } + ] + } + ], + "properties": [ + { + "type": "Vector2", + "name": "size", + "setter": "set_size", + "getter": "get_size" + } + ] + }, { "name": "FBXDocument", "is_refcounted": true, @@ -99598,7 +103467,10 @@ "is_vararg": false, "is_static": true, "is_virtual": false, - "hash": 1482131466, + "hash": 788003459, + "hash_compatibility": [ + 1482131466 + ], "return_value": { "type": "FileAccess" }, @@ -99614,6 +103486,11 @@ { "name": "key", "type": "PackedByteArray" + }, + { + "name": "iv", + "type": "PackedByteArray", + "default_value": "PackedByteArray()" } ] }, @@ -99682,6 +103559,39 @@ "type": "enum::Error" } }, + { + "name": "create_temp", + "is_const": false, + "is_vararg": false, + "is_static": true, + "is_virtual": false, + "hash": 3075606245, + "return_value": { + "type": "FileAccess" + }, + "arguments": [ + { + "name": "mode_flags", + "type": "int", + "meta": "int32" + }, + { + "name": "prefix", + "type": "String", + "default_value": "\"\"" + }, + { + "name": "extension", + "type": "String", + "default_value": "\"\"" + }, + { + "name": "keep", + "type": "bool", + "default_value": "false" + } + ] + }, { "name": "get_file_as_bytes", "is_const": false, @@ -99889,6 +103799,18 @@ "meta": "uint64" } }, + { + "name": "get_half", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1740695150, + "return_value": { + "type": "float", + "meta": "float" + } + }, { "name": "get_float", "is_const": true, @@ -100084,7 +104006,13 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 1286410249, + "hash": 3067735520, + "hash_compatibility": [ + 1286410249 + ], + "return_value": { + "type": "bool" + }, "arguments": [ { "name": "value", @@ -100099,7 +104027,13 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 1286410249, + "hash": 3067735520, + "hash_compatibility": [ + 1286410249 + ], + "return_value": { + "type": "bool" + }, "arguments": [ { "name": "value", @@ -100114,7 +104048,13 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 1286410249, + "hash": 3067735520, + "hash_compatibility": [ + 1286410249 + ], + "return_value": { + "type": "bool" + }, "arguments": [ { "name": "value", @@ -100129,7 +104069,13 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 1286410249, + "hash": 3067735520, + "hash_compatibility": [ + 1286410249 + ], + "return_value": { + "type": "bool" + }, "arguments": [ { "name": "value", @@ -100138,13 +104084,40 @@ } ] }, + { + "name": "store_half", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 330693286, + "hash_compatibility": [ + 373806689 + ], + "return_value": { + "type": "bool" + }, + "arguments": [ + { + "name": "value", + "type": "float", + "meta": "float" + } + ] + }, { "name": "store_float", "is_const": false, "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 373806689, + "hash": 330693286, + "hash_compatibility": [ + 373806689 + ], + "return_value": { + "type": "bool" + }, "arguments": [ { "name": "value", @@ -100159,7 +104132,13 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 373806689, + "hash": 330693286, + "hash_compatibility": [ + 373806689 + ], + "return_value": { + "type": "bool" + }, "arguments": [ { "name": "value", @@ -100174,7 +104153,13 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 373806689, + "hash": 330693286, + "hash_compatibility": [ + 373806689 + ], + "return_value": { + "type": "bool" + }, "arguments": [ { "name": "value", @@ -100189,7 +104174,13 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 2971499966, + "hash": 114037665, + "hash_compatibility": [ + 2971499966 + ], + "return_value": { + "type": "bool" + }, "arguments": [ { "name": "buffer", @@ -100203,7 +104194,13 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 83702148, + "hash": 2323990056, + "hash_compatibility": [ + 83702148 + ], + "return_value": { + "type": "bool" + }, "arguments": [ { "name": "line", @@ -100217,10 +104214,14 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 2173791505, + "hash": 1611473434, "hash_compatibility": [ + 2173791505, 2217842308 ], + "return_value": { + "type": "bool" + }, "arguments": [ { "name": "values", @@ -100239,7 +104240,13 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 83702148, + "hash": 2323990056, + "hash_compatibility": [ + 83702148 + ], + "return_value": { + "type": "bool" + }, "arguments": [ { "name": "string", @@ -100253,7 +104260,13 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 738511890, + "hash": 117357437, + "hash_compatibility": [ + 738511890 + ], + "return_value": { + "type": "bool" + }, "arguments": [ { "name": "value", @@ -100272,7 +104285,13 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 83702148, + "hash": 2323990056, + "hash_compatibility": [ + 83702148 + ], + "return_value": { + "type": "bool" + }, "arguments": [ { "name": "string", @@ -100566,6 +104585,39 @@ "type": "PackedStringArray" } }, + { + "name": "clear_filename_filter", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3218959716 + }, + { + "name": "set_filename_filter", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 83702148, + "arguments": [ + { + "name": "filter", + "type": "String" + } + ] + }, + { + "name": "get_filename_filter", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 201670096, + "return_value": { + "type": "String" + } + }, { "name": "get_option_name", "is_const": true, @@ -101031,6 +105083,15 @@ "type": "String" } ] + }, + { + "name": "filename_filter_changed", + "arguments": [ + { + "name": "filter", + "type": "String" + } + ] } ], "properties": [ @@ -101064,6 +105125,12 @@ "setter": "set_filters", "getter": "get_filters" }, + { + "type": "String", + "name": "filename_filter", + "setter": "set_filename_filter", + "getter": "get_filename_filter" + }, { "type": "int", "name": "option_count", @@ -102468,7 +106535,8 @@ "arguments": [ { "name": "char", - "type": "int" + "type": "int", + "meta": "char32" }, { "name": "font_size", @@ -102502,7 +106570,8 @@ }, { "name": "char", - "type": "int" + "type": "int", + "meta": "char32" }, { "name": "font_size", @@ -102541,7 +106610,8 @@ }, { "name": "char", - "type": "int" + "type": "int", + "meta": "char32" }, { "name": "font_size", @@ -102574,7 +106644,8 @@ "arguments": [ { "name": "char", - "type": "int" + "type": "int", + "meta": "char32" } ] }, @@ -103111,6 +107182,31 @@ "type": "enum::TextServer.SubpixelPositioning" } }, + { + "name": "set_keep_rounding_remainders", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 2586408642, + "arguments": [ + { + "name": "keep_rounding_remainders", + "type": "bool" + } + ] + }, + { + "name": "get_keep_rounding_remainders", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 36873697, + "return_value": { + "type": "bool" + } + }, { "name": "set_oversampling", "is_const": false, @@ -104369,11 +108465,13 @@ }, { "name": "start", - "type": "int" + "type": "int", + "meta": "char32" }, { "name": "end", - "type": "int" + "type": "int", + "meta": "char32" } ] }, @@ -104565,11 +108663,13 @@ }, { "name": "char", - "type": "int" + "type": "int", + "meta": "char32" }, { "name": "variation_selector", - "type": "int" + "type": "int", + "meta": "char32" } ] }, @@ -104581,7 +108681,8 @@ "is_virtual": false, "hash": 3175239445, "return_value": { - "type": "int" + "type": "int", + "meta": "char32" }, "arguments": [ { @@ -104658,6 +108759,12 @@ "setter": "set_subpixel_positioning", "getter": "get_subpixel_positioning" }, + { + "type": "bool", + "name": "keep_rounding_remainders", + "setter": "set_keep_rounding_remainders", + "getter": "get_keep_rounding_remainders" + }, { "type": "bool", "name": "multichannel_signed_distance_field", @@ -105303,6 +109410,60 @@ "value": 6 } ] + }, + { + "name": "GLTFComponentType", + "is_bitfield": false, + "values": [ + { + "name": "COMPONENT_TYPE_NONE", + "value": 0 + }, + { + "name": "COMPONENT_TYPE_SIGNED_BYTE", + "value": 5120 + }, + { + "name": "COMPONENT_TYPE_UNSIGNED_BYTE", + "value": 5121 + }, + { + "name": "COMPONENT_TYPE_SIGNED_SHORT", + "value": 5122 + }, + { + "name": "COMPONENT_TYPE_UNSIGNED_SHORT", + "value": 5123 + }, + { + "name": "COMPONENT_TYPE_SIGNED_INT", + "value": 5124 + }, + { + "name": "COMPONENT_TYPE_UNSIGNED_INT", + "value": 5125 + }, + { + "name": "COMPONENT_TYPE_SINGLE_FLOAT", + "value": 5126 + }, + { + "name": "COMPONENT_TYPE_DOUBLE_FLOAT", + "value": 5130 + }, + { + "name": "COMPONENT_TYPE_HALF_FLOAT", + "value": 5131 + }, + { + "name": "COMPONENT_TYPE_SIGNED_LONG", + "value": 5134 + }, + { + "name": "COMPONENT_TYPE_UNSIGNED_LONG", + "value": 5135 + } + ] } ], "methods": [ @@ -106649,6 +110810,57 @@ } ] }, + { + "name": "import_object_model_property", + "is_const": false, + "is_vararg": false, + "is_static": true, + "is_virtual": false, + "hash": 1206708632, + "return_value": { + "type": "GLTFObjectModelProperty" + }, + "arguments": [ + { + "name": "state", + "type": "GLTFState" + }, + { + "name": "json_pointer", + "type": "String" + } + ] + }, + { + "name": "export_object_model_property", + "is_const": false, + "is_vararg": false, + "is_static": true, + "is_virtual": false, + "hash": 314209806, + "return_value": { + "type": "GLTFObjectModelProperty" + }, + "arguments": [ + { + "name": "state", + "type": "GLTFState" + }, + { + "name": "node_path", + "type": "NodePath" + }, + { + "name": "godot_node", + "type": "Node" + }, + { + "name": "gltf_node_index", + "type": "int", + "meta": "int32" + } + ] + }, { "name": "register_gltf_document_extension", "is_const": false, @@ -106726,8 +110938,10 @@ "name": "_import_preflight", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 412946943, "return_value": { "type": "enum::Error" }, @@ -106746,8 +110960,10 @@ "name": "_get_supported_extensions", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 2981934095, "return_value": { "type": "PackedStringArray" } @@ -106756,8 +110972,10 @@ "name": "_parse_node_extensions", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 2067053794, "return_value": { "type": "enum::Error" }, @@ -106780,8 +110998,10 @@ "name": "_parse_image_data", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3201673288, "return_value": { "type": "enum::Error" }, @@ -106808,8 +111028,10 @@ "name": "_get_image_file_extension", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 2841200299, "return_value": { "type": "String" } @@ -106818,8 +111040,10 @@ "name": "_parse_texture_json", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1624327185, "return_value": { "type": "enum::Error" }, @@ -106839,13 +111063,15 @@ ] }, { - "name": "_generate_scene_node", + "name": "_import_object_model_property", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1446147484, "return_value": { - "type": "Node3D" + "type": "GLTFObjectModelProperty" }, "arguments": [ { @@ -106853,12 +111079,12 @@ "type": "GLTFState" }, { - "name": "gltf_node", - "type": "GLTFNode" + "name": "split_json_pointer", + "type": "PackedStringArray" }, { - "name": "scene_parent", - "type": "Node" + "name": "partial_paths", + "type": "typedarray::NodePath" } ] }, @@ -106866,8 +111092,28 @@ "name": "_import_post_parse", "is_const": false, "is_static": false, + "is_required": false, + "is_vararg": false, + "is_virtual": true, + "hash": 1704600462, + "return_value": { + "type": "enum::Error" + }, + "arguments": [ + { + "name": "state", + "type": "GLTFState" + } + ] + }, + { + "name": "_import_pre_generate", + "is_const": false, + "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1704600462, "return_value": { "type": "enum::Error" }, @@ -106878,12 +111124,40 @@ } ] }, + { + "name": "_generate_scene_node", + "is_const": false, + "is_static": false, + "is_required": false, + "is_vararg": false, + "is_virtual": true, + "hash": 3810899026, + "return_value": { + "type": "Node3D" + }, + "arguments": [ + { + "name": "state", + "type": "GLTFState" + }, + { + "name": "gltf_node", + "type": "GLTFNode" + }, + { + "name": "scene_parent", + "type": "Node" + } + ] + }, { "name": "_import_node", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 4064279746, "return_value": { "type": "enum::Error" }, @@ -106910,8 +111184,10 @@ "name": "_import_post", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 295478427, "return_value": { "type": "enum::Error" }, @@ -106930,8 +111206,10 @@ "name": "_export_preflight", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 295478427, "return_value": { "type": "enum::Error" }, @@ -106950,8 +111228,10 @@ "name": "_convert_scene_node", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 147612932, "arguments": [ { "name": "state", @@ -106967,12 +111247,36 @@ } ] }, + { + "name": "_export_post_convert", + "is_const": false, + "is_static": false, + "is_required": false, + "is_vararg": false, + "is_virtual": true, + "hash": 295478427, + "return_value": { + "type": "enum::Error" + }, + "arguments": [ + { + "name": "state", + "type": "GLTFState" + }, + { + "name": "root", + "type": "Node" + } + ] + }, { "name": "_export_preserialize", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1704600462, "return_value": { "type": "enum::Error" }, @@ -106983,12 +111287,54 @@ } ] }, + { + "name": "_export_object_model_property", + "is_const": false, + "is_static": false, + "is_required": false, + "is_vararg": false, + "is_virtual": true, + "hash": 4111022730, + "return_value": { + "type": "GLTFObjectModelProperty" + }, + "arguments": [ + { + "name": "state", + "type": "GLTFState" + }, + { + "name": "node_path", + "type": "NodePath" + }, + { + "name": "godot_node", + "type": "Node" + }, + { + "name": "gltf_node_index", + "type": "int", + "meta": "int32" + }, + { + "name": "target_object", + "type": "Object" + }, + { + "name": "target_depth", + "type": "int", + "meta": "int32" + } + ] + }, { "name": "_get_saveable_image_formats", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 2981934095, "return_value": { "type": "PackedStringArray" } @@ -106997,8 +111343,10 @@ "name": "_serialize_image_to_bytes", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 276886664, "return_value": { "type": "PackedByteArray" }, @@ -107030,8 +111378,10 @@ "name": "_save_image_at_path", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1844337242, "return_value": { "type": "enum::Error" }, @@ -107063,8 +111413,10 @@ "name": "_serialize_texture_json", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 2565166506, "return_value": { "type": "enum::Error" }, @@ -107091,8 +111443,10 @@ "name": "_export_node", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 4064279746, "return_value": { "type": "enum::Error" }, @@ -107119,8 +111473,10 @@ "name": "_export_post", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1704600462, "return_value": { "type": "enum::Error" }, @@ -107925,6 +112281,21 @@ } ] }, + { + "name": "append_child_index", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1286410249, + "arguments": [ + { + "name": "child_index", + "type": "int", + "meta": "int32" + } + ] + }, { "name": "get_light", "is_const": false, @@ -107986,6 +112357,28 @@ "type": "Variant" } ] + }, + { + "name": "get_scene_node_path", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 573359477, + "return_value": { + "type": "NodePath" + }, + "arguments": [ + { + "name": "gltf_state", + "type": "GLTFState" + }, + { + "name": "handle_skeletons", + "type": "bool", + "default_value": "true" + } + ] } ], "properties": [ @@ -108069,6 +112462,338 @@ } ] }, + { + "name": "GLTFObjectModelProperty", + "is_refcounted": true, + "is_instantiable": true, + "inherits": "RefCounted", + "api_type": "core", + "enums": [ + { + "name": "GLTFObjectModelType", + "is_bitfield": false, + "values": [ + { + "name": "GLTF_OBJECT_MODEL_TYPE_UNKNOWN", + "value": 0 + }, + { + "name": "GLTF_OBJECT_MODEL_TYPE_BOOL", + "value": 1 + }, + { + "name": "GLTF_OBJECT_MODEL_TYPE_FLOAT", + "value": 2 + }, + { + "name": "GLTF_OBJECT_MODEL_TYPE_FLOAT_ARRAY", + "value": 3 + }, + { + "name": "GLTF_OBJECT_MODEL_TYPE_FLOAT2", + "value": 4 + }, + { + "name": "GLTF_OBJECT_MODEL_TYPE_FLOAT3", + "value": 5 + }, + { + "name": "GLTF_OBJECT_MODEL_TYPE_FLOAT4", + "value": 6 + }, + { + "name": "GLTF_OBJECT_MODEL_TYPE_FLOAT2X2", + "value": 7 + }, + { + "name": "GLTF_OBJECT_MODEL_TYPE_FLOAT3X3", + "value": 8 + }, + { + "name": "GLTF_OBJECT_MODEL_TYPE_FLOAT4X4", + "value": 9 + }, + { + "name": "GLTF_OBJECT_MODEL_TYPE_INT", + "value": 10 + } + ] + } + ], + "methods": [ + { + "name": "append_node_path", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1348162250, + "arguments": [ + { + "name": "node_path", + "type": "NodePath" + } + ] + }, + { + "name": "append_path_to_property", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1331931644, + "arguments": [ + { + "name": "node_path", + "type": "NodePath" + }, + { + "name": "prop_name", + "type": "StringName" + } + ] + }, + { + "name": "get_accessor_type", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1998183368, + "return_value": { + "type": "enum::GLTFAccessor.GLTFAccessorType" + } + }, + { + "name": "get_gltf_to_godot_expression", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 2240072449, + "return_value": { + "type": "Expression" + } + }, + { + "name": "set_gltf_to_godot_expression", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1815845073, + "arguments": [ + { + "name": "gltf_to_godot_expr", + "type": "Expression" + } + ] + }, + { + "name": "get_godot_to_gltf_expression", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 2240072449, + "return_value": { + "type": "Expression" + } + }, + { + "name": "set_godot_to_gltf_expression", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1815845073, + "arguments": [ + { + "name": "godot_to_gltf_expr", + "type": "Expression" + } + ] + }, + { + "name": "get_node_paths", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3995934104, + "return_value": { + "type": "typedarray::NodePath" + } + }, + { + "name": "has_node_paths", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 36873697, + "return_value": { + "type": "bool" + } + }, + { + "name": "set_node_paths", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 381264803, + "arguments": [ + { + "name": "node_paths", + "type": "typedarray::NodePath" + } + ] + }, + { + "name": "get_object_model_type", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1094778507, + "return_value": { + "type": "enum::GLTFObjectModelProperty.GLTFObjectModelType" + } + }, + { + "name": "set_object_model_type", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 4108684086, + "arguments": [ + { + "name": "type", + "type": "enum::GLTFObjectModelProperty.GLTFObjectModelType" + } + ] + }, + { + "name": "get_json_pointers", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3995934104, + "return_value": { + "type": "typedarray::PackedStringArray" + } + }, + { + "name": "has_json_pointers", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 36873697, + "return_value": { + "type": "bool" + } + }, + { + "name": "set_json_pointers", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 381264803, + "arguments": [ + { + "name": "json_pointers", + "type": "typedarray::PackedStringArray" + } + ] + }, + { + "name": "get_variant_type", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3416842102, + "return_value": { + "type": "enum::Variant.Type" + } + }, + { + "name": "set_variant_type", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 2887708385, + "arguments": [ + { + "name": "variant_type", + "type": "enum::Variant.Type" + } + ] + }, + { + "name": "set_types", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 4150728237, + "arguments": [ + { + "name": "variant_type", + "type": "enum::Variant.Type" + }, + { + "name": "obj_model_type", + "type": "enum::GLTFObjectModelProperty.GLTFObjectModelType" + } + ] + } + ], + "properties": [ + { + "type": "Expression", + "name": "gltf_to_godot_expression", + "setter": "set_gltf_to_godot_expression", + "getter": "get_gltf_to_godot_expression" + }, + { + "type": "Expression", + "name": "godot_to_gltf_expression", + "setter": "set_godot_to_gltf_expression", + "getter": "get_godot_to_gltf_expression" + }, + { + "type": "Array", + "name": "node_paths", + "setter": "set_node_paths", + "getter": "get_node_paths" + }, + { + "type": "int", + "name": "object_model_type", + "setter": "set_object_model_type", + "getter": "get_object_model_type" + }, + { + "type": "PackedStringArray", + "name": "json_pointers", + "setter": "set_json_pointers", + "getter": "get_json_pointers" + }, + { + "type": "int", + "name": "variant_type", + "setter": "set_variant_type", + "getter": "get_variant_type" + } + ] + }, { "name": "GLTFPhysicsBody", "is_refcounted": true, @@ -109452,6 +114177,33 @@ } ] }, + { + "name": "append_gltf_node", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3562288551, + "return_value": { + "type": "int", + "meta": "int32" + }, + "arguments": [ + { + "name": "gltf_node", + "type": "GLTFNode" + }, + { + "name": "godot_scene_node", + "type": "Node" + }, + { + "name": "parent_node_index", + "type": "int", + "meta": "int32" + } + ] + }, { "name": "get_json", "is_const": false, @@ -111008,6 +115760,21 @@ } ] }, + { + "name": "request_particles_process", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 373806689, + "arguments": [ + { + "name": "process_time", + "type": "float", + "meta": "float" + } + ] + }, { "name": "is_emitting", "is_const": true, @@ -111260,7 +116027,17 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 3218959716 + "hash": 107499316, + "hash_compatibility": [ + 3218959716 + ], + "arguments": [ + { + "name": "keep_seed", + "type": "bool", + "default_value": "false" + } + ] }, { "name": "set_sub_emitter", @@ -111464,6 +116241,58 @@ "type": "float", "meta": "float" } + }, + { + "name": "set_use_fixed_seed", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 2586408642, + "arguments": [ + { + "name": "use_fixed_seed", + "type": "bool" + } + ] + }, + { + "name": "get_use_fixed_seed", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 36873697, + "return_value": { + "type": "bool" + } + }, + { + "name": "set_seed", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1286410249, + "arguments": [ + { + "name": "seed", + "type": "int", + "meta": "uint32" + } + ] + }, + { + "name": "get_seed", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3905245786, + "return_value": { + "type": "int", + "meta": "uint32" + } } ], "signals": [ @@ -111496,12 +116325,6 @@ "setter": "set_sub_emitter", "getter": "get_sub_emitter" }, - { - "type": "ParticleProcessMaterial,ShaderMaterial", - "name": "process_material", - "setter": "set_process_material", - "getter": "get_process_material" - }, { "type": "Texture2D", "name": "texture", @@ -111514,6 +116337,12 @@ "setter": "set_lifetime", "getter": "get_lifetime" }, + { + "type": "float", + "name": "interp_to_end", + "setter": "set_interp_to_end", + "getter": "get_interp_to_end" + }, { "type": "bool", "name": "one_shot", @@ -111544,6 +116373,18 @@ "setter": "set_randomness_ratio", "getter": "get_randomness_ratio" }, + { + "type": "bool", + "name": "use_fixed_seed", + "setter": "set_use_fixed_seed", + "getter": "get_use_fixed_seed" + }, + { + "type": "int", + "name": "seed", + "setter": "set_seed", + "getter": "get_seed" + }, { "type": "int", "name": "fixed_fps", @@ -111562,12 +116403,6 @@ "setter": "set_fractional_delta", "getter": "get_fractional_delta" }, - { - "type": "float", - "name": "interp_to_end", - "setter": "set_interp_to_end", - "getter": "get_interp_to_end" - }, { "type": "float", "name": "collision_base_size", @@ -111615,6 +116450,12 @@ "name": "trail_section_subdivisions", "setter": "set_trail_section_subdivisions", "getter": "get_trail_section_subdivisions" + }, + { + "type": "ParticleProcessMaterial,ShaderMaterial", + "name": "process_material", + "setter": "set_process_material", + "getter": "get_process_material" } ] }, @@ -112121,6 +116962,58 @@ "meta": "float" } }, + { + "name": "set_use_fixed_seed", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 2586408642, + "arguments": [ + { + "name": "use_fixed_seed", + "type": "bool" + } + ] + }, + { + "name": "get_use_fixed_seed", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 36873697, + "return_value": { + "type": "bool" + } + }, + { + "name": "set_seed", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1286410249, + "arguments": [ + { + "name": "seed", + "type": "int", + "meta": "uint32" + } + ] + }, + { + "name": "get_seed", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3905245786, + "return_value": { + "type": "int", + "meta": "uint32" + } + }, { "name": "set_draw_order", "is_const": false, @@ -112241,7 +117134,17 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 3218959716 + "hash": 107499316, + "hash_compatibility": [ + 3218959716 + ], + "arguments": [ + { + "name": "keep_seed", + "type": "bool", + "default_value": "false" + } + ] }, { "name": "capture_aabb", @@ -112427,6 +117330,21 @@ "type": "float", "meta": "float" } + }, + { + "name": "request_particles_process", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 373806689, + "arguments": [ + { + "name": "process_time", + "type": "float", + "meta": "float" + } + ] } ], "signals": [ @@ -112501,6 +117419,18 @@ "setter": "set_randomness_ratio", "getter": "get_randomness_ratio" }, + { + "type": "bool", + "name": "use_fixed_seed", + "setter": "set_use_fixed_seed", + "getter": "get_use_fixed_seed" + }, + { + "type": "int", + "name": "seed", + "setter": "set_seed", + "getter": "get_seed" + }, { "type": "int", "name": "fixed_fps", @@ -113129,6 +118059,70 @@ "type": "enum::GPUParticlesCollisionHeightField3D.UpdateMode" } }, + { + "name": "set_heightfield_mask", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1286410249, + "arguments": [ + { + "name": "heightfield_mask", + "type": "int", + "meta": "uint32" + } + ] + }, + { + "name": "get_heightfield_mask", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3905245786, + "return_value": { + "type": "int", + "meta": "uint32" + } + }, + { + "name": "set_heightfield_mask_value", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 300928843, + "arguments": [ + { + "name": "layer_number", + "type": "int", + "meta": "int32" + }, + { + "name": "value", + "type": "bool" + } + ] + }, + { + "name": "get_heightfield_mask_value", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1116898809, + "return_value": { + "type": "bool" + }, + "arguments": [ + { + "name": "layer_number", + "type": "int", + "meta": "int32" + } + ] + }, { "name": "set_follow_camera_enabled", "is_const": false, @@ -113179,6 +118173,12 @@ "name": "follow_camera_enabled", "setter": "set_follow_camera_enabled", "getter": "is_follow_camera_enabled" + }, + { + "type": "int", + "name": "heightfield_mask", + "setter": "set_heightfield_mask", + "getter": "get_heightfield_mask" } ] }, @@ -114439,6 +119439,27 @@ "type": "PackedVector2Array" } ] + }, + { + "name": "bresenham_line", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1989391000, + "return_value": { + "type": "typedarray::Vector2i" + }, + "arguments": [ + { + "name": "from", + "type": "Vector2i" + }, + { + "name": "to", + "type": "Vector2i" + } + ] } ] }, @@ -115277,6 +120298,33 @@ "meta": "float" } }, + { + "name": "set_lightmap_texel_scale", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 373806689, + "arguments": [ + { + "name": "scale", + "type": "float", + "meta": "float" + } + ] + }, + { + "name": "get_lightmap_texel_scale", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1740695150, + "return_value": { + "type": "float", + "meta": "float" + } + }, { "name": "set_lightmap_scale", "is_const": false, @@ -115433,6 +120481,12 @@ "setter": "set_gi_mode", "getter": "get_gi_mode" }, + { + "type": "float", + "name": "gi_lightmap_texel_scale", + "setter": "set_lightmap_texel_scale", + "getter": "get_lightmap_texel_scale" + }, { "type": "int", "name": "gi_lightmap_scale", @@ -116204,8 +121258,10 @@ "name": "_is_in_input_hotzone", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1779768129, "return_value": { "type": "bool" }, @@ -116229,8 +121285,10 @@ "name": "_is_in_output_hotzone", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1779768129, "return_value": { "type": "bool" }, @@ -116254,8 +121312,10 @@ "name": "_get_connection_line", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3932192302, "return_value": { "type": "PackedVector2Array" }, @@ -116274,8 +121334,10 @@ "name": "_is_node_hover_valid", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 4216241294, "return_value": { "type": "bool" }, @@ -116306,7 +121368,10 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 195065850, + "hash": 1376144231, + "hash_compatibility": [ + 195065850 + ], "return_value": { "type": "enum::Error" }, @@ -116328,6 +121393,11 @@ "name": "to_port", "type": "int", "meta": "int32" + }, + { + "name": "keep_alive", + "type": "bool", + "default_value": "false" } ] }, @@ -116423,6 +121493,20 @@ } ] }, + { + "name": "set_connections", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 381264803, + "arguments": [ + { + "name": "connections", + "type": "typedarray::Dictionary" + } + ] + }, { "name": "get_connection_list", "is_const": true, @@ -116434,6 +121518,29 @@ "type": "typedarray::Dictionary" } }, + { + "name": "get_connection_count", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 861718734, + "return_value": { + "type": "int", + "meta": "int32" + }, + "arguments": [ + { + "name": "from_node", + "type": "StringName" + }, + { + "name": "from_port", + "type": "int", + "meta": "int32" + } + ] + }, { "name": "get_closest_connection_at_point", "is_const": true, @@ -117428,6 +122535,9 @@ { "name": "copy_nodes_request" }, + { + "name": "cut_nodes_request" + }, { "name": "paste_nodes_request" }, @@ -117470,7 +122580,7 @@ }, { "name": "new_rect", - "type": "Vector2" + "type": "Rect2" } ] }, @@ -117573,6 +122683,12 @@ "setter": "set_connection_lines_antialiased", "getter": "is_connection_lines_antialiased" }, + { + "type": "typedarray::27/0:", + "name": "connections", + "setter": "set_connections", + "getter": "get_connection_list" + }, { "type": "float", "name": "zoom", @@ -118095,8 +123211,10 @@ "name": "_draw_port", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 93366828, "arguments": [ { "name": "slot_index", @@ -119623,6 +124741,112 @@ } ] }, + { + "name": "GridMapEditorPlugin", + "is_refcounted": false, + "is_instantiable": true, + "inherits": "EditorPlugin", + "api_type": "editor", + "methods": [ + { + "name": "get_current_grid_map", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1184264483, + "return_value": { + "type": "GridMap" + } + }, + { + "name": "set_selection", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3659408297, + "arguments": [ + { + "name": "begin", + "type": "Vector3i" + }, + { + "name": "end", + "type": "Vector3i" + } + ] + }, + { + "name": "clear_selection", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3218959716 + }, + { + "name": "get_selection", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1068685055, + "return_value": { + "type": "AABB" + } + }, + { + "name": "has_selection", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 36873697, + "return_value": { + "type": "bool" + } + }, + { + "name": "get_selected_cells", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3995934104, + "return_value": { + "type": "Array" + } + }, + { + "name": "set_selected_palette_item", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 998575451, + "arguments": [ + { + "name": "item", + "type": "int", + "meta": "int32" + } + ] + }, + { + "name": "get_selected_palette_item", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3905245786, + "return_value": { + "type": "int", + "meta": "int32" + } + } + ] + }, { "name": "GrooveJoint2D", "is_refcounted": false, @@ -123231,8 +128455,10 @@ "name": "_get_recognized_extensions", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1139954409, "return_value": { "type": "PackedStringArray" } @@ -123241,8 +128467,10 @@ "name": "_load_image", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3760540541, "return_value": { "type": "enum::Error" }, @@ -124407,6 +129635,10 @@ { "name": "MOUSE_MODE_CONFINED_HIDDEN", "value": 4 + }, + { + "name": "MOUSE_MODE_MAX", + "value": 5 } ] }, @@ -126201,7 +131433,8 @@ "arguments": [ { "name": "unicode", - "type": "int" + "type": "int", + "meta": "char32" } ] }, @@ -126213,7 +131446,8 @@ "is_virtual": false, "hash": 3905245786, "return_value": { - "type": "int" + "type": "int", + "meta": "char32" } }, { @@ -127928,8 +133162,9 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 4100757082, + "hash": 1195233573, "hash_compatibility": [ + 4100757082, 573731101 ], "arguments": [ @@ -127941,7 +133176,7 @@ "name": "deadzone", "type": "float", "meta": "float", - "default_value": "0.5" + "default_value": "0.2" } ] }, @@ -128220,6 +133455,10 @@ { "name": "SELECT_MULTI", "value": 1 + }, + { + "name": "SELECT_TOGGLE", + "value": 2 } ] } @@ -128430,6 +133669,43 @@ } ] }, + { + "name": "set_item_auto_translate_mode", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 287402019, + "arguments": [ + { + "name": "idx", + "type": "int", + "meta": "int32" + }, + { + "name": "mode", + "type": "enum::Node.AutoTranslateMode" + } + ] + }, + { + "name": "get_item_auto_translate_mode", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 906302372, + "return_value": { + "type": "enum::Node.AutoTranslateMode" + }, + "arguments": [ + { + "name": "idx", + "type": "int", + "meta": "int32" + } + ] + }, { "name": "set_item_icon_transposed", "is_const": false, @@ -129262,6 +134538,31 @@ "type": "bool" } }, + { + "name": "set_auto_width", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 2586408642, + "arguments": [ + { + "name": "enable", + "type": "bool" + } + ] + }, + { + "name": "has_auto_width", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 36873697, + "return_value": { + "type": "bool" + } + }, { "name": "set_auto_height", "is_const": false, @@ -129340,6 +134641,17 @@ "type": "VScrollBar" } }, + { + "name": "get_h_scroll_bar", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 4004517983, + "return_value": { + "type": "HScrollBar" + } + }, { "name": "set_text_overrun_behavior", "is_const": false, @@ -129365,6 +134677,31 @@ "type": "enum::TextServer.OverrunBehavior" } }, + { + "name": "set_wraparound_items", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 2586408642, + "arguments": [ + { + "name": "enable", + "type": "bool" + } + ] + }, + { + "name": "has_wraparound_items", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 36873697, + "return_value": { + "type": "bool" + } + }, { "name": "force_update_list_size", "is_const": false, @@ -129468,6 +134805,12 @@ "setter": "set_max_text_lines", "getter": "get_max_text_lines" }, + { + "type": "bool", + "name": "auto_width", + "setter": "set_auto_width", + "getter": "has_auto_width" + }, { "type": "bool", "name": "auto_height", @@ -129480,6 +134823,12 @@ "setter": "set_text_overrun_behavior", "getter": "get_text_overrun_behavior" }, + { + "type": "bool", + "name": "wraparound_items", + "setter": "set_wraparound_items", + "getter": "has_wraparound_items" + }, { "type": "int", "name": "item_count", @@ -129672,54 +135021,44 @@ } }, { - "name": "to_native", + "name": "from_native", "is_const": false, "is_vararg": false, "is_static": true, "is_virtual": false, - "hash": 3194344696, + "hash": 2963479484, "return_value": { "type": "Variant" }, "arguments": [ { - "name": "json", + "name": "variant", "type": "Variant" }, { - "name": "allow_classes", - "type": "bool", - "default_value": "false" - }, - { - "name": "allow_scripts", + "name": "full_objects", "type": "bool", "default_value": "false" } ] }, { - "name": "from_native", + "name": "to_native", "is_const": false, "is_vararg": false, "is_static": true, "is_virtual": false, - "hash": 3194344696, + "hash": 2963479484, "return_value": { "type": "Variant" }, "arguments": [ { - "name": "variant", + "name": "json", "type": "Variant" }, { - "name": "allow_classes", - "type": "bool", - "default_value": "false" - }, - { - "name": "allow_scripts", + "name": "allow_objects", "type": "bool", "default_value": "false" } @@ -129988,6 +135327,17 @@ "type": "String" } ] + }, + { + "name": "get_exception", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3277089691, + "return_value": { + "type": "JavaObject" + } } ] }, @@ -130074,6 +135424,40 @@ } ] }, + { + "name": "is_js_buffer", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 821968997, + "return_value": { + "type": "bool" + }, + "arguments": [ + { + "name": "javascript_object", + "type": "JavaScriptObject" + } + ] + }, + { + "name": "js_buffer_to_packed_byte_array", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 64409880, + "return_value": { + "type": "PackedByteArray" + }, + "arguments": [ + { + "name": "javascript_buffer", + "type": "JavaScriptObject" + } + ] + }, { "name": "create_object", "is_const": false, @@ -131030,6 +136414,31 @@ "type": "String" } }, + { + "name": "set_paragraph_separator", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 83702148, + "arguments": [ + { + "name": "paragraph_separator", + "type": "String" + } + ] + }, + { + "name": "get_paragraph_separator", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 201670096, + "return_value": { + "type": "String" + } + }, { "name": "set_autowrap_mode", "is_const": false, @@ -131500,6 +136909,12 @@ "setter": "set_justification_flags", "getter": "get_justification_flags" }, + { + "type": "String", + "name": "paragraph_separator", + "setter": "set_paragraph_separator", + "getter": "get_paragraph_separator" + }, { "type": "bool", "name": "clip_text", @@ -132643,6 +138058,33 @@ "meta": "float" } }, + { + "name": "set_paragraph_spacing", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 373806689, + "arguments": [ + { + "name": "spacing", + "type": "float", + "meta": "float" + } + ] + }, + { + "name": "get_paragraph_spacing", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1740695150, + "return_value": { + "type": "float", + "meta": "float" + } + }, { "name": "set_font", "is_const": false, @@ -132857,6 +138299,12 @@ "setter": "set_line_spacing", "getter": "get_line_spacing" }, + { + "type": "float", + "name": "paragraph_spacing", + "setter": "set_paragraph_spacing", + "getter": "get_paragraph_spacing" + }, { "type": "Font", "name": "font", @@ -133880,6 +139328,33 @@ "type": "bool" } }, + { + "name": "set_shadow_caster_mask", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1286410249, + "arguments": [ + { + "name": "caster_mask", + "type": "int", + "meta": "uint32" + } + ] + }, + { + "name": "get_shadow_caster_mask", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3905245786, + "return_value": { + "type": "int", + "meta": "uint32" + } + }, { "name": "set_bake_mode", "is_const": false, @@ -134018,7 +139493,7 @@ "index": 2 }, { - "type": "Texture2D", + "type": "Texture2D,-AnimatedTexture,-AtlasTexture,-CameraTexture,-CanvasTexture,-MeshTexture,-Texture2DRD,-ViewportTexture", "name": "light_projector", "setter": "set_projector", "getter": "get_projector" @@ -134109,6 +139584,12 @@ "getter": "get_param", "index": 18 }, + { + "type": "int", + "name": "shadow_caster_mask", + "setter": "set_shadow_caster_mask", + "getter": "get_shadow_caster_mask" + }, { "type": "bool", "name": "distance_fade_enabled", @@ -134692,6 +140173,58 @@ "meta": "int32" } }, + { + "name": "set_supersampling_enabled", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 2586408642, + "arguments": [ + { + "name": "enable", + "type": "bool" + } + ] + }, + { + "name": "is_supersampling_enabled", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 36873697, + "return_value": { + "type": "bool" + } + }, + { + "name": "set_supersampling_factor", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 373806689, + "arguments": [ + { + "name": "factor", + "type": "float", + "meta": "float" + } + ] + }, + { + "name": "get_supersampling_factor", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1740695150, + "return_value": { + "type": "float", + "meta": "float" + } + }, { "name": "set_use_denoiser", "is_const": false, @@ -134821,6 +140354,31 @@ "type": "bool" } }, + { + "name": "set_shadowmask_mode", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3451066572, + "arguments": [ + { + "name": "mode", + "type": "enum::LightmapGIData.ShadowmaskMode" + } + ] + }, + { + "name": "get_shadowmask_mode", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 785478560, + "return_value": { + "type": "enum::LightmapGIData.ShadowmaskMode" + } + }, { "name": "set_use_texture_for_bounces", "is_const": false, @@ -134879,6 +140437,18 @@ "setter": "set_bake_quality", "getter": "get_bake_quality" }, + { + "type": "bool", + "name": "supersampling", + "setter": "set_supersampling_enabled", + "getter": "is_supersampling_enabled" + }, + { + "type": "float", + "name": "supersampling_factor", + "setter": "set_supersampling_factor", + "getter": "get_supersampling_factor" + }, { "type": "int", "name": "bounces", @@ -134897,6 +140467,12 @@ "setter": "set_directional", "getter": "is_directional" }, + { + "type": "int", + "name": "shadowmask_mode", + "setter": "set_shadowmask_mode", + "getter": "get_shadowmask_mode" + }, { "type": "bool", "name": "use_texture_for_bounces", @@ -134995,6 +140571,26 @@ "is_instantiable": true, "inherits": "Resource", "api_type": "core", + "enums": [ + { + "name": "ShadowmaskMode", + "is_bitfield": false, + "values": [ + { + "name": "SHADOWMASK_MODE_NONE", + "value": 0 + }, + { + "name": "SHADOWMASK_MODE_REPLACE", + "value": 1 + }, + { + "name": "SHADOWMASK_MODE_OVERLAY", + "value": 2 + } + ] + } + ], "methods": [ { "name": "set_lightmap_textures", @@ -135021,6 +140617,31 @@ "type": "typedarray::TextureLayered" } }, + { + "name": "set_shadowmask_textures", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 381264803, + "arguments": [ + { + "name": "shadowmask_textures", + "type": "typedarray::TextureLayered" + } + ] + }, + { + "name": "get_shadowmask_textures", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3995934104, + "return_value": { + "type": "typedarray::TextureLayered" + } + }, { "name": "set_uses_spherical_harmonics", "is_const": false, @@ -135145,6 +140766,12 @@ "setter": "set_lightmap_textures", "getter": "get_lightmap_textures" }, + { + "type": "typedarray::TextureLayered", + "name": "shadowmask_textures", + "setter": "set_shadowmask_textures", + "getter": "get_shadowmask_textures" + }, { "type": "bool", "name": "uses_spherical_harmonics", @@ -135932,8 +141559,12 @@ "value": 29 }, { - "name": "MENU_MAX", + "name": "MENU_EMOJI_AND_SYMBOL", "value": 30 + }, + { + "name": "MENU_MAX", + "value": 31 } ] }, @@ -135977,6 +141608,33 @@ } ], "methods": [ + { + "name": "has_ime_text", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 36873697, + "return_value": { + "type": "bool" + } + }, + { + "name": "cancel_ime", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3218959716 + }, + { + "name": "apply_ime", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3218959716 + }, { "name": "set_horizontal_alignment", "is_const": false, @@ -136002,6 +141660,58 @@ "type": "enum::HorizontalAlignment" } }, + { + "name": "edit", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3218959716 + }, + { + "name": "unedit", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3218959716 + }, + { + "name": "is_editing", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 36873697, + "return_value": { + "type": "bool" + } + }, + { + "name": "set_keep_editing_on_text_submit", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 2586408642, + "arguments": [ + { + "name": "enable", + "type": "bool" + } + ] + }, + { + "name": "is_editing_kept_on_text_submit", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 36873697, + "return_value": { + "type": "bool" + } + }, { "name": "clear", "is_const": false, @@ -136048,6 +141758,28 @@ "is_virtual": false, "hash": 3218959716 }, + { + "name": "has_undo", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 36873697, + "return_value": { + "type": "bool" + } + }, + { + "name": "has_redo", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 36873697, + "return_value": { + "type": "bool" + } + }, { "name": "has_selection", "is_const": true, @@ -136641,6 +142373,31 @@ "type": "bool" } }, + { + "name": "set_emoji_menu_enabled", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 2586408642, + "arguments": [ + { + "name": "enable", + "type": "bool" + } + ] + }, + { + "name": "is_emoji_menu_enabled", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 36873697, + "return_value": { + "type": "bool" + } + }, { "name": "set_virtual_keyboard_enabled", "is_const": false, @@ -136944,6 +142701,15 @@ "type": "String" } ] + }, + { + "name": "editing_toggled", + "arguments": [ + { + "name": "toggled_on", + "type": "bool" + } + ] } ], "properties": [ @@ -136977,6 +142743,12 @@ "setter": "set_editable", "getter": "is_editable" }, + { + "type": "bool", + "name": "keep_editing_on_text_submit", + "setter": "set_keep_editing_on_text_submit", + "getter": "is_editing_kept_on_text_submit" + }, { "type": "bool", "name": "expand_to_text_length", @@ -136989,6 +142761,12 @@ "setter": "set_context_menu_enabled", "getter": "is_context_menu_enabled" }, + { + "type": "bool", + "name": "emoji_menu_enabled", + "setter": "set_emoji_menu_enabled", + "getter": "is_emoji_menu_enabled" + }, { "type": "bool", "name": "virtual_keyboard_enabled", @@ -137377,6 +143155,1002 @@ } ] }, + { + "name": "LookAtModifier3D", + "is_refcounted": false, + "is_instantiable": true, + "inherits": "SkeletonModifier3D", + "api_type": "core", + "enums": [ + { + "name": "OriginFrom", + "is_bitfield": false, + "values": [ + { + "name": "ORIGIN_FROM_SELF", + "value": 0 + }, + { + "name": "ORIGIN_FROM_SPECIFIC_BONE", + "value": 1 + }, + { + "name": "ORIGIN_FROM_EXTERNAL_NODE", + "value": 2 + } + ] + } + ], + "methods": [ + { + "name": "set_target_node", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1348162250, + "arguments": [ + { + "name": "target_node", + "type": "NodePath" + } + ] + }, + { + "name": "get_target_node", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 4075236667, + "return_value": { + "type": "NodePath" + } + }, + { + "name": "set_bone_name", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 83702148, + "arguments": [ + { + "name": "bone_name", + "type": "String" + } + ] + }, + { + "name": "get_bone_name", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 201670096, + "return_value": { + "type": "String" + } + }, + { + "name": "set_bone", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1286410249, + "arguments": [ + { + "name": "bone", + "type": "int", + "meta": "int32" + } + ] + }, + { + "name": "get_bone", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3905245786, + "return_value": { + "type": "int", + "meta": "int32" + } + }, + { + "name": "set_forward_axis", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3199955933, + "arguments": [ + { + "name": "forward_axis", + "type": "enum::SkeletonModifier3D.BoneAxis" + } + ] + }, + { + "name": "get_forward_axis", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 4076020284, + "return_value": { + "type": "enum::SkeletonModifier3D.BoneAxis" + } + }, + { + "name": "set_primary_rotation_axis", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1144690656, + "arguments": [ + { + "name": "axis", + "type": "enum::Vector3.Axis" + } + ] + }, + { + "name": "get_primary_rotation_axis", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3050976882, + "return_value": { + "type": "enum::Vector3.Axis" + } + }, + { + "name": "set_use_secondary_rotation", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 2586408642, + "arguments": [ + { + "name": "enabled", + "type": "bool" + } + ] + }, + { + "name": "is_using_secondary_rotation", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 36873697, + "return_value": { + "type": "bool" + } + }, + { + "name": "set_origin_safe_margin", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 373806689, + "arguments": [ + { + "name": "margin", + "type": "float", + "meta": "float" + } + ] + }, + { + "name": "get_origin_safe_margin", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1740695150, + "return_value": { + "type": "float", + "meta": "float" + } + }, + { + "name": "set_origin_from", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 4254695669, + "arguments": [ + { + "name": "origin_from", + "type": "enum::LookAtModifier3D.OriginFrom" + } + ] + }, + { + "name": "get_origin_from", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 4057166297, + "return_value": { + "type": "enum::LookAtModifier3D.OriginFrom" + } + }, + { + "name": "set_origin_bone_name", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 83702148, + "arguments": [ + { + "name": "bone_name", + "type": "String" + } + ] + }, + { + "name": "get_origin_bone_name", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 201670096, + "return_value": { + "type": "String" + } + }, + { + "name": "set_origin_bone", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1286410249, + "arguments": [ + { + "name": "bone", + "type": "int", + "meta": "int32" + } + ] + }, + { + "name": "get_origin_bone", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3905245786, + "return_value": { + "type": "int", + "meta": "int32" + } + }, + { + "name": "set_origin_external_node", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1348162250, + "arguments": [ + { + "name": "external_node", + "type": "NodePath" + } + ] + }, + { + "name": "get_origin_external_node", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 4075236667, + "return_value": { + "type": "NodePath" + } + }, + { + "name": "set_origin_offset", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3460891852, + "arguments": [ + { + "name": "offset", + "type": "Vector3" + } + ] + }, + { + "name": "get_origin_offset", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3360562783, + "return_value": { + "type": "Vector3" + } + }, + { + "name": "set_duration", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 373806689, + "arguments": [ + { + "name": "duration", + "type": "float", + "meta": "float" + } + ] + }, + { + "name": "get_duration", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1740695150, + "return_value": { + "type": "float", + "meta": "float" + } + }, + { + "name": "set_transition_type", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1058637742, + "arguments": [ + { + "name": "transition_type", + "type": "enum::Tween.TransitionType" + } + ] + }, + { + "name": "get_transition_type", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3842314528, + "return_value": { + "type": "enum::Tween.TransitionType" + } + }, + { + "name": "set_ease_type", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1208105857, + "arguments": [ + { + "name": "ease_type", + "type": "enum::Tween.EaseType" + } + ] + }, + { + "name": "get_ease_type", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 631880200, + "return_value": { + "type": "enum::Tween.EaseType" + } + }, + { + "name": "set_use_angle_limitation", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 2586408642, + "arguments": [ + { + "name": "enabled", + "type": "bool" + } + ] + }, + { + "name": "is_using_angle_limitation", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 36873697, + "return_value": { + "type": "bool" + } + }, + { + "name": "set_symmetry_limitation", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 2586408642, + "arguments": [ + { + "name": "enabled", + "type": "bool" + } + ] + }, + { + "name": "is_limitation_symmetry", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 36873697, + "return_value": { + "type": "bool" + } + }, + { + "name": "set_primary_limit_angle", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 373806689, + "arguments": [ + { + "name": "angle", + "type": "float", + "meta": "float" + } + ] + }, + { + "name": "get_primary_limit_angle", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1740695150, + "return_value": { + "type": "float", + "meta": "float" + } + }, + { + "name": "set_primary_damp_threshold", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 373806689, + "arguments": [ + { + "name": "power", + "type": "float", + "meta": "float" + } + ] + }, + { + "name": "get_primary_damp_threshold", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1740695150, + "return_value": { + "type": "float", + "meta": "float" + } + }, + { + "name": "set_primary_positive_limit_angle", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 373806689, + "arguments": [ + { + "name": "angle", + "type": "float", + "meta": "float" + } + ] + }, + { + "name": "get_primary_positive_limit_angle", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1740695150, + "return_value": { + "type": "float", + "meta": "float" + } + }, + { + "name": "set_primary_positive_damp_threshold", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 373806689, + "arguments": [ + { + "name": "power", + "type": "float", + "meta": "float" + } + ] + }, + { + "name": "get_primary_positive_damp_threshold", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1740695150, + "return_value": { + "type": "float", + "meta": "float" + } + }, + { + "name": "set_primary_negative_limit_angle", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 373806689, + "arguments": [ + { + "name": "angle", + "type": "float", + "meta": "float" + } + ] + }, + { + "name": "get_primary_negative_limit_angle", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1740695150, + "return_value": { + "type": "float", + "meta": "float" + } + }, + { + "name": "set_primary_negative_damp_threshold", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 373806689, + "arguments": [ + { + "name": "power", + "type": "float", + "meta": "float" + } + ] + }, + { + "name": "get_primary_negative_damp_threshold", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1740695150, + "return_value": { + "type": "float", + "meta": "float" + } + }, + { + "name": "set_secondary_limit_angle", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 373806689, + "arguments": [ + { + "name": "angle", + "type": "float", + "meta": "float" + } + ] + }, + { + "name": "get_secondary_limit_angle", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1740695150, + "return_value": { + "type": "float", + "meta": "float" + } + }, + { + "name": "set_secondary_damp_threshold", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 373806689, + "arguments": [ + { + "name": "power", + "type": "float", + "meta": "float" + } + ] + }, + { + "name": "get_secondary_damp_threshold", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1740695150, + "return_value": { + "type": "float", + "meta": "float" + } + }, + { + "name": "set_secondary_positive_limit_angle", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 373806689, + "arguments": [ + { + "name": "angle", + "type": "float", + "meta": "float" + } + ] + }, + { + "name": "get_secondary_positive_limit_angle", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1740695150, + "return_value": { + "type": "float", + "meta": "float" + } + }, + { + "name": "set_secondary_positive_damp_threshold", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 373806689, + "arguments": [ + { + "name": "power", + "type": "float", + "meta": "float" + } + ] + }, + { + "name": "get_secondary_positive_damp_threshold", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1740695150, + "return_value": { + "type": "float", + "meta": "float" + } + }, + { + "name": "set_secondary_negative_limit_angle", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 373806689, + "arguments": [ + { + "name": "angle", + "type": "float", + "meta": "float" + } + ] + }, + { + "name": "get_secondary_negative_limit_angle", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1740695150, + "return_value": { + "type": "float", + "meta": "float" + } + }, + { + "name": "set_secondary_negative_damp_threshold", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 373806689, + "arguments": [ + { + "name": "power", + "type": "float", + "meta": "float" + } + ] + }, + { + "name": "get_secondary_negative_damp_threshold", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1740695150, + "return_value": { + "type": "float", + "meta": "float" + } + }, + { + "name": "get_interpolation_remaining", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1740695150, + "return_value": { + "type": "float", + "meta": "float" + } + }, + { + "name": "is_interpolating", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 36873697, + "return_value": { + "type": "bool" + } + }, + { + "name": "is_target_within_limitation", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 36873697, + "return_value": { + "type": "bool" + } + } + ], + "properties": [ + { + "type": "NodePath", + "name": "target_node", + "setter": "set_target_node", + "getter": "get_target_node" + }, + { + "type": "String", + "name": "bone_name", + "setter": "set_bone_name", + "getter": "get_bone_name" + }, + { + "type": "int", + "name": "bone", + "setter": "set_bone", + "getter": "get_bone" + }, + { + "type": "int", + "name": "forward_axis", + "setter": "set_forward_axis", + "getter": "get_forward_axis" + }, + { + "type": "int", + "name": "primary_rotation_axis", + "setter": "set_primary_rotation_axis", + "getter": "get_primary_rotation_axis" + }, + { + "type": "bool", + "name": "use_secondary_rotation", + "setter": "set_use_secondary_rotation", + "getter": "is_using_secondary_rotation" + }, + { + "type": "int", + "name": "origin_from", + "setter": "set_origin_from", + "getter": "get_origin_from" + }, + { + "type": "String", + "name": "origin_bone_name", + "setter": "set_origin_bone_name", + "getter": "get_origin_bone_name" + }, + { + "type": "int", + "name": "origin_bone", + "setter": "set_origin_bone", + "getter": "get_origin_bone" + }, + { + "type": "NodePath", + "name": "origin_external_node", + "setter": "set_origin_external_node", + "getter": "get_origin_external_node" + }, + { + "type": "Vector3", + "name": "origin_offset", + "setter": "set_origin_offset", + "getter": "get_origin_offset" + }, + { + "type": "float", + "name": "origin_safe_margin", + "setter": "set_origin_safe_margin", + "getter": "get_origin_safe_margin" + }, + { + "type": "float", + "name": "duration", + "setter": "set_duration", + "getter": "get_duration" + }, + { + "type": "int", + "name": "transition_type", + "setter": "set_transition_type", + "getter": "get_transition_type" + }, + { + "type": "int", + "name": "ease_type", + "setter": "set_ease_type", + "getter": "get_ease_type" + }, + { + "type": "bool", + "name": "use_angle_limitation", + "setter": "set_use_angle_limitation", + "getter": "is_using_angle_limitation" + }, + { + "type": "bool", + "name": "symmetry_limitation", + "setter": "set_symmetry_limitation", + "getter": "is_limitation_symmetry" + }, + { + "type": "float", + "name": "primary_limit_angle", + "setter": "set_primary_limit_angle", + "getter": "get_primary_limit_angle" + }, + { + "type": "float", + "name": "primary_damp_threshold", + "setter": "set_primary_damp_threshold", + "getter": "get_primary_damp_threshold" + }, + { + "type": "float", + "name": "primary_positive_limit_angle", + "setter": "set_primary_positive_limit_angle", + "getter": "get_primary_positive_limit_angle" + }, + { + "type": "float", + "name": "primary_positive_damp_threshold", + "setter": "set_primary_positive_damp_threshold", + "getter": "get_primary_positive_damp_threshold" + }, + { + "type": "float", + "name": "primary_negative_limit_angle", + "setter": "set_primary_negative_limit_angle", + "getter": "get_primary_negative_limit_angle" + }, + { + "type": "float", + "name": "primary_negative_damp_threshold", + "setter": "set_primary_negative_damp_threshold", + "getter": "get_primary_negative_damp_threshold" + }, + { + "type": "float", + "name": "secondary_limit_angle", + "setter": "set_secondary_limit_angle", + "getter": "get_secondary_limit_angle" + }, + { + "type": "float", + "name": "secondary_damp_threshold", + "setter": "set_secondary_damp_threshold", + "getter": "get_secondary_damp_threshold" + }, + { + "type": "float", + "name": "secondary_positive_limit_angle", + "setter": "set_secondary_positive_limit_angle", + "getter": "get_secondary_positive_limit_angle" + }, + { + "type": "float", + "name": "secondary_positive_damp_threshold", + "setter": "set_secondary_positive_damp_threshold", + "getter": "get_secondary_positive_damp_threshold" + }, + { + "type": "float", + "name": "secondary_negative_limit_angle", + "setter": "set_secondary_negative_limit_angle", + "getter": "get_secondary_negative_limit_angle" + }, + { + "type": "float", + "name": "secondary_negative_damp_threshold", + "setter": "set_secondary_negative_damp_threshold", + "getter": "get_secondary_negative_damp_threshold" + } + ] + }, { "name": "MainLoop", "is_refcounted": false, @@ -137430,15 +144204,19 @@ "name": "_initialize", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, - "is_virtual": true + "is_virtual": true, + "hash": 3218959716 }, { "name": "_physics_process", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 330693286, "return_value": { "type": "bool" }, @@ -137454,8 +144232,10 @@ "name": "_process", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 330693286, "return_value": { "type": "bool" }, @@ -137471,8 +144251,10 @@ "name": "_finalize", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, - "is_virtual": true + "is_virtual": true, + "hash": 3218959716 } ], "signals": [ @@ -137728,8 +144510,10 @@ "name": "_get_shader_rid", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2944877500, "return_value": { "type": "RID" } @@ -137738,8 +144522,10 @@ "name": "_get_shader_mode", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3392948163, "return_value": { "type": "enum::Shader.Mode" } @@ -137748,8 +144534,10 @@ "name": "_can_do_next_pass", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 36873697, "return_value": { "type": "bool" } @@ -137758,8 +144546,10 @@ "name": "_can_use_render_priority", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 36873697, "return_value": { "type": "bool" } @@ -138637,8 +145427,10 @@ "name": "_get_surface_count", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3905245786, "return_value": { "type": "int", "meta": "int32" @@ -138648,8 +145440,10 @@ "name": "_surface_get_array_len", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 923996154, "return_value": { "type": "int", "meta": "int32" @@ -138666,8 +145460,10 @@ "name": "_surface_get_array_index_len", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 923996154, "return_value": { "type": "int", "meta": "int32" @@ -138684,8 +145480,10 @@ "name": "_surface_get_arrays", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 663333327, "return_value": { "type": "Array" }, @@ -138701,8 +145499,10 @@ "name": "_surface_get_blend_shape_arrays", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 663333327, "return_value": { "type": "typedarray::Array" }, @@ -138718,8 +145518,10 @@ "name": "_surface_get_lods", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3485342025, "return_value": { "type": "Dictionary" }, @@ -138735,8 +145537,10 @@ "name": "_surface_get_format", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 923996154, "return_value": { "type": "int", "meta": "uint32" @@ -138753,8 +145557,10 @@ "name": "_surface_get_primitive_type", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 923996154, "return_value": { "type": "int", "meta": "uint32" @@ -138771,8 +145577,10 @@ "name": "_surface_set_material", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3671737478, "arguments": [ { "name": "index", @@ -138789,8 +145597,10 @@ "name": "_surface_get_material", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2897466400, "return_value": { "type": "Material" }, @@ -138806,8 +145616,10 @@ "name": "_get_blend_shape_count", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3905245786, "return_value": { "type": "int", "meta": "int32" @@ -138817,8 +145629,10 @@ "name": "_get_blend_shape_name", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 659327637, "return_value": { "type": "StringName" }, @@ -138834,8 +145648,10 @@ "name": "_set_blend_shape_name", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3780747571, "arguments": [ { "name": "index", @@ -138852,8 +145668,10 @@ "name": "_get_aabb", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1068685055, "return_value": { "type": "AABB" } @@ -140706,6 +147524,25 @@ } ] }, + { + "name": "set_item_mesh_cast_shadow", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3923400443, + "arguments": [ + { + "name": "id", + "type": "int", + "meta": "int32" + }, + { + "name": "shadow_casting_setting", + "type": "enum::RenderingServer.ShadowCastingSetting" + } + ] + }, { "name": "set_item_navigation_mesh", "is_const": false, @@ -140856,6 +147693,24 @@ } ] }, + { + "name": "get_item_mesh_cast_shadow", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1841766007, + "return_value": { + "type": "enum::RenderingServer.ShadowCastingSetting" + }, + "arguments": [ + { + "name": "id", + "type": "int", + "meta": "int32" + } + ] + }, { "name": "get_item_navigation_mesh", "is_const": true, @@ -141705,8 +148560,10 @@ "name": "_get_audio_mix_rate", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3905245786, "return_value": { "type": "int", "meta": "uint32" @@ -141716,8 +148573,10 @@ "name": "_get_audio_speaker_mode", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2549190337, "return_value": { "type": "enum::AudioServer.SpeakerMode" } @@ -141726,8 +148585,10 @@ "name": "_handles_file", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3927539163, "return_value": { "type": "bool" }, @@ -141742,8 +148603,10 @@ "name": "_write_begin", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1866453460, "return_value": { "type": "enum::Error" }, @@ -141767,8 +148630,10 @@ "name": "_write_frame", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2784607037, "return_value": { "type": "enum::Error" }, @@ -141787,8 +148652,10 @@ "name": "_write_end", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, - "is_virtual": true + "is_virtual": true, + "hash": 3218959716 }, { "name": "add_writer", @@ -142748,8 +149615,10 @@ "name": "_poll", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 166280745, "return_value": { "type": "enum::Error" } @@ -142758,8 +149627,10 @@ "name": "_set_multiplayer_peer", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3694835298, "arguments": [ { "name": "multiplayer_peer", @@ -142771,8 +149642,10 @@ "name": "_get_multiplayer_peer", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3223692825, "return_value": { "type": "MultiplayerPeer" } @@ -142781,8 +149654,10 @@ "name": "_get_unique_id", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3905245786, "return_value": { "type": "int", "meta": "int32" @@ -142792,8 +149667,10 @@ "name": "_get_peer_ids", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1930428628, "return_value": { "type": "PackedInt32Array" } @@ -142802,8 +149679,10 @@ "name": "_rpc", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3673574758, "return_value": { "type": "enum::Error" }, @@ -142831,8 +149710,10 @@ "name": "_get_remote_sender_id", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3905245786, "return_value": { "type": "int", "meta": "int32" @@ -142842,8 +149723,10 @@ "name": "_object_configuration_add", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1171879464, "return_value": { "type": "enum::Error" }, @@ -142862,8 +149745,10 @@ "name": "_object_configuration_remove", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1171879464, "return_value": { "type": "enum::Error" }, @@ -143197,8 +150082,10 @@ "name": "_get_packet", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3099858825, "return_value": { "type": "enum::Error" }, @@ -143217,8 +150104,10 @@ "name": "_put_packet", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3099858825, "return_value": { "type": "enum::Error" }, @@ -143238,8 +150127,10 @@ "name": "_get_available_packet_count", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3905245786, "return_value": { "type": "int", "meta": "int32" @@ -143249,8 +150140,10 @@ "name": "_get_max_packet_size", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3905245786, "return_value": { "type": "int", "meta": "int32" @@ -143260,8 +150153,10 @@ "name": "_get_packet_script", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 2115431945, "return_value": { "type": "PackedByteArray" } @@ -143270,8 +150165,10 @@ "name": "_put_packet_script", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 680677267, "return_value": { "type": "enum::Error" }, @@ -143286,8 +150183,10 @@ "name": "_get_packet_channel", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3905245786, "return_value": { "type": "int", "meta": "int32" @@ -143297,8 +150196,10 @@ "name": "_get_packet_mode", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3369852622, "return_value": { "type": "enum::MultiplayerPeer.TransferMode" } @@ -143307,8 +150208,10 @@ "name": "_set_transfer_channel", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1286410249, "arguments": [ { "name": "p_channel", @@ -143321,8 +150224,10 @@ "name": "_get_transfer_channel", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3905245786, "return_value": { "type": "int", "meta": "int32" @@ -143332,8 +150237,10 @@ "name": "_set_transfer_mode", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 950411049, "arguments": [ { "name": "p_mode", @@ -143345,8 +150252,10 @@ "name": "_get_transfer_mode", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3369852622, "return_value": { "type": "enum::MultiplayerPeer.TransferMode" } @@ -143355,8 +150264,10 @@ "name": "_set_target_peer", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1286410249, "arguments": [ { "name": "p_peer", @@ -143369,8 +150280,10 @@ "name": "_get_packet_peer", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3905245786, "return_value": { "type": "int", "meta": "int32" @@ -143380,8 +150293,10 @@ "name": "_is_server", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 36873697, "return_value": { "type": "bool" } @@ -143390,22 +150305,28 @@ "name": "_poll", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, - "is_virtual": true + "is_virtual": true, + "hash": 3218959716 }, { "name": "_close", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, - "is_virtual": true + "is_virtual": true, + "hash": 3218959716 }, { "name": "_disconnect_peer", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 300928843, "arguments": [ { "name": "p_peer", @@ -143422,8 +150343,10 @@ "name": "_get_unique_id", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3905245786, "return_value": { "type": "int", "meta": "int32" @@ -143433,8 +150356,10 @@ "name": "_set_refuse_new_connections", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 2586408642, "arguments": [ { "name": "p_enable", @@ -143446,8 +150371,10 @@ "name": "_is_refusing_new_connections", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 36873697, "return_value": { "type": "bool" } @@ -143456,8 +150383,10 @@ "name": "_is_server_relay_supported", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 36873697, "return_value": { "type": "bool" } @@ -143466,8 +150395,10 @@ "name": "_get_connection_status", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2147374275, "return_value": { "type": "enum::MultiplayerPeer.ConnectionStatus" } @@ -144420,7 +151351,10 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 2553375659, + "hash": 980552939, + "hash_compatibility": [ + 2553375659 + ], "return_value": { "type": "int", "meta": "int32" @@ -144468,7 +151402,10 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 2553375659, + "hash": 980552939, + "hash_compatibility": [ + 2553375659 + ], "return_value": { "type": "int", "meta": "int32" @@ -144516,7 +151453,10 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 2987595282, + "hash": 1372188274, + "hash_compatibility": [ + 2987595282 + ], "return_value": { "type": "int", "meta": "int32" @@ -144568,7 +151508,10 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 2987595282, + "hash": 1372188274, + "hash_compatibility": [ + 2987595282 + ], "return_value": { "type": "int", "meta": "int32" @@ -144620,7 +151563,10 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 2553375659, + "hash": 980552939, + "hash_compatibility": [ + 2553375659 + ], "return_value": { "type": "int", "meta": "int32" @@ -144668,7 +151614,10 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 2987595282, + "hash": 1372188274, + "hash_compatibility": [ + 2987595282 + ], "return_value": { "type": "int", "meta": "int32" @@ -144720,7 +151669,10 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 1558592568, + "hash": 2674635658, + "hash_compatibility": [ + 1558592568 + ], "return_value": { "type": "int", "meta": "int32" @@ -149834,9 +156786,10 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 685862123, + "hash": 3172802542, "hash_compatibility": [ - 3703028813 + 3703028813, + 685862123 ], "arguments": [ { @@ -149864,9 +156817,10 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 2469318639, + "hash": 1286748856, "hash_compatibility": [ - 3669016597 + 3669016597, + 2469318639 ], "arguments": [ { @@ -151074,6 +158028,10 @@ { "name": "PATH_POSTPROCESSING_EDGECENTERED", "value": 1 + }, + { + "name": "PATH_POSTPROCESSING_NONE", + "value": 2 } ] }, @@ -151420,6 +158378,10 @@ { "name": "PATH_POSTPROCESSING_EDGECENTERED", "value": 1 + }, + { + "name": "PATH_POSTPROCESSING_NONE", + "value": 2 } ] }, @@ -152985,6 +159947,17 @@ "return_value": { "type": "bool" } + }, + { + "name": "get_bounds", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1639390495, + "return_value": { + "type": "Rect2" + } } ], "signals": [ @@ -153306,6 +160279,17 @@ "return_value": { "type": "bool" } + }, + { + "name": "get_bounds", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1068685055, + "return_value": { + "type": "AABB" + } } ], "signals": [ @@ -153567,12 +160551,13 @@ }, { "name": "map_get_path", - "is_const": true, + "is_const": false, "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 3146466012, + "hash": 1279824844, "hash_compatibility": [ + 3146466012, 56240621 ], "return_value": { @@ -153745,6 +160730,41 @@ } ] }, + { + "name": "map_set_use_async_iterations", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1265174801, + "arguments": [ + { + "name": "map", + "type": "RID" + }, + { + "name": "enabled", + "type": "bool" + } + ] + }, + { + "name": "map_get_use_async_iterations", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 4155700596, + "return_value": { + "type": "bool" + }, + "arguments": [ + { + "name": "map", + "type": "RID" + } + ] + }, { "name": "map_get_random_point", "is_const": true, @@ -153773,11 +160793,14 @@ }, { "name": "query_path", - "is_const": true, + "is_const": false, "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 3394638789, + "hash": 1254915886, + "hash_compatibility": [ + 3394638789 + ], "arguments": [ { "name": "parameters", @@ -153786,6 +160809,11 @@ { "name": "result", "type": "NavigationPathQueryResult2D" + }, + { + "name": "callback", + "type": "Callable", + "default_value": "Callable()" } ] }, @@ -154236,6 +161264,23 @@ } ] }, + { + "name": "region_get_bounds", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1097232729, + "return_value": { + "type": "Rect2" + }, + "arguments": [ + { + "name": "region", + "type": "RID" + } + ] + }, { "name": "link_create", "is_const": false, @@ -155460,7 +162505,10 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 1176164995, + "hash": 1766905497, + "hash_compatibility": [ + 1176164995 + ], "arguments": [ { "name": "navigation_polygon", @@ -155487,7 +162535,10 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 2909414286, + "hash": 2179660022, + "hash_compatibility": [ + 2909414286 + ], "arguments": [ { "name": "navigation_polygon", @@ -155510,7 +162561,10 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 2909414286, + "hash": 2179660022, + "hash_compatibility": [ + 2909414286 + ], "arguments": [ { "name": "navigation_polygon", @@ -156019,12 +163073,13 @@ }, { "name": "map_get_path", - "is_const": true, + "is_const": false, "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 1187418690, + "hash": 276783190, "hash_compatibility": [ + 1187418690, 2121045993 ], "return_value": { @@ -156248,6 +163303,41 @@ } ] }, + { + "name": "map_set_use_async_iterations", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1265174801, + "arguments": [ + { + "name": "map", + "type": "RID" + }, + { + "name": "enabled", + "type": "bool" + } + ] + }, + { + "name": "map_get_use_async_iterations", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 4155700596, + "return_value": { + "type": "bool" + }, + "arguments": [ + { + "name": "map", + "type": "RID" + } + ] + }, { "name": "map_get_random_point", "is_const": true, @@ -156276,11 +163366,14 @@ }, { "name": "query_path", - "is_const": true, + "is_const": false, "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 3415008901, + "hash": 2146930868, + "hash_compatibility": [ + 3415008901 + ], "arguments": [ { "name": "parameters", @@ -156289,6 +163382,11 @@ { "name": "result", "type": "NavigationPathQueryResult3D" + }, + { + "name": "callback", + "type": "Callable", + "default_value": "Callable()" } ] }, @@ -156808,6 +163906,23 @@ } ] }, + { + "name": "region_get_bounds", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 974181306, + "return_value": { + "type": "AABB" + }, + "arguments": [ + { + "name": "region", + "type": "RID" + } + ] + }, { "name": "link_create", "is_const": false, @@ -158176,9 +165291,10 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 685862123, + "hash": 3172802542, "hash_compatibility": [ - 3703028813 + 3703028813, + 685862123 ], "arguments": [ { @@ -158206,9 +165322,10 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 2469318639, + "hash": 1286748856, "hash_compatibility": [ - 3669016597 + 3669016597, + 2469318639 ], "arguments": [ { @@ -158232,9 +165349,10 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 2469318639, + "hash": 1286748856, "hash_compatibility": [ - 3669016597 + 3669016597, + 2469318639 ], "arguments": [ { @@ -158991,8 +166109,10 @@ "name": "_process", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 373806689, "arguments": [ { "name": "delta", @@ -159005,8 +166125,10 @@ "name": "_physics_process", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 373806689, "arguments": [ { "name": "delta", @@ -159019,29 +166141,37 @@ "name": "_enter_tree", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, - "is_virtual": true + "is_virtual": true, + "hash": 3218959716 }, { "name": "_exit_tree", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, - "is_virtual": true + "is_virtual": true, + "hash": 3218959716 }, { "name": "_ready", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, - "is_virtual": true + "is_virtual": true, + "hash": 3218959716 }, { "name": "_get_configuration_warnings", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1139954409, "return_value": { "type": "PackedStringArray" } @@ -159050,8 +166180,10 @@ "name": "_input", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3754044979, "arguments": [ { "name": "event", @@ -159063,8 +166195,10 @@ "name": "_shortcut_input", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3754044979, "arguments": [ { "name": "event", @@ -159076,8 +166210,10 @@ "name": "_unhandled_input", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3754044979, "arguments": [ { "name": "event", @@ -159089,8 +166225,10 @@ "name": "_unhandled_key_input", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3754044979, "arguments": [ { "name": "event", @@ -160265,6 +167403,14 @@ "type": "enum::Node.AutoTranslateMode" } }, + { + "name": "set_translation_domain_inherited", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3218959716 + }, { "name": "get_window", "is_const": true, @@ -160520,6 +167666,17 @@ } ] }, + { + "name": "get_rpc_config", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1214101251, + "return_value": { + "type": "Variant" + } + }, { "name": "set_editor_description", "is_const": false, @@ -160824,6 +167981,9 @@ "type": "Node" } ] + }, + { + "name": "editor_state_changed" } ], "properties": [ @@ -163561,6 +170721,32 @@ "value": 7 } ] + }, + { + "name": "StdHandleType", + "is_bitfield": false, + "values": [ + { + "name": "STD_HANDLE_INVALID", + "value": 0 + }, + { + "name": "STD_HANDLE_CONSOLE", + "value": 1 + }, + { + "name": "STD_HANDLE_FILE", + "value": 2 + }, + { + "name": "STD_HANDLE_PIPE", + "value": 3 + }, + { + "name": "STD_HANDLE_UNKNOWN", + "value": 4 + } + ] } ], "methods": [ @@ -163872,9 +171058,70 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 2841200299, + "hash": 990163283, + "hash_compatibility": [ + 2841200299 + ], "return_value": { "type": "String" + }, + "arguments": [ + { + "name": "buffer_size", + "type": "int", + "meta": "int64" + } + ] + }, + { + "name": "read_buffer_from_stdin", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 47165747, + "return_value": { + "type": "PackedByteArray" + }, + "arguments": [ + { + "name": "buffer_size", + "type": "int", + "meta": "int64" + } + ] + }, + { + "name": "get_stdin_type", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1704816237, + "return_value": { + "type": "enum::OS.StdHandleType" + } + }, + { + "name": "get_stdout_type", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1704816237, + "return_value": { + "type": "enum::OS.StdHandleType" + } + }, + { + "name": "get_stderr_type", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1704816237, + "return_value": { + "type": "enum::OS.StdHandleType" } }, { @@ -164199,6 +171446,17 @@ "type": "String" } }, + { + "name": "get_version_alias", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 201670096, + "return_value": { + "type": "String" + } + }, { "name": "get_cmdline_args", "is_const": false, @@ -164493,6 +171751,17 @@ "type": "String" } }, + { + "name": "get_temp_dir", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 201670096, + "return_value": { + "type": "String" + } + }, { "name": "get_unique_id", "is_const": true, @@ -164534,7 +171803,8 @@ "arguments": [ { "name": "code", - "type": "int" + "type": "int", + "meta": "char32" } ] }, @@ -165358,6 +172628,23 @@ } ] }, + { + "name": "has_connections", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 2619796661, + "return_value": { + "type": "bool" + }, + "arguments": [ + { + "name": "signal", + "type": "StringName" + } + ] + }, { "name": "set_block_signals", "is_const": false, @@ -165422,9 +172709,8 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 2475554935, + "hash": 1195764410, "hash_compatibility": [ - 1195764410, 2475554935 ], "return_value": { @@ -165448,9 +172734,8 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 4021311862, + "hash": 162698058, "hash_compatibility": [ - 162698058, 4021311862 ], "return_value": { @@ -165477,6 +172762,31 @@ } ] }, + { + "name": "get_translation_domain", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 2002593661, + "return_value": { + "type": "StringName" + } + }, + { + "name": "set_translation_domain", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3304788590, + "arguments": [ + { + "name": "domain", + "type": "StringName" + } + ] + }, { "name": "is_queued_for_deletion", "is_const": true, @@ -166079,7 +173389,10 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 3255299855, + "hash": 2963875352, + "hash_compatibility": [ + 3255299855 + ], "return_value": { "type": "Transform3D" }, @@ -166316,6 +173629,45 @@ "type": "bool" } }, + { + "name": "find_action", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 4106179378, + "return_value": { + "type": "RID" + }, + "arguments": [ + { + "name": "name", + "type": "String" + }, + { + "name": "action_set", + "type": "RID" + } + ] + }, + { + "name": "action_get_handle", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3917799429, + "return_value": { + "type": "int", + "meta": "uint64" + }, + "arguments": [ + { + "name": "action", + "type": "RID" + } + ] + }, { "name": "get_hand_tracker", "is_const": false, @@ -166363,6 +173715,268 @@ } ] }, + { + "name": "register_projection_views_extension", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1997997368, + "arguments": [ + { + "name": "extension", + "type": "OpenXRExtensionWrapperExtension" + } + ] + }, + { + "name": "unregister_projection_views_extension", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1997997368, + "arguments": [ + { + "name": "extension", + "type": "OpenXRExtensionWrapperExtension" + } + ] + }, + { + "name": "get_render_state_z_near", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 191475506, + "return_value": { + "type": "float", + "meta": "double" + } + }, + { + "name": "get_render_state_z_far", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 191475506, + "return_value": { + "type": "float", + "meta": "double" + } + }, + { + "name": "set_velocity_texture", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 2722037293, + "arguments": [ + { + "name": "render_target", + "type": "RID" + } + ] + }, + { + "name": "set_velocity_depth_texture", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 2722037293, + "arguments": [ + { + "name": "render_target", + "type": "RID" + } + ] + }, + { + "name": "set_velocity_target_size", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1130785943, + "arguments": [ + { + "name": "target_size", + "type": "Vector2i" + } + ] + }, + { + "name": "get_supported_swapchain_formats", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3851388692, + "return_value": { + "type": "PackedInt64Array" + } + }, + { + "name": "openxr_swapchain_create", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 2162228999, + "return_value": { + "type": "int", + "meta": "uint64" + }, + "arguments": [ + { + "name": "create_flags", + "type": "int", + "meta": "uint64" + }, + { + "name": "usage_flags", + "type": "int", + "meta": "uint64" + }, + { + "name": "swapchain_format", + "type": "int", + "meta": "int64" + }, + { + "name": "width", + "type": "int", + "meta": "uint32" + }, + { + "name": "height", + "type": "int", + "meta": "uint32" + }, + { + "name": "sample_count", + "type": "int", + "meta": "uint32" + }, + { + "name": "array_size", + "type": "int", + "meta": "uint32" + } + ] + }, + { + "name": "openxr_swapchain_free", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1286410249, + "arguments": [ + { + "name": "swapchain", + "type": "int", + "meta": "uint64" + } + ] + }, + { + "name": "openxr_swapchain_get_swapchain", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3744713108, + "return_value": { + "type": "int", + "meta": "uint64" + }, + "arguments": [ + { + "name": "swapchain", + "type": "int", + "meta": "uint64" + } + ] + }, + { + "name": "openxr_swapchain_acquire", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1286410249, + "arguments": [ + { + "name": "swapchain", + "type": "int", + "meta": "uint64" + } + ] + }, + { + "name": "openxr_swapchain_get_image", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 937000113, + "return_value": { + "type": "RID" + }, + "arguments": [ + { + "name": "swapchain", + "type": "int", + "meta": "uint64" + } + ] + }, + { + "name": "openxr_swapchain_release", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1286410249, + "arguments": [ + { + "name": "swapchain", + "type": "int", + "meta": "uint64" + } + ] + }, + { + "name": "get_projection_layer", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 2455072627, + "return_value": { + "type": "int", + "meta": "uint64" + } + }, + { + "name": "set_render_region", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1763793166, + "arguments": [ + { + "name": "render_region", + "type": "Rect2i" + } + ] + }, { "name": "set_emulate_environment_blend_mode_alpha_blend", "is_const": false, @@ -166518,6 +174132,13 @@ } ] }, + { + "name": "OpenXRActionBindingModifier", + "is_refcounted": true, + "is_instantiable": true, + "inherits": "OpenXRBindingModifier", + "api_type": "core" + }, { "name": "OpenXRActionMap", "is_refcounted": true, @@ -166896,264 +174517,335 @@ ] }, { - "name": "OpenXRCompositionLayer", - "is_refcounted": false, - "is_instantiable": false, - "inherits": "Node3D", + "name": "OpenXRAnalogThresholdModifier", + "is_refcounted": true, + "is_instantiable": true, + "inherits": "OpenXRActionBindingModifier", "api_type": "core", "methods": [ { - "name": "set_layer_viewport", + "name": "set_on_threshold", "is_const": false, "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 3888077664, + "hash": 373806689, "arguments": [ { - "name": "viewport", - "type": "SubViewport" + "name": "on_threshold", + "type": "float", + "meta": "float" } ] }, { - "name": "get_layer_viewport", + "name": "get_on_threshold", "is_const": true, "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 3750751911, + "hash": 1740695150, "return_value": { - "type": "SubViewport" + "type": "float", + "meta": "float" } }, { - "name": "set_enable_hole_punch", + "name": "set_off_threshold", "is_const": false, "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 2586408642, + "hash": 373806689, "arguments": [ { - "name": "enable", - "type": "bool" + "name": "off_threshold", + "type": "float", + "meta": "float" } ] }, { - "name": "get_enable_hole_punch", + "name": "get_off_threshold", "is_const": true, "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 36873697, + "hash": 1740695150, "return_value": { - "type": "bool" + "type": "float", + "meta": "float" } }, { - "name": "set_sort_order", + "name": "set_on_haptic", "is_const": false, "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 1286410249, + "hash": 2998020150, "arguments": [ { - "name": "order", - "type": "int", - "meta": "int32" + "name": "haptic", + "type": "OpenXRHapticBase" } ] }, { - "name": "get_sort_order", + "name": "get_on_haptic", "is_const": true, "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 3905245786, + "hash": 922310751, "return_value": { - "type": "int", - "meta": "int32" + "type": "OpenXRHapticBase" } }, { - "name": "set_alpha_blend", + "name": "set_off_haptic", "is_const": false, "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 2586408642, + "hash": 2998020150, "arguments": [ { - "name": "enabled", - "type": "bool" + "name": "haptic", + "type": "OpenXRHapticBase" } ] }, { - "name": "get_alpha_blend", + "name": "get_off_haptic", "is_const": true, "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 36873697, + "hash": 922310751, "return_value": { - "type": "bool" + "type": "OpenXRHapticBase" } + } + ], + "properties": [ + { + "type": "float", + "name": "on_threshold", + "setter": "set_on_threshold", + "getter": "get_on_threshold" }, { - "name": "is_natively_supported", + "type": "float", + "name": "off_threshold", + "setter": "set_off_threshold", + "getter": "get_off_threshold" + }, + { + "type": "OpenXRHapticBase", + "name": "on_haptic", + "setter": "set_on_haptic", + "getter": "get_on_haptic" + }, + { + "type": "OpenXRHapticBase", + "name": "off_haptic", + "setter": "set_off_haptic", + "getter": "get_off_haptic" + } + ] + }, + { + "name": "OpenXRBindingModifier", + "is_refcounted": true, + "is_instantiable": false, + "inherits": "Resource", + "api_type": "core", + "methods": [ + { + "name": "_get_description", "is_const": true, - "is_vararg": false, "is_static": false, - "is_virtual": false, - "hash": 36873697, + "is_required": true, + "is_vararg": false, + "is_virtual": true, + "hash": 201670096, "return_value": { - "type": "bool" + "type": "String" } }, { - "name": "intersects_ray", + "name": "_get_ip_modification", + "is_const": false, + "is_static": false, + "is_required": true, + "is_vararg": false, + "is_virtual": true, + "hash": 2115431945, + "return_value": { + "type": "PackedByteArray" + } + } + ] + }, + { + "name": "OpenXRBindingModifierEditor", + "is_refcounted": false, + "is_instantiable": true, + "inherits": "PanelContainer", + "api_type": "core", + "methods": [ + { + "name": "get_binding_modifier", "is_const": true, "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 1091262597, + "hash": 2930765082, "return_value": { - "type": "Vector2" - }, + "type": "OpenXRBindingModifier" + } + }, + { + "name": "setup", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1284787389, "arguments": [ { - "name": "origin", - "type": "Vector3" + "name": "action_map", + "type": "OpenXRActionMap" }, { - "name": "direction", - "type": "Vector3" + "name": "binding_modifier", + "type": "OpenXRBindingModifier" } ] } ], - "properties": [ - { - "type": "Object", - "name": "layer_viewport", - "setter": "set_layer_viewport", - "getter": "get_layer_viewport" - }, - { - "type": "int", - "name": "sort_order", - "setter": "set_sort_order", - "getter": "get_sort_order" - }, - { - "type": "bool", - "name": "alpha_blend", - "setter": "set_alpha_blend", - "getter": "get_alpha_blend" - }, + "signals": [ { - "type": "bool", - "name": "enable_hole_punch", - "setter": "set_enable_hole_punch", - "getter": "get_enable_hole_punch" + "name": "binding_modifier_removed", + "arguments": [ + { + "name": "binding_modifier_editor", + "type": "Object" + } + ] } ] }, { - "name": "OpenXRCompositionLayerCylinder", + "name": "OpenXRCompositionLayer", "is_refcounted": false, - "is_instantiable": true, - "inherits": "OpenXRCompositionLayer", + "is_instantiable": false, + "inherits": "Node3D", "api_type": "core", "methods": [ { - "name": "set_radius", + "name": "set_layer_viewport", "is_const": false, "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 373806689, + "hash": 3888077664, "arguments": [ { - "name": "radius", - "type": "float", - "meta": "float" + "name": "viewport", + "type": "SubViewport" } ] }, { - "name": "get_radius", + "name": "get_layer_viewport", "is_const": true, "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 1740695150, + "hash": 3750751911, "return_value": { - "type": "float", - "meta": "float" + "type": "SubViewport" } }, { - "name": "set_aspect_ratio", + "name": "set_use_android_surface", "is_const": false, "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 373806689, + "hash": 2586408642, "arguments": [ { - "name": "aspect_ratio", - "type": "float", - "meta": "float" + "name": "enable", + "type": "bool" } ] }, { - "name": "get_aspect_ratio", + "name": "get_use_android_surface", "is_const": true, "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 1740695150, + "hash": 36873697, "return_value": { - "type": "float", - "meta": "float" + "type": "bool" } }, { - "name": "set_central_angle", + "name": "set_android_surface_size", "is_const": false, "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 373806689, + "hash": 1130785943, "arguments": [ { - "name": "angle", - "type": "float", - "meta": "float" + "name": "size", + "type": "Vector2i" } ] }, { - "name": "get_central_angle", + "name": "get_android_surface_size", "is_const": true, "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 1740695150, + "hash": 3690982128, "return_value": { - "type": "float", - "meta": "float" + "type": "Vector2i" } }, { - "name": "set_fallback_segments", + "name": "set_enable_hole_punch", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 2586408642, + "arguments": [ + { + "name": "enable", + "type": "bool" + } + ] + }, + { + "name": "get_enable_hole_punch", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 36873697, + "return_value": { + "type": "bool" + } + }, + { + "name": "set_sort_order", "is_const": false, "is_vararg": false, "is_static": false, @@ -167161,14 +174853,14 @@ "hash": 1286410249, "arguments": [ { - "name": "segments", + "name": "order", "type": "int", - "meta": "uint32" + "meta": "int32" } ] }, { - "name": "get_fallback_segments", + "name": "get_sort_order", "is_const": true, "is_vararg": false, "is_static": false, @@ -167176,39 +174868,262 @@ "hash": 3905245786, "return_value": { "type": "int", - "meta": "uint32" + "meta": "int32" } + }, + { + "name": "set_alpha_blend", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 2586408642, + "arguments": [ + { + "name": "enabled", + "type": "bool" + } + ] + }, + { + "name": "get_alpha_blend", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 36873697, + "return_value": { + "type": "bool" + } + }, + { + "name": "get_android_surface", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3277089691, + "return_value": { + "type": "JavaObject" + } + }, + { + "name": "is_natively_supported", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 36873697, + "return_value": { + "type": "bool" + } + }, + { + "name": "intersects_ray", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1091262597, + "return_value": { + "type": "Vector2" + }, + "arguments": [ + { + "name": "origin", + "type": "Vector3" + }, + { + "name": "direction", + "type": "Vector3" + } + ] } ], "properties": [ { - "type": "float", - "name": "radius", - "setter": "set_radius", - "getter": "get_radius" + "type": "Object", + "name": "layer_viewport", + "setter": "set_layer_viewport", + "getter": "get_layer_viewport" }, { - "type": "float", - "name": "aspect_ratio", - "setter": "set_aspect_ratio", - "getter": "get_aspect_ratio" + "type": "bool", + "name": "use_android_surface", + "setter": "set_use_android_surface", + "getter": "get_use_android_surface" }, { - "type": "float", - "name": "central_angle", - "setter": "set_central_angle", - "getter": "get_central_angle" + "type": "Vector2i", + "name": "android_surface_size", + "setter": "set_android_surface_size", + "getter": "get_android_surface_size" }, { "type": "int", - "name": "fallback_segments", - "setter": "set_fallback_segments", - "getter": "get_fallback_segments" + "name": "sort_order", + "setter": "set_sort_order", + "getter": "get_sort_order" + }, + { + "type": "bool", + "name": "alpha_blend", + "setter": "set_alpha_blend", + "getter": "get_alpha_blend" + }, + { + "type": "bool", + "name": "enable_hole_punch", + "setter": "set_enable_hole_punch", + "getter": "get_enable_hole_punch" } ] }, { - "name": "OpenXRCompositionLayerEquirect", + "name": "OpenXRCompositionLayerCylinder", + "is_refcounted": false, + "is_instantiable": true, + "inherits": "OpenXRCompositionLayer", + "api_type": "core", + "methods": [ + { + "name": "set_radius", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 373806689, + "arguments": [ + { + "name": "radius", + "type": "float", + "meta": "float" + } + ] + }, + { + "name": "get_radius", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1740695150, + "return_value": { + "type": "float", + "meta": "float" + } + }, + { + "name": "set_aspect_ratio", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 373806689, + "arguments": [ + { + "name": "aspect_ratio", + "type": "float", + "meta": "float" + } + ] + }, + { + "name": "get_aspect_ratio", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1740695150, + "return_value": { + "type": "float", + "meta": "float" + } + }, + { + "name": "set_central_angle", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 373806689, + "arguments": [ + { + "name": "angle", + "type": "float", + "meta": "float" + } + ] + }, + { + "name": "get_central_angle", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1740695150, + "return_value": { + "type": "float", + "meta": "float" + } + }, + { + "name": "set_fallback_segments", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1286410249, + "arguments": [ + { + "name": "segments", + "type": "int", + "meta": "uint32" + } + ] + }, + { + "name": "get_fallback_segments", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3905245786, + "return_value": { + "type": "int", + "meta": "uint32" + } + } + ], + "properties": [ + { + "type": "float", + "name": "radius", + "setter": "set_radius", + "getter": "get_radius" + }, + { + "type": "float", + "name": "aspect_ratio", + "setter": "set_aspect_ratio", + "getter": "get_aspect_ratio" + }, + { + "type": "float", + "name": "central_angle", + "setter": "set_central_angle", + "getter": "get_central_angle" + }, + { + "type": "int", + "name": "fallback_segments", + "setter": "set_fallback_segments", + "getter": "get_fallback_segments" + } + ] + }, + { + "name": "OpenXRCompositionLayerEquirect", "is_refcounted": false, "is_instantiable": true, "inherits": "OpenXRCompositionLayer", @@ -167425,6 +175340,304 @@ } ] }, + { + "name": "OpenXRDpadBindingModifier", + "is_refcounted": true, + "is_instantiable": true, + "inherits": "OpenXRIPBindingModifier", + "api_type": "core", + "methods": [ + { + "name": "set_action_set", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 2093310581, + "arguments": [ + { + "name": "action_set", + "type": "OpenXRActionSet" + } + ] + }, + { + "name": "get_action_set", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 619941079, + "return_value": { + "type": "OpenXRActionSet" + } + }, + { + "name": "set_input_path", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 83702148, + "arguments": [ + { + "name": "input_path", + "type": "String" + } + ] + }, + { + "name": "get_input_path", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 201670096, + "return_value": { + "type": "String" + } + }, + { + "name": "set_threshold", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 373806689, + "arguments": [ + { + "name": "threshold", + "type": "float", + "meta": "float" + } + ] + }, + { + "name": "get_threshold", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1740695150, + "return_value": { + "type": "float", + "meta": "float" + } + }, + { + "name": "set_threshold_released", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 373806689, + "arguments": [ + { + "name": "threshold_released", + "type": "float", + "meta": "float" + } + ] + }, + { + "name": "get_threshold_released", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1740695150, + "return_value": { + "type": "float", + "meta": "float" + } + }, + { + "name": "set_center_region", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 373806689, + "arguments": [ + { + "name": "center_region", + "type": "float", + "meta": "float" + } + ] + }, + { + "name": "get_center_region", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1740695150, + "return_value": { + "type": "float", + "meta": "float" + } + }, + { + "name": "set_wedge_angle", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 373806689, + "arguments": [ + { + "name": "wedge_angle", + "type": "float", + "meta": "float" + } + ] + }, + { + "name": "get_wedge_angle", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1740695150, + "return_value": { + "type": "float", + "meta": "float" + } + }, + { + "name": "set_is_sticky", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 2586408642, + "arguments": [ + { + "name": "is_sticky", + "type": "bool" + } + ] + }, + { + "name": "get_is_sticky", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 36873697, + "return_value": { + "type": "bool" + } + }, + { + "name": "set_on_haptic", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 2998020150, + "arguments": [ + { + "name": "haptic", + "type": "OpenXRHapticBase" + } + ] + }, + { + "name": "get_on_haptic", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 922310751, + "return_value": { + "type": "OpenXRHapticBase" + } + }, + { + "name": "set_off_haptic", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 2998020150, + "arguments": [ + { + "name": "haptic", + "type": "OpenXRHapticBase" + } + ] + }, + { + "name": "get_off_haptic", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 922310751, + "return_value": { + "type": "OpenXRHapticBase" + } + } + ], + "properties": [ + { + "type": "OpenXRActionSet", + "name": "action_set", + "setter": "set_action_set", + "getter": "get_action_set" + }, + { + "type": "String", + "name": "input_path", + "setter": "set_input_path", + "getter": "get_input_path" + }, + { + "type": "float", + "name": "threshold", + "setter": "set_threshold", + "getter": "get_threshold" + }, + { + "type": "float", + "name": "threshold_released", + "setter": "set_threshold_released", + "getter": "get_threshold_released" + }, + { + "type": "float", + "name": "center_region", + "setter": "set_center_region", + "getter": "get_center_region" + }, + { + "type": "float", + "name": "wedge_angle", + "setter": "set_wedge_angle", + "getter": "get_wedge_angle" + }, + { + "type": "bool", + "name": "is_sticky", + "setter": "set_is_sticky", + "getter": "get_is_sticky" + }, + { + "type": "OpenXRHapticBase", + "name": "on_haptic", + "setter": "set_on_haptic", + "getter": "get_on_haptic" + }, + { + "type": "OpenXRHapticBase", + "name": "off_haptic", + "setter": "set_off_haptic", + "getter": "get_off_haptic" + } + ] + }, { "name": "OpenXRExtensionWrapperExtension", "is_refcounted": false, @@ -167436,8 +175649,10 @@ "name": "_get_requested_extensions", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 2382534195, "return_value": { "type": "Dictionary" } @@ -167446,8 +175661,10 @@ "name": "_set_system_properties_and_get_next_pointer", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3744713108, "return_value": { "type": "int", "meta": "uint64" @@ -167463,8 +175680,10 @@ "name": "_set_instance_create_info_and_get_next_pointer", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3744713108, "return_value": { "type": "int", "meta": "uint64" @@ -167480,8 +175699,10 @@ "name": "_set_session_create_and_get_next_pointer", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3744713108, "return_value": { "type": "int", "meta": "uint64" @@ -167497,8 +175718,10 @@ "name": "_set_swapchain_create_info_and_get_next_pointer", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3744713108, "return_value": { "type": "int", "meta": "uint64" @@ -167514,8 +175737,10 @@ "name": "_set_hand_joint_locations_and_get_next_pointer", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 50157827, "return_value": { "type": "int", "meta": "uint64" @@ -167532,12 +175757,38 @@ } ] }, + { + "name": "_set_projection_views_and_get_next_pointer", + "is_const": false, + "is_static": false, + "is_required": false, + "is_vararg": false, + "is_virtual": true, + "hash": 50157827, + "return_value": { + "type": "int", + "meta": "uint64" + }, + "arguments": [ + { + "name": "view_index", + "type": "int", + "meta": "int32" + }, + { + "name": "next_pointer", + "type": "void*" + } + ] + }, { "name": "_get_composition_layer_count", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 2455072627, "return_value": { "type": "int", "meta": "int32" @@ -167547,8 +175798,10 @@ "name": "_get_composition_layer", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3744713108, "return_value": { "type": "int", "meta": "uint64" @@ -167565,8 +175818,10 @@ "name": "_get_composition_layer_order", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3744713108, "return_value": { "type": "int", "meta": "int32" @@ -167583,8 +175838,10 @@ "name": "_get_suggested_tracker_names", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 2981934095, "return_value": { "type": "PackedStringArray" } @@ -167593,22 +175850,28 @@ "name": "_on_register_metadata", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, - "is_virtual": true + "is_virtual": true, + "hash": 3218959716 }, { "name": "_on_before_instance_created", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, - "is_virtual": true + "is_virtual": true, + "hash": 3218959716 }, { "name": "_on_instance_created", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1286410249, "arguments": [ { "name": "instance", @@ -167621,15 +175884,19 @@ "name": "_on_instance_destroyed", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, - "is_virtual": true + "is_virtual": true, + "hash": 3218959716 }, { "name": "_on_session_created", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1286410249, "arguments": [ { "name": "session", @@ -167642,92 +175909,148 @@ "name": "_on_process", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, - "is_virtual": true + "is_virtual": true, + "hash": 3218959716 }, { "name": "_on_pre_render", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, - "is_virtual": true + "is_virtual": true, + "hash": 3218959716 }, { "name": "_on_main_swapchains_created", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, - "is_virtual": true + "is_virtual": true, + "hash": 3218959716 + }, + { + "name": "_on_pre_draw_viewport", + "is_const": false, + "is_static": false, + "is_required": false, + "is_vararg": false, + "is_virtual": true, + "hash": 2722037293, + "arguments": [ + { + "name": "viewport", + "type": "RID" + } + ] + }, + { + "name": "_on_post_draw_viewport", + "is_const": false, + "is_static": false, + "is_required": false, + "is_vararg": false, + "is_virtual": true, + "hash": 2722037293, + "arguments": [ + { + "name": "viewport", + "type": "RID" + } + ] }, { "name": "_on_session_destroyed", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, - "is_virtual": true + "is_virtual": true, + "hash": 3218959716 }, { "name": "_on_state_idle", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, - "is_virtual": true + "is_virtual": true, + "hash": 3218959716 }, { "name": "_on_state_ready", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, - "is_virtual": true + "is_virtual": true, + "hash": 3218959716 }, { "name": "_on_state_synchronized", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, - "is_virtual": true + "is_virtual": true, + "hash": 3218959716 }, { "name": "_on_state_visible", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, - "is_virtual": true + "is_virtual": true, + "hash": 3218959716 }, { "name": "_on_state_focused", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, - "is_virtual": true + "is_virtual": true, + "hash": 3218959716 }, { "name": "_on_state_stopping", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, - "is_virtual": true + "is_virtual": true, + "hash": 3218959716 }, { "name": "_on_state_loss_pending", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, - "is_virtual": true + "is_virtual": true, + "hash": 3218959716 }, { "name": "_on_state_exiting", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, - "is_virtual": true + "is_virtual": true, + "hash": 3218959716 }, { "name": "_on_event_polled", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3067735520, "return_value": { "type": "bool" }, @@ -167742,8 +176065,10 @@ "name": "_set_viewport_composition_layer_and_get_next_pointer", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 2250464348, "return_value": { "type": "int", "meta": "uint64" @@ -167767,8 +176092,10 @@ "name": "_get_viewport_composition_layer_extension_properties", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 2915620761, "return_value": { "type": "typedarray::Dictionary" } @@ -167777,8 +176104,10 @@ "name": "_get_viewport_composition_layer_extension_property_defaults", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 2382534195, "return_value": { "type": "Dictionary" } @@ -167787,8 +176116,10 @@ "name": "_on_viewport_composition_layer_destroyed", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1286410249, "arguments": [ { "name": "layer", @@ -167796,6 +176127,29 @@ } ] }, + { + "name": "_set_android_surface_swapchain_create_info_and_get_next_pointer", + "is_const": false, + "is_static": false, + "is_required": false, + "is_vararg": false, + "is_virtual": true, + "hash": 3726637545, + "return_value": { + "type": "int", + "meta": "uint64" + }, + "arguments": [ + { + "name": "property_values", + "type": "Dictionary" + }, + { + "name": "next_pointer", + "type": "void*" + } + ] + }, { "name": "get_openxr_api", "is_const": false, @@ -168057,6 +176411,123 @@ } ] }, + { + "name": "OpenXRHapticBase", + "is_refcounted": true, + "is_instantiable": false, + "inherits": "Resource", + "api_type": "core" + }, + { + "name": "OpenXRHapticVibration", + "is_refcounted": true, + "is_instantiable": true, + "inherits": "OpenXRHapticBase", + "api_type": "core", + "methods": [ + { + "name": "set_duration", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1286410249, + "arguments": [ + { + "name": "duration", + "type": "int", + "meta": "int64" + } + ] + }, + { + "name": "get_duration", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3905245786, + "return_value": { + "type": "int", + "meta": "int64" + } + }, + { + "name": "set_frequency", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 373806689, + "arguments": [ + { + "name": "frequency", + "type": "float", + "meta": "float" + } + ] + }, + { + "name": "get_frequency", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1740695150, + "return_value": { + "type": "float", + "meta": "float" + } + }, + { + "name": "set_amplitude", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 373806689, + "arguments": [ + { + "name": "amplitude", + "type": "float", + "meta": "float" + } + ] + }, + { + "name": "get_amplitude", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1740695150, + "return_value": { + "type": "float", + "meta": "float" + } + } + ], + "properties": [ + { + "type": "int", + "name": "duration", + "setter": "set_duration", + "getter": "get_duration" + }, + { + "type": "float", + "name": "frequency", + "setter": "set_frequency", + "getter": "get_frequency" + }, + { + "type": "float", + "name": "amplitude", + "setter": "set_amplitude", + "getter": "get_amplitude" + } + ] + }, { "name": "OpenXRIPBinding", "is_refcounted": true, @@ -168090,7 +176561,32 @@ } }, { - "name": "get_path_count", + "name": "set_binding_path", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 83702148, + "arguments": [ + { + "name": "binding_path", + "type": "String" + } + ] + }, + { + "name": "get_binding_path", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 201670096, + "return_value": { + "type": "String" + } + }, + { + "name": "get_binding_modifier_count", "is_const": true, "is_vararg": false, "is_static": false, @@ -168101,6 +176597,49 @@ "meta": "int32" } }, + { + "name": "get_binding_modifier", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3538296211, + "return_value": { + "type": "OpenXRActionBindingModifier" + }, + "arguments": [ + { + "name": "index", + "type": "int", + "meta": "int32" + } + ] + }, + { + "name": "set_binding_modifiers", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 381264803, + "arguments": [ + { + "name": "binding_modifiers", + "type": "Array" + } + ] + }, + { + "name": "get_binding_modifiers", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3995934104, + "return_value": { + "type": "Array" + } + }, { "name": "set_paths", "is_const": false, @@ -168126,6 +176665,18 @@ "type": "PackedStringArray" } }, + { + "name": "get_path_count", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3905245786, + "return_value": { + "type": "int", + "meta": "int32" + } + }, { "name": "has_path", "is_const": true, @@ -168179,6 +176730,18 @@ "setter": "set_action", "getter": "get_action" }, + { + "type": "String", + "name": "binding_path", + "setter": "set_binding_path", + "getter": "get_binding_path" + }, + { + "type": "OpenXRActionBindingModifier", + "name": "binding_modifiers", + "setter": "set_binding_modifiers", + "getter": "get_binding_modifiers" + }, { "type": "PackedStringArray", "name": "paths", @@ -168187,6 +176750,13 @@ } ] }, + { + "name": "OpenXRIPBindingModifier", + "is_refcounted": true, + "is_instantiable": true, + "inherits": "OpenXRBindingModifier", + "api_type": "core" + }, { "name": "OpenXRInteractionProfile", "is_refcounted": true, @@ -168273,6 +176843,61 @@ "return_value": { "type": "Array" } + }, + { + "name": "get_binding_modifier_count", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3905245786, + "return_value": { + "type": "int", + "meta": "int32" + } + }, + { + "name": "get_binding_modifier", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 2419896583, + "return_value": { + "type": "OpenXRIPBindingModifier" + }, + "arguments": [ + { + "name": "index", + "type": "int", + "meta": "int32" + } + ] + }, + { + "name": "set_binding_modifiers", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 381264803, + "arguments": [ + { + "name": "binding_modifiers", + "type": "Array" + } + ] + }, + { + "name": "get_binding_modifiers", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3995934104, + "return_value": { + "type": "Array" + } } ], "properties": [ @@ -168287,6 +176912,46 @@ "name": "bindings", "setter": "set_bindings", "getter": "get_bindings" + }, + { + "type": "OpenXRIPBindingModifier", + "name": "binding_modifiers", + "setter": "set_binding_modifiers", + "getter": "get_binding_modifiers" + } + ] + }, + { + "name": "OpenXRInteractionProfileEditor", + "is_refcounted": false, + "is_instantiable": true, + "inherits": "OpenXRInteractionProfileEditorBase", + "api_type": "core" + }, + { + "name": "OpenXRInteractionProfileEditorBase", + "is_refcounted": false, + "is_instantiable": false, + "inherits": "HBoxContainer", + "api_type": "core", + "methods": [ + { + "name": "setup", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 421962938, + "arguments": [ + { + "name": "action_map", + "type": "OpenXRActionMap" + }, + { + "name": "interaction_profile", + "type": "OpenXRInteractionProfile" + } + ] } ] }, @@ -169768,7 +178433,7 @@ }, "arguments": [ { - "name": "pck_name", + "name": "pck_path", "type": "String" }, { @@ -169801,7 +178466,7 @@ }, "arguments": [ { - "name": "pck_path", + "name": "target_path", "type": "String" }, { @@ -169815,6 +178480,23 @@ } ] }, + { + "name": "add_file_removal", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 166001499, + "return_value": { + "type": "enum::Error" + }, + "arguments": [ + { + "name": "target_path", + "type": "String" + } + ] + }, { "name": "flush", "is_const": false, @@ -170223,8 +178905,10 @@ "name": "_get_packet", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3099858825, "return_value": { "type": "enum::Error" }, @@ -170243,8 +178927,10 @@ "name": "_put_packet", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3099858825, "return_value": { "type": "enum::Error" }, @@ -170264,8 +178950,10 @@ "name": "_get_available_packet_count", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3905245786, "return_value": { "type": "int", "meta": "int32" @@ -170275,8 +178963,10 @@ "name": "_get_max_packet_size", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3905245786, "return_value": { "type": "int", "meta": "int32" @@ -171527,8 +180217,12 @@ "value": 3 }, { - "name": "SUB_EMITTER_MAX", + "name": "SUB_EMITTER_AT_START", "value": 4 + }, + { + "name": "SUB_EMITTER_MAX", + "value": 5 } ] }, @@ -172667,6 +181361,33 @@ } ] }, + { + "name": "get_sub_emitter_amount_at_start", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3905245786, + "return_value": { + "type": "int", + "meta": "int32" + } + }, + { + "name": "set_sub_emitter_amount_at_start", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1286410249, + "arguments": [ + { + "name": "amount", + "type": "int", + "meta": "int32" + } + ] + }, { "name": "get_sub_emitter_keep_velocity", "is_const": true, @@ -172822,6 +181543,11 @@ } } ], + "signals": [ + { + "name": "emission_shape_changed" + } + ], "properties": [ { "type": "float", @@ -173559,6 +182285,12 @@ "setter": "set_sub_emitter_amount_at_collision", "getter": "get_sub_emitter_amount_at_collision" }, + { + "type": "int", + "name": "sub_emitter_amount_at_start", + "setter": "set_sub_emitter_amount_at_start", + "getter": "get_sub_emitter_amount_at_start" + }, { "type": "bool", "name": "sub_emitter_keep_velocity", @@ -174387,8 +183119,28 @@ "value": 33 }, { - "name": "MONITOR_MAX", + "name": "PIPELINE_COMPILATIONS_CANVAS", "value": 34 + }, + { + "name": "PIPELINE_COMPILATIONS_MESH", + "value": 35 + }, + { + "name": "PIPELINE_COMPILATIONS_SURFACE", + "value": 36 + }, + { + "name": "PIPELINE_COMPILATIONS_DRAW", + "value": 37 + }, + { + "name": "PIPELINE_COMPILATIONS_SPECIALIZATION", + "value": 38 + }, + { + "name": "MONITOR_MAX", + "value": 39 } ] } @@ -174758,8 +183510,10 @@ "name": "_integrate_forces", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 420958145, "arguments": [ { "name": "state", @@ -176882,8 +185636,10 @@ "name": "_get_total_gravity", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3341600327, "return_value": { "type": "Vector2" } @@ -176892,8 +185648,10 @@ "name": "_get_total_linear_damp", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1740695150, "return_value": { "type": "float", "meta": "float" @@ -176903,8 +185661,10 @@ "name": "_get_total_angular_damp", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1740695150, "return_value": { "type": "float", "meta": "float" @@ -176914,8 +185674,10 @@ "name": "_get_center_of_mass", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3341600327, "return_value": { "type": "Vector2" } @@ -176924,8 +185686,10 @@ "name": "_get_center_of_mass_local", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3341600327, "return_value": { "type": "Vector2" } @@ -176934,8 +185698,10 @@ "name": "_get_inverse_mass", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1740695150, "return_value": { "type": "float", "meta": "float" @@ -176945,8 +185711,10 @@ "name": "_get_inverse_inertia", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1740695150, "return_value": { "type": "float", "meta": "float" @@ -176956,8 +185724,10 @@ "name": "_set_linear_velocity", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 743155724, "arguments": [ { "name": "velocity", @@ -176969,8 +185739,10 @@ "name": "_get_linear_velocity", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3341600327, "return_value": { "type": "Vector2" } @@ -176979,8 +185751,10 @@ "name": "_set_angular_velocity", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 373806689, "arguments": [ { "name": "velocity", @@ -176993,8 +185767,10 @@ "name": "_get_angular_velocity", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1740695150, "return_value": { "type": "float", "meta": "float" @@ -177004,8 +185780,10 @@ "name": "_set_transform", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2761652528, "arguments": [ { "name": "transform", @@ -177017,8 +185795,10 @@ "name": "_get_transform", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3814499831, "return_value": { "type": "Transform2D" } @@ -177027,8 +185807,10 @@ "name": "_get_velocity_at_local_position", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2656412154, "return_value": { "type": "Vector2" }, @@ -177043,8 +185825,10 @@ "name": "_apply_central_impulse", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 743155724, "arguments": [ { "name": "impulse", @@ -177056,8 +185840,10 @@ "name": "_apply_impulse", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3108078480, "arguments": [ { "name": "impulse", @@ -177073,8 +185859,10 @@ "name": "_apply_torque_impulse", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 373806689, "arguments": [ { "name": "impulse", @@ -177087,8 +185875,10 @@ "name": "_apply_central_force", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 743155724, "arguments": [ { "name": "force", @@ -177100,8 +185890,10 @@ "name": "_apply_force", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3108078480, "arguments": [ { "name": "force", @@ -177117,8 +185909,10 @@ "name": "_apply_torque", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 373806689, "arguments": [ { "name": "torque", @@ -177131,8 +185925,10 @@ "name": "_add_constant_central_force", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 743155724, "arguments": [ { "name": "force", @@ -177144,8 +185940,10 @@ "name": "_add_constant_force", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3108078480, "arguments": [ { "name": "force", @@ -177161,8 +185959,10 @@ "name": "_add_constant_torque", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 373806689, "arguments": [ { "name": "torque", @@ -177175,8 +185975,10 @@ "name": "_set_constant_force", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 743155724, "arguments": [ { "name": "force", @@ -177188,8 +185990,10 @@ "name": "_get_constant_force", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3341600327, "return_value": { "type": "Vector2" } @@ -177198,8 +186002,10 @@ "name": "_set_constant_torque", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 373806689, "arguments": [ { "name": "torque", @@ -177212,8 +186018,10 @@ "name": "_get_constant_torque", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1740695150, "return_value": { "type": "float", "meta": "float" @@ -177223,8 +186031,10 @@ "name": "_set_sleep_state", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2586408642, "arguments": [ { "name": "enabled", @@ -177236,8 +186046,10 @@ "name": "_is_sleeping", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 36873697, "return_value": { "type": "bool" } @@ -177246,8 +186058,10 @@ "name": "_get_contact_count", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3905245786, "return_value": { "type": "int", "meta": "int32" @@ -177257,8 +186071,10 @@ "name": "_get_contact_local_position", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2299179447, "return_value": { "type": "Vector2" }, @@ -177274,8 +186090,10 @@ "name": "_get_contact_local_normal", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2299179447, "return_value": { "type": "Vector2" }, @@ -177291,8 +186109,10 @@ "name": "_get_contact_local_shape", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 923996154, "return_value": { "type": "int", "meta": "int32" @@ -177309,8 +186129,10 @@ "name": "_get_contact_local_velocity_at_position", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2299179447, "return_value": { "type": "Vector2" }, @@ -177326,8 +186148,10 @@ "name": "_get_contact_collider", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 495598643, "return_value": { "type": "RID" }, @@ -177343,8 +186167,10 @@ "name": "_get_contact_collider_position", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2299179447, "return_value": { "type": "Vector2" }, @@ -177360,8 +186186,10 @@ "name": "_get_contact_collider_id", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 923996154, "return_value": { "type": "int", "meta": "uint64" @@ -177378,8 +186206,10 @@ "name": "_get_contact_collider_object", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3332903315, "return_value": { "type": "Object" }, @@ -177395,8 +186225,10 @@ "name": "_get_contact_collider_shape", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 923996154, "return_value": { "type": "int", "meta": "int32" @@ -177413,8 +186245,10 @@ "name": "_get_contact_collider_velocity_at_position", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2299179447, "return_value": { "type": "Vector2" }, @@ -177430,8 +186264,10 @@ "name": "_get_contact_impulse", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2299179447, "return_value": { "type": "Vector2" }, @@ -177447,8 +186283,10 @@ "name": "_get_step", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1740695150, "return_value": { "type": "float", "meta": "float" @@ -177458,15 +186296,19 @@ "name": "_integrate_forces", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, - "is_virtual": true + "is_virtual": true, + "hash": 3218959716 }, { "name": "_get_space_state", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2506717822, "return_value": { "type": "PhysicsDirectSpaceState2D" } @@ -178235,8 +187077,10 @@ "name": "_get_total_gravity", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3360562783, "return_value": { "type": "Vector3" } @@ -178245,8 +187089,10 @@ "name": "_get_total_linear_damp", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1740695150, "return_value": { "type": "float", "meta": "float" @@ -178256,8 +187102,10 @@ "name": "_get_total_angular_damp", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1740695150, "return_value": { "type": "float", "meta": "float" @@ -178267,8 +187115,10 @@ "name": "_get_center_of_mass", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3360562783, "return_value": { "type": "Vector3" } @@ -178277,8 +187127,10 @@ "name": "_get_center_of_mass_local", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3360562783, "return_value": { "type": "Vector3" } @@ -178287,8 +187139,10 @@ "name": "_get_principal_inertia_axes", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2716978435, "return_value": { "type": "Basis" } @@ -178297,8 +187151,10 @@ "name": "_get_inverse_mass", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1740695150, "return_value": { "type": "float", "meta": "float" @@ -178308,8 +187164,10 @@ "name": "_get_inverse_inertia", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3360562783, "return_value": { "type": "Vector3" } @@ -178318,8 +187176,10 @@ "name": "_get_inverse_inertia_tensor", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2716978435, "return_value": { "type": "Basis" } @@ -178328,8 +187188,10 @@ "name": "_set_linear_velocity", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3460891852, "arguments": [ { "name": "velocity", @@ -178341,8 +187203,10 @@ "name": "_get_linear_velocity", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3360562783, "return_value": { "type": "Vector3" } @@ -178351,8 +187215,10 @@ "name": "_set_angular_velocity", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3460891852, "arguments": [ { "name": "velocity", @@ -178364,8 +187230,10 @@ "name": "_get_angular_velocity", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3360562783, "return_value": { "type": "Vector3" } @@ -178374,8 +187242,10 @@ "name": "_set_transform", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2952846383, "arguments": [ { "name": "transform", @@ -178387,8 +187257,10 @@ "name": "_get_transform", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3229777777, "return_value": { "type": "Transform3D" } @@ -178397,8 +187269,10 @@ "name": "_get_velocity_at_local_position", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 192990374, "return_value": { "type": "Vector3" }, @@ -178413,8 +187287,10 @@ "name": "_apply_central_impulse", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3460891852, "arguments": [ { "name": "impulse", @@ -178426,8 +187302,10 @@ "name": "_apply_impulse", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1714681797, "arguments": [ { "name": "impulse", @@ -178443,8 +187321,10 @@ "name": "_apply_torque_impulse", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3460891852, "arguments": [ { "name": "impulse", @@ -178456,8 +187336,10 @@ "name": "_apply_central_force", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3460891852, "arguments": [ { "name": "force", @@ -178469,8 +187351,10 @@ "name": "_apply_force", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1714681797, "arguments": [ { "name": "force", @@ -178486,8 +187370,10 @@ "name": "_apply_torque", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3460891852, "arguments": [ { "name": "torque", @@ -178499,8 +187385,10 @@ "name": "_add_constant_central_force", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3460891852, "arguments": [ { "name": "force", @@ -178512,8 +187400,10 @@ "name": "_add_constant_force", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1714681797, "arguments": [ { "name": "force", @@ -178529,8 +187419,10 @@ "name": "_add_constant_torque", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3460891852, "arguments": [ { "name": "torque", @@ -178542,8 +187434,10 @@ "name": "_set_constant_force", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3460891852, "arguments": [ { "name": "force", @@ -178555,8 +187449,10 @@ "name": "_get_constant_force", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3360562783, "return_value": { "type": "Vector3" } @@ -178565,8 +187461,10 @@ "name": "_set_constant_torque", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3460891852, "arguments": [ { "name": "torque", @@ -178578,8 +187476,10 @@ "name": "_get_constant_torque", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3360562783, "return_value": { "type": "Vector3" } @@ -178588,8 +187488,10 @@ "name": "_set_sleep_state", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2586408642, "arguments": [ { "name": "enabled", @@ -178601,8 +187503,10 @@ "name": "_is_sleeping", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 36873697, "return_value": { "type": "bool" } @@ -178611,8 +187515,10 @@ "name": "_get_contact_count", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3905245786, "return_value": { "type": "int", "meta": "int32" @@ -178622,8 +187528,10 @@ "name": "_get_contact_local_position", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 711720468, "return_value": { "type": "Vector3" }, @@ -178639,8 +187547,10 @@ "name": "_get_contact_local_normal", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 711720468, "return_value": { "type": "Vector3" }, @@ -178656,8 +187566,10 @@ "name": "_get_contact_impulse", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 711720468, "return_value": { "type": "Vector3" }, @@ -178673,8 +187585,10 @@ "name": "_get_contact_local_shape", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 923996154, "return_value": { "type": "int", "meta": "int32" @@ -178691,8 +187605,10 @@ "name": "_get_contact_local_velocity_at_position", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 711720468, "return_value": { "type": "Vector3" }, @@ -178708,8 +187624,10 @@ "name": "_get_contact_collider", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 495598643, "return_value": { "type": "RID" }, @@ -178725,8 +187643,10 @@ "name": "_get_contact_collider_position", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 711720468, "return_value": { "type": "Vector3" }, @@ -178742,8 +187662,10 @@ "name": "_get_contact_collider_id", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 923996154, "return_value": { "type": "int", "meta": "uint64" @@ -178760,8 +187682,10 @@ "name": "_get_contact_collider_object", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3332903315, "return_value": { "type": "Object" }, @@ -178777,8 +187701,10 @@ "name": "_get_contact_collider_shape", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 923996154, "return_value": { "type": "int", "meta": "int32" @@ -178795,8 +187721,10 @@ "name": "_get_contact_collider_velocity_at_position", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 711720468, "return_value": { "type": "Vector3" }, @@ -178812,8 +187740,10 @@ "name": "_get_step", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1740695150, "return_value": { "type": "float", "meta": "float" @@ -178823,15 +187753,19 @@ "name": "_integrate_forces", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, - "is_virtual": true + "is_virtual": true, + "hash": 3218959716 }, { "name": "_get_space_state", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2069328350, "return_value": { "type": "PhysicsDirectSpaceState3D" } @@ -178987,8 +187921,10 @@ "name": "_intersect_ray", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2840492092, "return_value": { "type": "bool" }, @@ -179028,8 +187964,10 @@ "name": "_intersect_point", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 522407812, "return_value": { "type": "int", "meta": "int32" @@ -179072,8 +188010,10 @@ "name": "_intersect_shape", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1584897015, "return_value": { "type": "int", "meta": "int32" @@ -179124,8 +188064,10 @@ "name": "_cast_motion", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1410701151, "return_value": { "type": "bool" }, @@ -179174,8 +188116,10 @@ "name": "_collide_shape", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 871510130, "return_value": { "type": "bool" }, @@ -179229,8 +188173,10 @@ "name": "_rest_info", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 772675997, "return_value": { "type": "bool" }, @@ -179439,8 +188385,10 @@ "name": "_intersect_ray", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2022529123, "return_value": { "type": "bool" }, @@ -179488,8 +188436,10 @@ "name": "_intersect_point", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3378904092, "return_value": { "type": "int", "meta": "int32" @@ -179527,8 +188477,10 @@ "name": "_intersect_shape", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 728953575, "return_value": { "type": "int", "meta": "int32" @@ -179579,8 +188531,10 @@ "name": "_cast_motion", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2320624824, "return_value": { "type": "bool" }, @@ -179633,8 +188587,10 @@ "name": "_collide_shape", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2320624824, "return_value": { "type": "bool" }, @@ -179688,8 +188644,10 @@ "name": "_rest_info", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 856242757, "return_value": { "type": "bool" }, @@ -179734,8 +188692,10 @@ "name": "_get_closest_point_to_object_volume", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2056183332, "return_value": { "type": "Vector3" }, @@ -183540,8 +192500,10 @@ "name": "_world_boundary_shape_create", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 529393457, "return_value": { "type": "RID" } @@ -183550,8 +192512,10 @@ "name": "_separation_ray_shape_create", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 529393457, "return_value": { "type": "RID" } @@ -183560,8 +192524,10 @@ "name": "_segment_shape_create", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 529393457, "return_value": { "type": "RID" } @@ -183570,8 +192536,10 @@ "name": "_circle_shape_create", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 529393457, "return_value": { "type": "RID" } @@ -183580,8 +192548,10 @@ "name": "_rectangle_shape_create", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 529393457, "return_value": { "type": "RID" } @@ -183590,8 +192560,10 @@ "name": "_capsule_shape_create", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 529393457, "return_value": { "type": "RID" } @@ -183600,8 +192572,10 @@ "name": "_convex_polygon_shape_create", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 529393457, "return_value": { "type": "RID" } @@ -183610,8 +192584,10 @@ "name": "_concave_polygon_shape_create", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 529393457, "return_value": { "type": "RID" } @@ -183620,8 +192596,10 @@ "name": "_shape_set_data", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3175752987, "arguments": [ { "name": "shape", @@ -183637,8 +192615,10 @@ "name": "_shape_set_custom_solver_bias", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1794382983, "arguments": [ { "name": "shape", @@ -183655,8 +192635,10 @@ "name": "_shape_get_type", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1240598777, "return_value": { "type": "enum::PhysicsServer2D.ShapeType" }, @@ -183671,8 +192653,10 @@ "name": "_shape_get_data", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 4171304767, "return_value": { "type": "Variant" }, @@ -183687,8 +192671,10 @@ "name": "_shape_get_custom_solver_bias", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 866169185, "return_value": { "type": "float", "meta": "float" @@ -183704,8 +192690,10 @@ "name": "_shape_collide", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 738864683, "return_value": { "type": "bool" }, @@ -183753,8 +192741,10 @@ "name": "_space_create", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 529393457, "return_value": { "type": "RID" } @@ -183763,8 +192753,10 @@ "name": "_space_set_active", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1265174801, "arguments": [ { "name": "space", @@ -183780,8 +192772,10 @@ "name": "_space_is_active", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 4155700596, "return_value": { "type": "bool" }, @@ -183796,8 +192790,10 @@ "name": "_space_set_param", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 949194586, "arguments": [ { "name": "space", @@ -183818,8 +192814,10 @@ "name": "_space_get_param", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 874111783, "return_value": { "type": "float", "meta": "float" @@ -183839,8 +192837,10 @@ "name": "_space_get_direct_state", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3160173886, "return_value": { "type": "PhysicsDirectSpaceState2D" }, @@ -183855,8 +192855,10 @@ "name": "_space_set_debug_contacts", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3411492887, "arguments": [ { "name": "space", @@ -183873,8 +192875,10 @@ "name": "_space_get_contacts", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2222557395, "return_value": { "type": "PackedVector2Array" }, @@ -183889,8 +192893,10 @@ "name": "_space_get_contact_count", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2198884583, "return_value": { "type": "int", "meta": "int32" @@ -183906,8 +192912,10 @@ "name": "_area_create", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 529393457, "return_value": { "type": "RID" } @@ -183916,8 +192924,10 @@ "name": "_area_set_space", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 395945892, "arguments": [ { "name": "area", @@ -183933,8 +192943,10 @@ "name": "_area_get_space", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3814569979, "return_value": { "type": "RID" }, @@ -183949,8 +192961,10 @@ "name": "_area_add_shape", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 888317420, "arguments": [ { "name": "area", @@ -183974,8 +192988,10 @@ "name": "_area_set_shape", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2310537182, "arguments": [ { "name": "area", @@ -183996,8 +193012,10 @@ "name": "_area_set_shape_transform", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 736082694, "arguments": [ { "name": "area", @@ -184018,8 +193036,10 @@ "name": "_area_set_shape_disabled", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2658558584, "arguments": [ { "name": "area", @@ -184040,8 +193060,10 @@ "name": "_area_get_shape_count", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2198884583, "return_value": { "type": "int", "meta": "int32" @@ -184057,8 +193079,10 @@ "name": "_area_get_shape", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1066463050, "return_value": { "type": "RID" }, @@ -184078,8 +193102,10 @@ "name": "_area_get_shape_transform", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1324854622, "return_value": { "type": "Transform2D" }, @@ -184099,8 +193125,10 @@ "name": "_area_remove_shape", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3411492887, "arguments": [ { "name": "area", @@ -184117,8 +193145,10 @@ "name": "_area_clear_shapes", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2722037293, "arguments": [ { "name": "area", @@ -184130,8 +193160,10 @@ "name": "_area_attach_object_instance_id", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3411492887, "arguments": [ { "name": "area", @@ -184148,8 +193180,10 @@ "name": "_area_get_object_instance_id", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2198884583, "return_value": { "type": "int", "meta": "uint64" @@ -184165,8 +193199,10 @@ "name": "_area_attach_canvas_instance_id", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3411492887, "arguments": [ { "name": "area", @@ -184183,8 +193219,10 @@ "name": "_area_get_canvas_instance_id", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2198884583, "return_value": { "type": "int", "meta": "uint64" @@ -184200,8 +193238,10 @@ "name": "_area_set_param", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1257146028, "arguments": [ { "name": "area", @@ -184221,8 +193261,10 @@ "name": "_area_set_transform", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1246044741, "arguments": [ { "name": "area", @@ -184238,8 +193280,10 @@ "name": "_area_get_param", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3047435120, "return_value": { "type": "Variant" }, @@ -184258,8 +193302,10 @@ "name": "_area_get_transform", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 213527486, "return_value": { "type": "Transform2D" }, @@ -184274,8 +193320,10 @@ "name": "_area_set_collision_layer", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3411492887, "arguments": [ { "name": "area", @@ -184292,8 +193340,10 @@ "name": "_area_get_collision_layer", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2198884583, "return_value": { "type": "int", "meta": "uint32" @@ -184309,8 +193359,10 @@ "name": "_area_set_collision_mask", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3411492887, "arguments": [ { "name": "area", @@ -184327,8 +193379,10 @@ "name": "_area_get_collision_mask", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2198884583, "return_value": { "type": "int", "meta": "uint32" @@ -184344,8 +193398,10 @@ "name": "_area_set_monitorable", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1265174801, "arguments": [ { "name": "area", @@ -184361,8 +193417,10 @@ "name": "_area_set_pickable", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1265174801, "arguments": [ { "name": "area", @@ -184378,8 +193436,10 @@ "name": "_area_set_monitor_callback", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3379118538, "arguments": [ { "name": "area", @@ -184395,8 +193455,10 @@ "name": "_area_set_area_monitor_callback", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3379118538, "arguments": [ { "name": "area", @@ -184412,8 +193474,10 @@ "name": "_body_create", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 529393457, "return_value": { "type": "RID" } @@ -184422,8 +193486,10 @@ "name": "_body_set_space", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 395945892, "arguments": [ { "name": "body", @@ -184439,8 +193505,10 @@ "name": "_body_get_space", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3814569979, "return_value": { "type": "RID" }, @@ -184455,8 +193523,10 @@ "name": "_body_set_mode", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1658067650, "arguments": [ { "name": "body", @@ -184472,8 +193542,10 @@ "name": "_body_get_mode", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3261702585, "return_value": { "type": "enum::PhysicsServer2D.BodyMode" }, @@ -184488,8 +193560,10 @@ "name": "_body_add_shape", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 888317420, "arguments": [ { "name": "body", @@ -184513,8 +193587,10 @@ "name": "_body_set_shape", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2310537182, "arguments": [ { "name": "body", @@ -184535,8 +193611,10 @@ "name": "_body_set_shape_transform", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 736082694, "arguments": [ { "name": "body", @@ -184557,8 +193635,10 @@ "name": "_body_get_shape_count", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2198884583, "return_value": { "type": "int", "meta": "int32" @@ -184574,8 +193654,10 @@ "name": "_body_get_shape", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1066463050, "return_value": { "type": "RID" }, @@ -184595,8 +193677,10 @@ "name": "_body_get_shape_transform", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1324854622, "return_value": { "type": "Transform2D" }, @@ -184616,8 +193700,10 @@ "name": "_body_set_shape_disabled", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2658558584, "arguments": [ { "name": "body", @@ -184638,8 +193724,10 @@ "name": "_body_set_shape_as_one_way_collision", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2556489974, "arguments": [ { "name": "body", @@ -184665,8 +193753,10 @@ "name": "_body_remove_shape", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3411492887, "arguments": [ { "name": "body", @@ -184683,8 +193773,10 @@ "name": "_body_clear_shapes", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2722037293, "arguments": [ { "name": "body", @@ -184696,8 +193788,10 @@ "name": "_body_attach_object_instance_id", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3411492887, "arguments": [ { "name": "body", @@ -184714,8 +193808,10 @@ "name": "_body_get_object_instance_id", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2198884583, "return_value": { "type": "int", "meta": "uint64" @@ -184731,8 +193827,10 @@ "name": "_body_attach_canvas_instance_id", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3411492887, "arguments": [ { "name": "body", @@ -184749,8 +193847,10 @@ "name": "_body_get_canvas_instance_id", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2198884583, "return_value": { "type": "int", "meta": "uint64" @@ -184766,8 +193866,10 @@ "name": "_body_set_continuous_collision_detection_mode", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1882257015, "arguments": [ { "name": "body", @@ -184783,8 +193885,10 @@ "name": "_body_get_continuous_collision_detection_mode", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2661282217, "return_value": { "type": "enum::PhysicsServer2D.CCDMode" }, @@ -184799,8 +193903,10 @@ "name": "_body_set_collision_layer", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3411492887, "arguments": [ { "name": "body", @@ -184817,8 +193923,10 @@ "name": "_body_get_collision_layer", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2198884583, "return_value": { "type": "int", "meta": "uint32" @@ -184834,8 +193942,10 @@ "name": "_body_set_collision_mask", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3411492887, "arguments": [ { "name": "body", @@ -184852,8 +193962,10 @@ "name": "_body_get_collision_mask", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2198884583, "return_value": { "type": "int", "meta": "uint32" @@ -184869,8 +193981,10 @@ "name": "_body_set_collision_priority", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1794382983, "arguments": [ { "name": "body", @@ -184887,8 +194001,10 @@ "name": "_body_get_collision_priority", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 866169185, "return_value": { "type": "float", "meta": "float" @@ -184904,8 +194020,10 @@ "name": "_body_set_param", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2715630609, "arguments": [ { "name": "body", @@ -184925,8 +194043,10 @@ "name": "_body_get_param", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3208033526, "return_value": { "type": "Variant" }, @@ -184945,8 +194065,10 @@ "name": "_body_reset_mass_properties", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2722037293, "arguments": [ { "name": "body", @@ -184958,8 +194080,10 @@ "name": "_body_set_state", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1706355209, "arguments": [ { "name": "body", @@ -184979,8 +194103,10 @@ "name": "_body_get_state", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 4036367961, "return_value": { "type": "Variant" }, @@ -184999,8 +194125,10 @@ "name": "_body_apply_central_impulse", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3201125042, "arguments": [ { "name": "body", @@ -185016,8 +194144,10 @@ "name": "_body_apply_torque_impulse", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1794382983, "arguments": [ { "name": "body", @@ -185034,8 +194164,10 @@ "name": "_body_apply_impulse", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2762675110, "arguments": [ { "name": "body", @@ -185055,8 +194187,10 @@ "name": "_body_apply_central_force", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3201125042, "arguments": [ { "name": "body", @@ -185072,8 +194206,10 @@ "name": "_body_apply_force", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2762675110, "arguments": [ { "name": "body", @@ -185093,8 +194229,10 @@ "name": "_body_apply_torque", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1794382983, "arguments": [ { "name": "body", @@ -185111,8 +194249,10 @@ "name": "_body_add_constant_central_force", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3201125042, "arguments": [ { "name": "body", @@ -185128,8 +194268,10 @@ "name": "_body_add_constant_force", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2762675110, "arguments": [ { "name": "body", @@ -185149,8 +194291,10 @@ "name": "_body_add_constant_torque", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1794382983, "arguments": [ { "name": "body", @@ -185167,8 +194311,10 @@ "name": "_body_set_constant_force", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3201125042, "arguments": [ { "name": "body", @@ -185184,8 +194330,10 @@ "name": "_body_get_constant_force", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2440833711, "return_value": { "type": "Vector2" }, @@ -185200,8 +194348,10 @@ "name": "_body_set_constant_torque", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1794382983, "arguments": [ { "name": "body", @@ -185218,8 +194368,10 @@ "name": "_body_get_constant_torque", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 866169185, "return_value": { "type": "float", "meta": "float" @@ -185235,8 +194387,10 @@ "name": "_body_set_axis_velocity", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3201125042, "arguments": [ { "name": "body", @@ -185252,8 +194406,10 @@ "name": "_body_add_collision_exception", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 395945892, "arguments": [ { "name": "body", @@ -185269,8 +194425,10 @@ "name": "_body_remove_collision_exception", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 395945892, "arguments": [ { "name": "body", @@ -185286,8 +194444,10 @@ "name": "_body_get_collision_exceptions", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2684255073, "return_value": { "type": "typedarray::RID" }, @@ -185302,8 +194462,10 @@ "name": "_body_set_max_contacts_reported", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3411492887, "arguments": [ { "name": "body", @@ -185320,8 +194482,10 @@ "name": "_body_get_max_contacts_reported", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2198884583, "return_value": { "type": "int", "meta": "int32" @@ -185337,8 +194501,10 @@ "name": "_body_set_contacts_reported_depth_threshold", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1794382983, "arguments": [ { "name": "body", @@ -185355,8 +194521,10 @@ "name": "_body_get_contacts_reported_depth_threshold", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 866169185, "return_value": { "type": "float", "meta": "float" @@ -185372,8 +194540,10 @@ "name": "_body_set_omit_force_integration", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1265174801, "arguments": [ { "name": "body", @@ -185389,8 +194559,10 @@ "name": "_body_is_omitting_force_integration", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 4155700596, "return_value": { "type": "bool" }, @@ -185405,8 +194577,10 @@ "name": "_body_set_state_sync_callback", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3379118538, "arguments": [ { "name": "body", @@ -185422,8 +194596,10 @@ "name": "_body_set_force_integration_callback", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2828036238, "arguments": [ { "name": "body", @@ -185443,8 +194619,10 @@ "name": "_body_collide_shape", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2131476465, "return_value": { "type": "bool" }, @@ -185489,8 +194667,10 @@ "name": "_body_set_pickable", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1265174801, "arguments": [ { "name": "body", @@ -185506,8 +194686,10 @@ "name": "_body_get_direct_state", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1191931871, "return_value": { "type": "PhysicsDirectBodyState2D" }, @@ -185522,8 +194704,10 @@ "name": "_body_test_motion", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 104979818, "return_value": { "type": "bool" }, @@ -185563,8 +194747,10 @@ "name": "_joint_create", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 529393457, "return_value": { "type": "RID" } @@ -185573,8 +194759,10 @@ "name": "_joint_clear", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2722037293, "arguments": [ { "name": "joint", @@ -185586,8 +194774,10 @@ "name": "_joint_set_param", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3972556514, "arguments": [ { "name": "joint", @@ -185608,8 +194798,10 @@ "name": "_joint_get_param", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 4016448949, "return_value": { "type": "float", "meta": "float" @@ -185629,8 +194821,10 @@ "name": "_joint_disable_collisions_between_bodies", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1265174801, "arguments": [ { "name": "joint", @@ -185646,8 +194840,10 @@ "name": "_joint_is_disabled_collisions_between_bodies", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 4155700596, "return_value": { "type": "bool" }, @@ -185662,8 +194858,10 @@ "name": "_joint_make_pin", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2607799521, "arguments": [ { "name": "joint", @@ -185687,8 +194885,10 @@ "name": "_joint_make_groove", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 438649616, "arguments": [ { "name": "joint", @@ -185720,8 +194920,10 @@ "name": "_joint_make_damped_spring", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1276049561, "arguments": [ { "name": "joint", @@ -185749,8 +194951,10 @@ "name": "_pin_joint_set_flag", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3520002352, "arguments": [ { "name": "joint", @@ -185770,8 +194974,10 @@ "name": "_pin_joint_get_flag", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2647867364, "return_value": { "type": "bool" }, @@ -185790,8 +194996,10 @@ "name": "_pin_joint_set_param", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 550574241, "arguments": [ { "name": "joint", @@ -185812,8 +195020,10 @@ "name": "_pin_joint_get_param", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 348281383, "return_value": { "type": "float", "meta": "float" @@ -185833,8 +195043,10 @@ "name": "_damped_spring_joint_set_param", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 220564071, "arguments": [ { "name": "joint", @@ -185855,8 +195067,10 @@ "name": "_damped_spring_joint_get_param", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2075871277, "return_value": { "type": "float", "meta": "float" @@ -185876,8 +195090,10 @@ "name": "_joint_get_type", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 4262502231, "return_value": { "type": "enum::PhysicsServer2D.JointType" }, @@ -185892,8 +195108,10 @@ "name": "_free_rid", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2722037293, "arguments": [ { "name": "rid", @@ -185905,8 +195123,10 @@ "name": "_set_active", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2586408642, "arguments": [ { "name": "active", @@ -185918,15 +195138,19 @@ "name": "_init", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, - "is_virtual": true + "is_virtual": true, + "hash": 3218959716 }, { "name": "_step", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 373806689, "arguments": [ { "name": "step", @@ -185939,36 +195163,46 @@ "name": "_sync", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, - "is_virtual": true + "is_virtual": true, + "hash": 3218959716 }, { "name": "_flush_queries", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, - "is_virtual": true + "is_virtual": true, + "hash": 3218959716 }, { "name": "_end_sync", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, - "is_virtual": true + "is_virtual": true, + "hash": 3218959716 }, { "name": "_finish", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, - "is_virtual": true + "is_virtual": true, + "hash": 3218959716 }, { "name": "_is_flushing_queries", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 36873697, "return_value": { "type": "bool" } @@ -185977,8 +195211,10 @@ "name": "_get_process_info", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 576496006, "return_value": { "type": "int", "meta": "int32" @@ -190017,8 +199253,10 @@ "name": "_world_boundary_shape_create", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 529393457, "return_value": { "type": "RID" } @@ -190027,8 +199265,10 @@ "name": "_separation_ray_shape_create", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 529393457, "return_value": { "type": "RID" } @@ -190037,8 +199277,10 @@ "name": "_sphere_shape_create", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 529393457, "return_value": { "type": "RID" } @@ -190047,8 +199289,10 @@ "name": "_box_shape_create", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 529393457, "return_value": { "type": "RID" } @@ -190057,8 +199301,10 @@ "name": "_capsule_shape_create", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 529393457, "return_value": { "type": "RID" } @@ -190067,8 +199313,10 @@ "name": "_cylinder_shape_create", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 529393457, "return_value": { "type": "RID" } @@ -190077,8 +199325,10 @@ "name": "_convex_polygon_shape_create", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 529393457, "return_value": { "type": "RID" } @@ -190087,8 +199337,10 @@ "name": "_concave_polygon_shape_create", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 529393457, "return_value": { "type": "RID" } @@ -190097,8 +199349,10 @@ "name": "_heightmap_shape_create", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 529393457, "return_value": { "type": "RID" } @@ -190107,8 +199361,10 @@ "name": "_custom_shape_create", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 529393457, "return_value": { "type": "RID" } @@ -190117,8 +199373,10 @@ "name": "_shape_set_data", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3175752987, "arguments": [ { "name": "shape", @@ -190134,8 +199392,10 @@ "name": "_shape_set_custom_solver_bias", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1794382983, "arguments": [ { "name": "shape", @@ -190152,8 +199412,10 @@ "name": "_shape_set_margin", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1794382983, "arguments": [ { "name": "shape", @@ -190170,8 +199432,10 @@ "name": "_shape_get_margin", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 866169185, "return_value": { "type": "float", "meta": "float" @@ -190187,8 +199451,10 @@ "name": "_shape_get_type", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3418923367, "return_value": { "type": "enum::PhysicsServer3D.ShapeType" }, @@ -190203,8 +199469,10 @@ "name": "_shape_get_data", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 4171304767, "return_value": { "type": "Variant" }, @@ -190219,8 +199487,10 @@ "name": "_shape_get_custom_solver_bias", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 866169185, "return_value": { "type": "float", "meta": "float" @@ -190236,8 +199506,10 @@ "name": "_space_create", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 529393457, "return_value": { "type": "RID" } @@ -190246,8 +199518,10 @@ "name": "_space_set_active", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1265174801, "arguments": [ { "name": "space", @@ -190263,8 +199537,10 @@ "name": "_space_is_active", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 4155700596, "return_value": { "type": "bool" }, @@ -190279,8 +199555,10 @@ "name": "_space_set_param", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2406017470, "arguments": [ { "name": "space", @@ -190301,8 +199579,10 @@ "name": "_space_get_param", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1523206731, "return_value": { "type": "float", "meta": "float" @@ -190322,8 +199602,10 @@ "name": "_space_get_direct_state", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2048616813, "return_value": { "type": "PhysicsDirectSpaceState3D" }, @@ -190338,8 +199620,10 @@ "name": "_space_set_debug_contacts", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3411492887, "arguments": [ { "name": "space", @@ -190356,8 +199640,10 @@ "name": "_space_get_contacts", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 808965560, "return_value": { "type": "PackedVector3Array" }, @@ -190372,8 +199658,10 @@ "name": "_space_get_contact_count", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2198884583, "return_value": { "type": "int", "meta": "int32" @@ -190389,8 +199677,10 @@ "name": "_area_create", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 529393457, "return_value": { "type": "RID" } @@ -190399,8 +199689,10 @@ "name": "_area_set_space", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 395945892, "arguments": [ { "name": "area", @@ -190416,8 +199708,10 @@ "name": "_area_get_space", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3814569979, "return_value": { "type": "RID" }, @@ -190432,8 +199726,10 @@ "name": "_area_add_shape", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2153848567, "arguments": [ { "name": "area", @@ -190457,8 +199753,10 @@ "name": "_area_set_shape", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2310537182, "arguments": [ { "name": "area", @@ -190479,8 +199777,10 @@ "name": "_area_set_shape_transform", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 675327471, "arguments": [ { "name": "area", @@ -190501,8 +199801,10 @@ "name": "_area_set_shape_disabled", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2658558584, "arguments": [ { "name": "area", @@ -190523,8 +199825,10 @@ "name": "_area_get_shape_count", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2198884583, "return_value": { "type": "int", "meta": "int32" @@ -190540,8 +199844,10 @@ "name": "_area_get_shape", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1066463050, "return_value": { "type": "RID" }, @@ -190561,8 +199867,10 @@ "name": "_area_get_shape_transform", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1050775521, "return_value": { "type": "Transform3D" }, @@ -190582,8 +199890,10 @@ "name": "_area_remove_shape", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3411492887, "arguments": [ { "name": "area", @@ -190600,8 +199910,10 @@ "name": "_area_clear_shapes", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2722037293, "arguments": [ { "name": "area", @@ -190613,8 +199925,10 @@ "name": "_area_attach_object_instance_id", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3411492887, "arguments": [ { "name": "area", @@ -190631,8 +199945,10 @@ "name": "_area_get_object_instance_id", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2198884583, "return_value": { "type": "int", "meta": "uint64" @@ -190648,8 +199964,10 @@ "name": "_area_set_param", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2980114638, "arguments": [ { "name": "area", @@ -190669,8 +199987,10 @@ "name": "_area_set_transform", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3935195649, "arguments": [ { "name": "area", @@ -190686,8 +200006,10 @@ "name": "_area_get_param", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 890056067, "return_value": { "type": "Variant" }, @@ -190706,8 +200028,10 @@ "name": "_area_get_transform", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1128465797, "return_value": { "type": "Transform3D" }, @@ -190722,8 +200046,10 @@ "name": "_area_set_collision_layer", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3411492887, "arguments": [ { "name": "area", @@ -190740,8 +200066,10 @@ "name": "_area_get_collision_layer", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2198884583, "return_value": { "type": "int", "meta": "uint32" @@ -190757,8 +200085,10 @@ "name": "_area_set_collision_mask", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3411492887, "arguments": [ { "name": "area", @@ -190775,8 +200105,10 @@ "name": "_area_get_collision_mask", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2198884583, "return_value": { "type": "int", "meta": "uint32" @@ -190792,8 +200124,10 @@ "name": "_area_set_monitorable", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1265174801, "arguments": [ { "name": "area", @@ -190809,8 +200143,10 @@ "name": "_area_set_ray_pickable", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1265174801, "arguments": [ { "name": "area", @@ -190826,8 +200162,10 @@ "name": "_area_set_monitor_callback", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3379118538, "arguments": [ { "name": "area", @@ -190843,8 +200181,10 @@ "name": "_area_set_area_monitor_callback", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3379118538, "arguments": [ { "name": "area", @@ -190860,8 +200200,10 @@ "name": "_body_create", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 529393457, "return_value": { "type": "RID" } @@ -190870,8 +200212,10 @@ "name": "_body_set_space", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 395945892, "arguments": [ { "name": "body", @@ -190887,8 +200231,10 @@ "name": "_body_get_space", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3814569979, "return_value": { "type": "RID" }, @@ -190903,8 +200249,10 @@ "name": "_body_set_mode", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 606803466, "arguments": [ { "name": "body", @@ -190920,8 +200268,10 @@ "name": "_body_get_mode", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2488819728, "return_value": { "type": "enum::PhysicsServer3D.BodyMode" }, @@ -190936,8 +200286,10 @@ "name": "_body_add_shape", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2153848567, "arguments": [ { "name": "body", @@ -190961,8 +200313,10 @@ "name": "_body_set_shape", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2310537182, "arguments": [ { "name": "body", @@ -190983,8 +200337,10 @@ "name": "_body_set_shape_transform", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 675327471, "arguments": [ { "name": "body", @@ -191005,8 +200361,10 @@ "name": "_body_set_shape_disabled", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2658558584, "arguments": [ { "name": "body", @@ -191027,8 +200385,10 @@ "name": "_body_get_shape_count", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2198884583, "return_value": { "type": "int", "meta": "int32" @@ -191044,8 +200404,10 @@ "name": "_body_get_shape", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1066463050, "return_value": { "type": "RID" }, @@ -191065,8 +200427,10 @@ "name": "_body_get_shape_transform", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1050775521, "return_value": { "type": "Transform3D" }, @@ -191086,8 +200450,10 @@ "name": "_body_remove_shape", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3411492887, "arguments": [ { "name": "body", @@ -191104,8 +200470,10 @@ "name": "_body_clear_shapes", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2722037293, "arguments": [ { "name": "body", @@ -191117,8 +200485,10 @@ "name": "_body_attach_object_instance_id", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3411492887, "arguments": [ { "name": "body", @@ -191135,8 +200505,10 @@ "name": "_body_get_object_instance_id", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2198884583, "return_value": { "type": "int", "meta": "uint64" @@ -191152,8 +200524,10 @@ "name": "_body_set_enable_continuous_collision_detection", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1265174801, "arguments": [ { "name": "body", @@ -191169,8 +200543,10 @@ "name": "_body_is_continuous_collision_detection_enabled", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 4155700596, "return_value": { "type": "bool" }, @@ -191185,8 +200561,10 @@ "name": "_body_set_collision_layer", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3411492887, "arguments": [ { "name": "body", @@ -191203,8 +200581,10 @@ "name": "_body_get_collision_layer", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2198884583, "return_value": { "type": "int", "meta": "uint32" @@ -191220,8 +200600,10 @@ "name": "_body_set_collision_mask", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3411492887, "arguments": [ { "name": "body", @@ -191238,8 +200620,10 @@ "name": "_body_get_collision_mask", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2198884583, "return_value": { "type": "int", "meta": "uint32" @@ -191255,8 +200639,10 @@ "name": "_body_set_collision_priority", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1794382983, "arguments": [ { "name": "body", @@ -191273,8 +200659,10 @@ "name": "_body_get_collision_priority", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 866169185, "return_value": { "type": "float", "meta": "float" @@ -191290,8 +200678,10 @@ "name": "_body_set_user_flags", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3411492887, "arguments": [ { "name": "body", @@ -191308,8 +200698,10 @@ "name": "_body_get_user_flags", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2198884583, "return_value": { "type": "int", "meta": "uint32" @@ -191325,8 +200717,10 @@ "name": "_body_set_param", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 910941953, "arguments": [ { "name": "body", @@ -191346,8 +200740,10 @@ "name": "_body_get_param", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3385027841, "return_value": { "type": "Variant" }, @@ -191366,8 +200762,10 @@ "name": "_body_reset_mass_properties", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2722037293, "arguments": [ { "name": "body", @@ -191379,8 +200777,10 @@ "name": "_body_set_state", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 599977762, "arguments": [ { "name": "body", @@ -191400,8 +200800,10 @@ "name": "_body_get_state", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1850449534, "return_value": { "type": "Variant" }, @@ -191420,8 +200822,10 @@ "name": "_body_apply_central_impulse", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3227306858, "arguments": [ { "name": "body", @@ -191437,8 +200841,10 @@ "name": "_body_apply_impulse", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3214966418, "arguments": [ { "name": "body", @@ -191458,8 +200864,10 @@ "name": "_body_apply_torque_impulse", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3227306858, "arguments": [ { "name": "body", @@ -191475,8 +200883,10 @@ "name": "_body_apply_central_force", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3227306858, "arguments": [ { "name": "body", @@ -191492,8 +200902,10 @@ "name": "_body_apply_force", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3214966418, "arguments": [ { "name": "body", @@ -191513,8 +200925,10 @@ "name": "_body_apply_torque", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3227306858, "arguments": [ { "name": "body", @@ -191530,8 +200944,10 @@ "name": "_body_add_constant_central_force", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3227306858, "arguments": [ { "name": "body", @@ -191547,8 +200963,10 @@ "name": "_body_add_constant_force", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3214966418, "arguments": [ { "name": "body", @@ -191568,8 +200986,10 @@ "name": "_body_add_constant_torque", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3227306858, "arguments": [ { "name": "body", @@ -191585,8 +201005,10 @@ "name": "_body_set_constant_force", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3227306858, "arguments": [ { "name": "body", @@ -191602,8 +201024,10 @@ "name": "_body_get_constant_force", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 531438156, "return_value": { "type": "Vector3" }, @@ -191618,8 +201042,10 @@ "name": "_body_set_constant_torque", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3227306858, "arguments": [ { "name": "body", @@ -191635,8 +201061,10 @@ "name": "_body_get_constant_torque", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 531438156, "return_value": { "type": "Vector3" }, @@ -191651,8 +201079,10 @@ "name": "_body_set_axis_velocity", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3227306858, "arguments": [ { "name": "body", @@ -191668,8 +201098,10 @@ "name": "_body_set_axis_lock", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2020836892, "arguments": [ { "name": "body", @@ -191689,8 +201121,10 @@ "name": "_body_is_axis_locked", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 587853580, "return_value": { "type": "bool" }, @@ -191709,8 +201143,10 @@ "name": "_body_add_collision_exception", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 395945892, "arguments": [ { "name": "body", @@ -191726,8 +201162,10 @@ "name": "_body_remove_collision_exception", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 395945892, "arguments": [ { "name": "body", @@ -191743,8 +201181,10 @@ "name": "_body_get_collision_exceptions", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2684255073, "return_value": { "type": "typedarray::RID" }, @@ -191759,8 +201199,10 @@ "name": "_body_set_max_contacts_reported", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3411492887, "arguments": [ { "name": "body", @@ -191777,8 +201219,10 @@ "name": "_body_get_max_contacts_reported", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2198884583, "return_value": { "type": "int", "meta": "int32" @@ -191794,8 +201238,10 @@ "name": "_body_set_contacts_reported_depth_threshold", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1794382983, "arguments": [ { "name": "body", @@ -191812,8 +201258,10 @@ "name": "_body_get_contacts_reported_depth_threshold", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 866169185, "return_value": { "type": "float", "meta": "float" @@ -191829,8 +201277,10 @@ "name": "_body_set_omit_force_integration", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1265174801, "arguments": [ { "name": "body", @@ -191846,8 +201296,10 @@ "name": "_body_is_omitting_force_integration", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 4155700596, "return_value": { "type": "bool" }, @@ -191862,8 +201314,10 @@ "name": "_body_set_state_sync_callback", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3379118538, "arguments": [ { "name": "body", @@ -191879,8 +201333,10 @@ "name": "_body_set_force_integration_callback", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2828036238, "arguments": [ { "name": "body", @@ -191900,8 +201356,10 @@ "name": "_body_set_ray_pickable", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1265174801, "arguments": [ { "name": "body", @@ -191917,8 +201375,10 @@ "name": "_body_test_motion", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3627463434, "return_value": { "type": "bool" }, @@ -191963,8 +201423,10 @@ "name": "_body_get_direct_state", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3029727957, "return_value": { "type": "PhysicsDirectBodyState3D" }, @@ -191979,8 +201441,10 @@ "name": "_soft_body_create", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 529393457, "return_value": { "type": "RID" } @@ -191989,8 +201453,10 @@ "name": "_soft_body_update_rendering_server", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2218179753, "arguments": [ { "name": "body", @@ -192006,8 +201472,10 @@ "name": "_soft_body_set_space", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 395945892, "arguments": [ { "name": "body", @@ -192023,8 +201491,10 @@ "name": "_soft_body_get_space", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3814569979, "return_value": { "type": "RID" }, @@ -192039,8 +201509,10 @@ "name": "_soft_body_set_ray_pickable", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1265174801, "arguments": [ { "name": "body", @@ -192056,8 +201528,10 @@ "name": "_soft_body_set_collision_layer", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3411492887, "arguments": [ { "name": "body", @@ -192074,8 +201548,10 @@ "name": "_soft_body_get_collision_layer", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2198884583, "return_value": { "type": "int", "meta": "uint32" @@ -192091,8 +201567,10 @@ "name": "_soft_body_set_collision_mask", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3411492887, "arguments": [ { "name": "body", @@ -192109,8 +201587,10 @@ "name": "_soft_body_get_collision_mask", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2198884583, "return_value": { "type": "int", "meta": "uint32" @@ -192126,8 +201606,10 @@ "name": "_soft_body_add_collision_exception", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 395945892, "arguments": [ { "name": "body", @@ -192143,8 +201625,10 @@ "name": "_soft_body_remove_collision_exception", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 395945892, "arguments": [ { "name": "body", @@ -192160,8 +201644,10 @@ "name": "_soft_body_get_collision_exceptions", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2684255073, "return_value": { "type": "typedarray::RID" }, @@ -192176,8 +201662,10 @@ "name": "_soft_body_set_state", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 599977762, "arguments": [ { "name": "body", @@ -192197,8 +201685,10 @@ "name": "_soft_body_get_state", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1850449534, "return_value": { "type": "Variant" }, @@ -192217,8 +201707,10 @@ "name": "_soft_body_set_transform", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3935195649, "arguments": [ { "name": "body", @@ -192234,8 +201726,10 @@ "name": "_soft_body_set_simulation_precision", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3411492887, "arguments": [ { "name": "body", @@ -192252,8 +201746,10 @@ "name": "_soft_body_get_simulation_precision", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2198884583, "return_value": { "type": "int", "meta": "int32" @@ -192269,8 +201765,10 @@ "name": "_soft_body_set_total_mass", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1794382983, "arguments": [ { "name": "body", @@ -192287,8 +201785,10 @@ "name": "_soft_body_get_total_mass", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 866169185, "return_value": { "type": "float", "meta": "float" @@ -192304,8 +201804,10 @@ "name": "_soft_body_set_linear_stiffness", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1794382983, "arguments": [ { "name": "body", @@ -192322,8 +201824,10 @@ "name": "_soft_body_get_linear_stiffness", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 866169185, "return_value": { "type": "float", "meta": "float" @@ -192339,8 +201843,10 @@ "name": "_soft_body_set_pressure_coefficient", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1794382983, "arguments": [ { "name": "body", @@ -192357,8 +201863,10 @@ "name": "_soft_body_get_pressure_coefficient", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 866169185, "return_value": { "type": "float", "meta": "float" @@ -192374,8 +201882,10 @@ "name": "_soft_body_set_damping_coefficient", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1794382983, "arguments": [ { "name": "body", @@ -192392,8 +201902,10 @@ "name": "_soft_body_get_damping_coefficient", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 866169185, "return_value": { "type": "float", "meta": "float" @@ -192409,8 +201921,10 @@ "name": "_soft_body_set_drag_coefficient", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1794382983, "arguments": [ { "name": "body", @@ -192427,8 +201941,10 @@ "name": "_soft_body_get_drag_coefficient", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 866169185, "return_value": { "type": "float", "meta": "float" @@ -192444,8 +201960,10 @@ "name": "_soft_body_set_mesh", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 395945892, "arguments": [ { "name": "body", @@ -192461,8 +201979,10 @@ "name": "_soft_body_get_bounds", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 974181306, "return_value": { "type": "AABB" }, @@ -192477,8 +201997,10 @@ "name": "_soft_body_move_point", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 831953689, "arguments": [ { "name": "body", @@ -192499,8 +202021,10 @@ "name": "_soft_body_get_point_global_position", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3440143363, "return_value": { "type": "Vector3" }, @@ -192520,8 +202044,10 @@ "name": "_soft_body_remove_all_pinned_points", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2722037293, "arguments": [ { "name": "body", @@ -192533,8 +202059,10 @@ "name": "_soft_body_pin_point", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2658558584, "arguments": [ { "name": "body", @@ -192555,8 +202083,10 @@ "name": "_soft_body_is_point_pinned", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3120086654, "return_value": { "type": "bool" }, @@ -192576,8 +202106,10 @@ "name": "_joint_create", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 529393457, "return_value": { "type": "RID" } @@ -192586,8 +202118,10 @@ "name": "_joint_clear", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2722037293, "arguments": [ { "name": "joint", @@ -192599,8 +202133,10 @@ "name": "_joint_make_pin", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 4280171926, "arguments": [ { "name": "joint", @@ -192628,8 +202164,10 @@ "name": "_pin_joint_set_param", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 810685294, "arguments": [ { "name": "joint", @@ -192650,8 +202188,10 @@ "name": "_pin_joint_get_param", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2817972347, "return_value": { "type": "float", "meta": "float" @@ -192671,8 +202211,10 @@ "name": "_pin_joint_set_local_a", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3227306858, "arguments": [ { "name": "joint", @@ -192688,8 +202230,10 @@ "name": "_pin_joint_get_local_a", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 531438156, "return_value": { "type": "Vector3" }, @@ -192704,8 +202248,10 @@ "name": "_pin_joint_set_local_b", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3227306858, "arguments": [ { "name": "joint", @@ -192721,8 +202267,10 @@ "name": "_pin_joint_get_local_b", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 531438156, "return_value": { "type": "Vector3" }, @@ -192737,8 +202285,10 @@ "name": "_joint_make_hinge", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1684107643, "arguments": [ { "name": "joint", @@ -192766,8 +202316,10 @@ "name": "_joint_make_hinge_simple", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 4069547571, "arguments": [ { "name": "joint", @@ -192803,8 +202355,10 @@ "name": "_hinge_joint_set_param", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3165502333, "arguments": [ { "name": "joint", @@ -192825,8 +202379,10 @@ "name": "_hinge_joint_get_param", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2129207581, "return_value": { "type": "float", "meta": "float" @@ -192846,8 +202402,10 @@ "name": "_hinge_joint_set_flag", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1601626188, "arguments": [ { "name": "joint", @@ -192867,8 +202425,10 @@ "name": "_hinge_joint_get_flag", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 4165147865, "return_value": { "type": "bool" }, @@ -192887,8 +202447,10 @@ "name": "_joint_make_slider", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1684107643, "arguments": [ { "name": "joint", @@ -192916,8 +202478,10 @@ "name": "_slider_joint_set_param", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2264833593, "arguments": [ { "name": "joint", @@ -192938,8 +202502,10 @@ "name": "_slider_joint_get_param", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3498644957, "return_value": { "type": "float", "meta": "float" @@ -192959,8 +202525,10 @@ "name": "_joint_make_cone_twist", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1684107643, "arguments": [ { "name": "joint", @@ -192988,8 +202556,10 @@ "name": "_cone_twist_joint_set_param", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 808587618, "arguments": [ { "name": "joint", @@ -193010,8 +202580,10 @@ "name": "_cone_twist_joint_get_param", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1134789658, "return_value": { "type": "float", "meta": "float" @@ -193031,8 +202603,10 @@ "name": "_joint_make_generic_6dof", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1684107643, "arguments": [ { "name": "joint", @@ -193060,8 +202634,10 @@ "name": "_generic_6dof_joint_set_param", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2600081391, "arguments": [ { "name": "joint", @@ -193086,8 +202662,10 @@ "name": "_generic_6dof_joint_get_param", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 467122058, "return_value": { "type": "float", "meta": "float" @@ -193111,8 +202689,10 @@ "name": "_generic_6dof_joint_set_flag", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3570926903, "arguments": [ { "name": "joint", @@ -193136,8 +202716,10 @@ "name": "_generic_6dof_joint_get_flag", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 4158090196, "return_value": { "type": "bool" }, @@ -193160,8 +202742,10 @@ "name": "_joint_get_type", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 4290791900, "return_value": { "type": "enum::PhysicsServer3D.JointType" }, @@ -193176,8 +202760,10 @@ "name": "_joint_set_solver_priority", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3411492887, "arguments": [ { "name": "joint", @@ -193194,8 +202780,10 @@ "name": "_joint_get_solver_priority", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2198884583, "return_value": { "type": "int", "meta": "int32" @@ -193211,8 +202799,10 @@ "name": "_joint_disable_collisions_between_bodies", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1265174801, "arguments": [ { "name": "joint", @@ -193228,8 +202818,10 @@ "name": "_joint_is_disabled_collisions_between_bodies", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 4155700596, "return_value": { "type": "bool" }, @@ -193244,8 +202836,10 @@ "name": "_free_rid", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2722037293, "arguments": [ { "name": "rid", @@ -193257,8 +202851,10 @@ "name": "_set_active", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2586408642, "arguments": [ { "name": "active", @@ -193270,15 +202866,19 @@ "name": "_init", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, - "is_virtual": true + "is_virtual": true, + "hash": 3218959716 }, { "name": "_step", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 373806689, "arguments": [ { "name": "step", @@ -193291,36 +202891,46 @@ "name": "_sync", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, - "is_virtual": true + "is_virtual": true, + "hash": 3218959716 }, { "name": "_flush_queries", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, - "is_virtual": true + "is_virtual": true, + "hash": 3218959716 }, { "name": "_end_sync", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, - "is_virtual": true + "is_virtual": true, + "hash": 3218959716 }, { "name": "_finish", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, - "is_virtual": true + "is_virtual": true, + "hash": 3218959716 }, { "name": "_is_flushing_queries", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 36873697, "return_value": { "type": "bool" } @@ -193329,8 +202939,10 @@ "name": "_get_process_info", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1332958745, "return_value": { "type": "int", "meta": "int32" @@ -193436,8 +203048,10 @@ "name": "_set_vertex", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1530502735, "arguments": [ { "name": "vertex_id", @@ -193454,8 +203068,10 @@ "name": "_set_normal", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1530502735, "arguments": [ { "name": "vertex_id", @@ -193472,8 +203088,10 @@ "name": "_set_aabb", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 259215842, "arguments": [ { "name": "aabb", @@ -195759,7 +205377,7 @@ ], "properties": [ { - "type": "Texture2D", + "type": "Texture2D,-AnimatedTexture,-AtlasTexture,-CameraTexture,-CanvasTexture,-MeshTexture,-Texture2DRD,-ViewportTexture", "name": "texture", "setter": "set_texture", "getter": "get_texture" @@ -198600,8 +208218,10 @@ "name": "_create_mesh_array", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3995934104, "return_value": { "type": "Array" } @@ -202661,7 +212281,10 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 1558064255, + "hash": 1526857008, + "hash_compatibility": [ + 1558064255 + ], "arguments": [ { "name": "bytecode", @@ -202680,7 +212303,10 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 3340165340, + "hash": 2689310080, + "hash_compatibility": [ + 3340165340 + ], "return_value": { "type": "RDShaderSPIRV" }, @@ -203243,6 +212869,56 @@ "type": "bitfield::RenderingDevice.TextureUsageBits" } }, + { + "name": "set_is_resolve_buffer", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 2586408642, + "arguments": [ + { + "name": "p_member", + "type": "bool" + } + ] + }, + { + "name": "get_is_resolve_buffer", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 36873697, + "return_value": { + "type": "bool" + } + }, + { + "name": "set_is_discardable", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 2586408642, + "arguments": [ + { + "name": "p_member", + "type": "bool" + } + ] + }, + { + "name": "get_is_discardable", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 36873697, + "return_value": { + "type": "bool" + } + }, { "name": "add_shareable_format", "is_const": false, @@ -203326,6 +213002,18 @@ "name": "usage_bits", "setter": "set_usage_bits", "getter": "get_usage_bits" + }, + { + "type": "bool", + "name": "is_resolve_buffer", + "setter": "set_is_resolve_buffer", + "getter": "get_is_resolve_buffer" + }, + { + "type": "bool", + "name": "is_discardable", + "setter": "set_is_discardable", + "getter": "get_is_discardable" } ] }, @@ -203987,8 +213675,10 @@ "name": "_value_changed", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 373806689, "arguments": [ { "name": "new_value", @@ -205563,6 +215253,33 @@ "meta": "float" } }, + { + "name": "set_blend_distance", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 373806689, + "arguments": [ + { + "name": "blend_distance", + "type": "float", + "meta": "float" + } + ] + }, + { + "name": "get_blend_distance", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1740695150, + "return_value": { + "type": "float", + "meta": "float" + } + }, { "name": "set_ambient_mode", "is_const": false, @@ -205912,6 +215629,12 @@ "setter": "set_intensity", "getter": "get_intensity" }, + { + "type": "float", + "name": "blend_distance", + "setter": "set_blend_distance", + "getter": "get_blend_distance" + }, { "type": "float", "name": "max_distance", @@ -206742,8 +216465,10 @@ "name": "_get_render_scene_buffers", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 2793216201, "return_value": { "type": "RenderSceneBuffers" } @@ -206752,8 +216477,10 @@ "name": "_get_render_scene_data", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1288715698, "return_value": { "type": "RenderSceneData" } @@ -206762,8 +216489,10 @@ "name": "_get_environment", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 2944877500, "return_value": { "type": "RID" } @@ -206772,8 +216501,10 @@ "name": "_get_camera_attributes", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 2944877500, "return_value": { "type": "RID" } @@ -207047,6 +216778,31 @@ "meta": "float" } ] + }, + { + "name": "get_anisotropic_filtering_level", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1617414954, + "return_value": { + "type": "enum::RenderingServer.ViewportAnisotropicFiltering" + } + }, + { + "name": "set_anisotropic_filtering_level", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 2559658741, + "arguments": [ + { + "name": "anisotropic_filtering_level", + "type": "enum::RenderingServer.ViewportAnisotropicFiltering" + } + ] } ], "properties": [ @@ -207103,6 +216859,12 @@ "name": "texture_mipmap_bias", "setter": "set_texture_mipmap_bias", "getter": "get_texture_mipmap_bias" + }, + { + "type": "int", + "name": "anisotropic_filtering_level", + "setter": "set_anisotropic_filtering_level", + "getter": "get_anisotropic_filtering_level" } ] }, @@ -207117,8 +216879,10 @@ "name": "_configure", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3072623270, "arguments": [ { "name": "config", @@ -207130,8 +216894,10 @@ "name": "_set_fsr_sharpness", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 373806689, "arguments": [ { "name": "fsr_sharpness", @@ -207144,8 +216910,10 @@ "name": "_set_texture_mipmap_bias", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 373806689, "arguments": [ { "name": "texture_mipmap_bias", @@ -207154,12 +216922,30 @@ } ] }, + { + "name": "_set_anisotropic_filtering_level", + "is_const": false, + "is_static": false, + "is_required": false, + "is_vararg": false, + "is_virtual": true, + "hash": 1286410249, + "arguments": [ + { + "name": "anisotropic_filtering_level", + "type": "int", + "meta": "int32" + } + ] + }, { "name": "_set_use_debanding", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 2586408642, "arguments": [ { "name": "use_debanding", @@ -207203,7 +216989,10 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 3559915770, + "hash": 2950875024, + "hash_compatibility": [ + 3559915770 + ], "return_value": { "type": "RID" }, @@ -207246,6 +217035,10 @@ { "name": "unique", "type": "bool" + }, + { + "name": "discardable", + "type": "bool" } ] }, @@ -207846,8 +217639,10 @@ "name": "_get_cam_transform", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3229777777, "return_value": { "type": "Transform3D" } @@ -207856,8 +217651,10 @@ "name": "_get_cam_projection", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 2910717950, "return_value": { "type": "Projection" } @@ -207866,8 +217663,10 @@ "name": "_get_view_count", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3905245786, "return_value": { "type": "int", "meta": "uint32" @@ -207877,8 +217676,10 @@ "name": "_get_view_eye_offset", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 711720468, "return_value": { "type": "Vector3" }, @@ -207894,8 +217695,10 @@ "name": "_get_view_projection", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3179846605, "return_value": { "type": "Projection" }, @@ -207911,8 +217714,10 @@ "name": "_get_uniform_buffer", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 2944877500, "return_value": { "type": "RID" } @@ -209293,6 +219098,20 @@ } ] }, + { + "name": "BufferCreationBits", + "is_bitfield": true, + "values": [ + { + "name": "BUFFER_CREATION_DEVICE_ADDRESS_BIT", + "value": 1 + }, + { + "name": "BUFFER_CREATION_AS_STORAGE_BIT", + "value": 2 + } + ] + }, { "name": "UniformType", "is_bitfield": false, @@ -209887,6 +219706,16 @@ } ] }, + { + "name": "Features", + "is_bitfield": false, + "values": [ + { + "name": "SUPPORTS_BUFFER_DEVICE_ADDRESS", + "value": 6 + } + ] + }, { "name": "Limit", "is_bitfield": false, @@ -210038,6 +219867,14 @@ { "name": "LIMIT_MAX_VIEWPORT_DIMENSIONS_Y", "value": 36 + }, + { + "name": "LIMIT_METALFX_TEMPORAL_SCALER_MIN_SCALE", + "value": 46 + }, + { + "name": "LIMIT_METALFX_TEMPORAL_SCALER_MAX_SCALE", + "value": 47 } ] }, @@ -210116,6 +219953,120 @@ "value": 786432 } ] + }, + { + "name": "DrawFlags", + "is_bitfield": true, + "values": [ + { + "name": "DRAW_DEFAULT_ALL", + "value": 0 + }, + { + "name": "DRAW_CLEAR_COLOR_0", + "value": 1 + }, + { + "name": "DRAW_CLEAR_COLOR_1", + "value": 2 + }, + { + "name": "DRAW_CLEAR_COLOR_2", + "value": 4 + }, + { + "name": "DRAW_CLEAR_COLOR_3", + "value": 8 + }, + { + "name": "DRAW_CLEAR_COLOR_4", + "value": 16 + }, + { + "name": "DRAW_CLEAR_COLOR_5", + "value": 32 + }, + { + "name": "DRAW_CLEAR_COLOR_6", + "value": 64 + }, + { + "name": "DRAW_CLEAR_COLOR_7", + "value": 128 + }, + { + "name": "DRAW_CLEAR_COLOR_MASK", + "value": 255 + }, + { + "name": "DRAW_CLEAR_COLOR_ALL", + "value": 255 + }, + { + "name": "DRAW_IGNORE_COLOR_0", + "value": 256 + }, + { + "name": "DRAW_IGNORE_COLOR_1", + "value": 512 + }, + { + "name": "DRAW_IGNORE_COLOR_2", + "value": 1024 + }, + { + "name": "DRAW_IGNORE_COLOR_3", + "value": 2048 + }, + { + "name": "DRAW_IGNORE_COLOR_4", + "value": 4096 + }, + { + "name": "DRAW_IGNORE_COLOR_5", + "value": 8192 + }, + { + "name": "DRAW_IGNORE_COLOR_6", + "value": 16384 + }, + { + "name": "DRAW_IGNORE_COLOR_7", + "value": 32768 + }, + { + "name": "DRAW_IGNORE_COLOR_MASK", + "value": 65280 + }, + { + "name": "DRAW_IGNORE_COLOR_ALL", + "value": 65280 + }, + { + "name": "DRAW_CLEAR_DEPTH", + "value": 65536 + }, + { + "name": "DRAW_IGNORE_DEPTH", + "value": 131072 + }, + { + "name": "DRAW_CLEAR_STENCIL", + "value": 262144 + }, + { + "name": "DRAW_IGNORE_STENCIL", + "value": 524288 + }, + { + "name": "DRAW_CLEAR_ALL", + "value": 327935 + }, + { + "name": "DRAW_IGNORE_ALL", + "value": 720640 + } + ] } ], "methods": [ @@ -210320,6 +220271,32 @@ } ] }, + { + "name": "texture_get_data_async", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 498832090, + "return_value": { + "type": "enum::Error" + }, + "arguments": [ + { + "name": "texture", + "type": "RID" + }, + { + "name": "layer", + "type": "int", + "meta": "uint32" + }, + { + "name": "callback", + "type": "Callable" + } + ] + }, { "name": "texture_is_format_supported_for_usage", "is_const": true, @@ -210375,6 +220352,41 @@ } ] }, + { + "name": "texture_set_discardable", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1265174801, + "arguments": [ + { + "name": "texture", + "type": "RID" + }, + { + "name": "discardable", + "type": "bool" + } + ] + }, + { + "name": "texture_is_discardable", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3521089500, + "return_value": { + "type": "bool" + }, + "arguments": [ + { + "name": "texture", + "type": "RID" + } + ] + }, { "name": "texture_copy", "is_const": false, @@ -210819,8 +220831,9 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 3410049843, + "hash": 2089548973, "hash_compatibility": [ + 3410049843, 3491282828 ], "return_value": { @@ -210838,9 +220851,9 @@ "default_value": "PackedByteArray()" }, { - "name": "use_as_storage", - "type": "bool", - "default_value": "false" + "name": "creation_bits", + "type": "bitfield::RenderingDevice.BufferCreationBits", + "default_value": "0" } ] }, @@ -210903,8 +220916,9 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 3935920523, + "hash": 2368684885, "hash_compatibility": [ + 3935920523, 975915977 ], "return_value": { @@ -210929,6 +220943,11 @@ "name": "use_restart_indices", "type": "bool", "default_value": "false" + }, + { + "name": "creation_bits", + "type": "bitfield::RenderingDevice.BufferCreationBits", + "default_value": "0" } ] }, @@ -211095,8 +221114,9 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 34556762, + "hash": 2089548973, "hash_compatibility": [ + 34556762, 1453158401 ], "return_value": { @@ -211112,6 +221132,11 @@ "name": "data", "type": "PackedByteArray", "default_value": "PackedByteArray()" + }, + { + "name": "creation_bits", + "type": "bitfield::RenderingDevice.BufferCreationBits", + "default_value": "0" } ] }, @@ -211121,8 +221146,9 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 2316365934, + "hash": 1609052553, "hash_compatibility": [ + 2316365934, 1173156076 ], "return_value": { @@ -211143,6 +221169,11 @@ "name": "usage", "type": "bitfield::RenderingDevice.StorageBufferUsage", "default_value": "0" + }, + { + "name": "creation_bits", + "type": "bitfield::RenderingDevice.BufferCreationBits", + "default_value": "0" } ] }, @@ -211353,6 +221384,57 @@ } ] }, + { + "name": "buffer_get_data_async", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 2370287848, + "return_value": { + "type": "enum::Error" + }, + "arguments": [ + { + "name": "buffer", + "type": "RID" + }, + { + "name": "callback", + "type": "Callable" + }, + { + "name": "offset_bytes", + "type": "int", + "meta": "uint32", + "default_value": "0" + }, + { + "name": "size_bytes", + "type": "int", + "meta": "uint32", + "default_value": "0" + } + ] + }, + { + "name": "buffer_get_device_address", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3917799429, + "return_value": { + "type": "int", + "meta": "uint64" + }, + "arguments": [ + { + "name": "buffer", + "type": "RID" + } + ] + }, { "name": "render_pipeline_create", "is_const": false, @@ -211572,10 +221654,11 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 3140542288, + "hash": 1317926357, "hash_compatibility": [ 2468082605, 2686605154, + 3140542288, 4252992020 ], "return_value": { @@ -211588,20 +221671,9 @@ "type": "RID" }, { - "name": "initial_color_action", - "type": "enum::RenderingDevice.InitialAction" - }, - { - "name": "final_color_action", - "type": "enum::RenderingDevice.FinalAction" - }, - { - "name": "initial_depth_action", - "type": "enum::RenderingDevice.InitialAction" - }, - { - "name": "final_depth_action", - "type": "enum::RenderingDevice.FinalAction" + "name": "draw_flags", + "type": "bitfield::RenderingDevice.DrawFlags", + "default_value": "0" }, { "name": "clear_color_values", @@ -211609,13 +221681,13 @@ "default_value": "PackedColorArray()" }, { - "name": "clear_depth", + "name": "clear_depth_value", "type": "float", "meta": "float", "default_value": "1.0" }, { - "name": "clear_stencil", + "name": "clear_stencil_value", "type": "int", "meta": "uint32", "default_value": "0" @@ -211858,6 +221930,47 @@ } ] }, + { + "name": "draw_list_draw_indirect", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1092133571, + "arguments": [ + { + "name": "draw_list", + "type": "int", + "meta": "int64" + }, + { + "name": "use_indices", + "type": "bool" + }, + { + "name": "buffer", + "type": "RID" + }, + { + "name": "offset", + "type": "int", + "meta": "uint32", + "default_value": "0" + }, + { + "name": "draw_count", + "type": "int", + "meta": "uint32", + "default_value": "1" + }, + { + "name": "stride", + "type": "int", + "meta": "uint32", + "default_value": "0" + } + ] + }, { "name": "draw_list_enable_scissor", "is_const": false, @@ -212209,6 +222322,23 @@ } ] }, + { + "name": "has_feature", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1772728326, + "return_value": { + "type": "bool" + }, + "arguments": [ + { + "name": "feature", + "type": "enum::RenderingDevice.Features" + } + ] + }, { "name": "limit_get", "is_const": true, @@ -212688,6 +222818,24 @@ } ], "enums": [ + { + "name": "TextureType", + "is_bitfield": false, + "values": [ + { + "name": "TEXTURE_TYPE_2D", + "value": 0 + }, + { + "name": "TEXTURE_TYPE_LAYERED", + "value": 1 + }, + { + "name": "TEXTURE_TYPE_3D", + "value": 2 + } + ] + }, { "name": "TextureLayeredType", "is_bitfield": false, @@ -213599,8 +223747,16 @@ "value": 2 }, { - "name": "VIEWPORT_SCALING_3D_MODE_MAX", + "name": "VIEWPORT_SCALING_3D_MODE_METALFX_SPATIAL", "value": 3 + }, + { + "name": "VIEWPORT_SCALING_3D_MODE_METALFX_TEMPORAL", + "value": 4 + }, + { + "name": "VIEWPORT_SCALING_3D_MODE_MAX", + "value": 5 } ] }, @@ -213744,6 +223900,36 @@ } ] }, + { + "name": "ViewportAnisotropicFiltering", + "is_bitfield": false, + "values": [ + { + "name": "VIEWPORT_ANISOTROPY_DISABLED", + "value": 0 + }, + { + "name": "VIEWPORT_ANISOTROPY_2X", + "value": 1 + }, + { + "name": "VIEWPORT_ANISOTROPY_4X", + "value": 2 + }, + { + "name": "VIEWPORT_ANISOTROPY_8X", + "value": 3 + }, + { + "name": "VIEWPORT_ANISOTROPY_16X", + "value": 4 + }, + { + "name": "VIEWPORT_ANISOTROPY_MAX", + "value": 5 + } + ] + }, { "name": "ViewportScreenSpaceAA", "is_bitfield": false, @@ -214193,6 +224379,10 @@ { "name": "ENV_TONE_MAPPER_ACES", "value": 3 + }, + { + "name": "ENV_TONE_MAPPER_AGX", + "value": 4 } ] }, @@ -214917,8 +225107,12 @@ "value": 27 }, { - "name": "GLOBAL_VAR_TYPE_MAX", + "name": "GLOBAL_VAR_TYPE_SAMPLEREXT", "value": 28 + }, + { + "name": "GLOBAL_VAR_TYPE_MAX", + "value": 29 } ] }, @@ -214949,6 +225143,56 @@ { "name": "RENDERING_INFO_VIDEO_MEM_USED", "value": 5 + }, + { + "name": "RENDERING_INFO_PIPELINE_COMPILATIONS_CANVAS", + "value": 6 + }, + { + "name": "RENDERING_INFO_PIPELINE_COMPILATIONS_MESH", + "value": 7 + }, + { + "name": "RENDERING_INFO_PIPELINE_COMPILATIONS_SURFACE", + "value": 8 + }, + { + "name": "RENDERING_INFO_PIPELINE_COMPILATIONS_DRAW", + "value": 9 + }, + { + "name": "RENDERING_INFO_PIPELINE_COMPILATIONS_SPECIALIZATION", + "value": 10 + } + ] + }, + { + "name": "PipelineSource", + "is_bitfield": false, + "values": [ + { + "name": "PIPELINE_SOURCE_CANVAS", + "value": 0 + }, + { + "name": "PIPELINE_SOURCE_MESH", + "value": 1 + }, + { + "name": "PIPELINE_SOURCE_SURFACE", + "value": 2 + }, + { + "name": "PIPELINE_SOURCE_DRAW", + "value": 3 + }, + { + "name": "PIPELINE_SOURCE_SPECIALIZATION", + "value": 4 + }, + { + "name": "PIPELINE_SOURCE_MAX", + "value": 5 } ] }, @@ -215063,6 +225307,58 @@ } ] }, + { + "name": "texture_create_from_native_handle", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1682977582, + "return_value": { + "type": "RID" + }, + "arguments": [ + { + "name": "type", + "type": "enum::RenderingServer.TextureType" + }, + { + "name": "format", + "type": "enum::Image.Format" + }, + { + "name": "native_handle", + "type": "int", + "meta": "uint64" + }, + { + "name": "width", + "type": "int", + "meta": "int32" + }, + { + "name": "height", + "type": "int", + "meta": "int32" + }, + { + "name": "depth", + "type": "int", + "meta": "int32" + }, + { + "name": "layers", + "type": "int", + "meta": "int32", + "default_value": "1" + }, + { + "name": "layered_type", + "type": "enum::RenderingServer.TextureLayeredType", + "default_value": "0" + } + ] + }, { "name": "texture_2d_update", "is_const": false, @@ -216103,6 +226399,25 @@ } ] }, + { + "name": "mesh_surface_remove", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3411492887, + "arguments": [ + { + "name": "mesh", + "type": "RID" + }, + { + "name": "surface", + "type": "int", + "meta": "int32" + } + ] + }, { "name": "mesh_clear", "is_const": false, @@ -216236,7 +226551,10 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 283685892, + "hash": 557240154, + "hash_compatibility": [ + 283685892 + ], "arguments": [ { "name": "multimesh", @@ -216260,6 +226578,11 @@ "name": "custom_data_format", "type": "bool", "default_value": "false" + }, + { + "name": "use_indirect", + "type": "bool", + "default_value": "false" } ] }, @@ -216603,6 +226926,40 @@ } ] }, + { + "name": "multimesh_get_command_buffer_rd_rid", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3814569979, + "return_value": { + "type": "RID" + }, + "arguments": [ + { + "name": "multimesh", + "type": "RID" + } + ] + }, + { + "name": "multimesh_get_buffer_rd_rid", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3814569979, + "return_value": { + "type": "RID" + }, + "arguments": [ + { + "name": "multimesh", + "type": "RID" + } + ] + }, { "name": "multimesh_get_buffer", "is_const": true, @@ -217056,6 +227413,25 @@ } ] }, + { + "name": "light_set_shadow_caster_mask", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3411492887, + "arguments": [ + { + "name": "light", + "type": "RID" + }, + { + "name": "mask", + "type": "int", + "meta": "uint32" + } + ] + }, { "name": "light_set_bake_mode", "is_const": false, @@ -217288,6 +227664,25 @@ } ] }, + { + "name": "reflection_probe_set_blend_distance", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1794382983, + "arguments": [ + { + "name": "probe", + "type": "RID" + }, + { + "name": "blend_distance", + "type": "float", + "meta": "float" + } + ] + }, { "name": "reflection_probe_set_ambient_mode", "is_const": false, @@ -218431,6 +228826,25 @@ } ] }, + { + "name": "particles_request_process_time", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1794382983, + "arguments": [ + { + "name": "particles", + "type": "RID" + }, + { + "name": "time", + "type": "float", + "meta": "float" + } + ] + }, { "name": "particles_set_explosiveness_ratio", "is_const": false, @@ -219097,6 +229511,25 @@ } ] }, + { + "name": "particles_collision_set_height_field_mask", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3411492887, + "arguments": [ + { + "name": "particles_collision", + "type": "RID" + }, + { + "name": "mask", + "type": "int", + "meta": "uint32" + } + ] + }, { "name": "fog_volume_create", "is_const": false, @@ -219686,6 +230119,24 @@ } ] }, + { + "name": "viewport_set_anisotropic_filtering_level", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3953214029, + "arguments": [ + { + "name": "viewport", + "type": "RID" + }, + { + "name": "anisotropic_filtering_level", + "type": "enum::RenderingServer.ViewportAnisotropicFiltering" + } + ] + }, { "name": "viewport_set_update_mode", "is_const": false, @@ -220661,6 +231112,25 @@ } ] }, + { + "name": "environment_set_camera_id", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3411492887, + "arguments": [ + { + "name": "env", + "type": "RID" + }, + { + "name": "id", + "type": "int", + "meta": "int32" + } + ] + }, { "name": "environment_set_sky", "is_const": false, @@ -220808,7 +231278,7 @@ "default_value": "1.0" }, { - "name": "sky_contibution", + "name": "sky_contribution", "type": "float", "meta": "float", "default_value": "0.0" @@ -223780,6 +234250,87 @@ } ] }, + { + "name": "canvas_item_set_instance_shader_parameter", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3477296213, + "arguments": [ + { + "name": "instance", + "type": "RID" + }, + { + "name": "parameter", + "type": "StringName" + }, + { + "name": "value", + "type": "Variant" + } + ] + }, + { + "name": "canvas_item_get_instance_shader_parameter", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 2621281810, + "return_value": { + "type": "Variant" + }, + "arguments": [ + { + "name": "instance", + "type": "RID" + }, + { + "name": "parameter", + "type": "StringName" + } + ] + }, + { + "name": "canvas_item_get_instance_shader_parameter_default_value", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 2621281810, + "return_value": { + "type": "Variant" + }, + "arguments": [ + { + "name": "instance", + "type": "RID" + }, + { + "name": "parameter", + "type": "StringName" + } + ] + }, + { + "name": "canvas_item_get_instance_shader_parameter_list", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 2684255073, + "return_value": { + "type": "typedarray::Dictionary" + }, + "arguments": [ + { + "name": "instance", + "type": "RID" + } + ] + }, { "name": "canvas_item_set_visibility_notifier", "is_const": false, @@ -224745,6 +235296,28 @@ "type": "String" } }, + { + "name": "get_current_rendering_driver_name", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 201670096, + "return_value": { + "type": "String" + } + }, + { + "name": "get_current_rendering_method", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 201670096, + "return_value": { + "type": "String" + } + }, { "name": "make_sphere_mesh", "is_const": false, @@ -225051,19 +235624,47 @@ "name": "_setup_local_to_scene", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, - "is_virtual": true + "is_virtual": true, + "hash": 3218959716 }, { "name": "_get_rid", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 2944877500, "return_value": { "type": "RID" } }, + { + "name": "_reset_state", + "is_const": false, + "is_static": false, + "is_required": false, + "is_vararg": false, + "is_virtual": true, + "hash": 3218959716 + }, + { + "name": "_set_path_cache", + "is_const": true, + "is_static": false, + "is_required": false, + "is_vararg": false, + "is_virtual": true, + "hash": 3089850668, + "arguments": [ + { + "name": "path", + "type": "String" + } + ] + }, { "name": "set_path", "is_const": false, @@ -225103,6 +235704,20 @@ "type": "String" } }, + { + "name": "set_path_cache", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 83702148, + "arguments": [ + { + "name": "path", + "type": "String" + } + ] + }, { "name": "set_name", "is_const": false, @@ -225183,6 +235798,60 @@ "is_virtual": false, "hash": 3218959716 }, + { + "name": "reset_state", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3218959716 + }, + { + "name": "set_id_for_path", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3186203200, + "arguments": [ + { + "name": "path", + "type": "String" + }, + { + "name": "id", + "type": "String" + } + ] + }, + { + "name": "get_id_for_path", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3135753539, + "return_value": { + "type": "String" + }, + "arguments": [ + { + "name": "path", + "type": "String" + } + ] + }, + { + "name": "is_built_in", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 36873697, + "return_value": { + "type": "bool" + } + }, { "name": "generate_scene_unique_id", "is_const": false, @@ -225320,8 +235989,10 @@ "name": "_get_recognized_extensions", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1139954409, "return_value": { "type": "PackedStringArray" } @@ -225330,8 +236001,10 @@ "name": "_recognize_path", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 2594487047, "return_value": { "type": "bool" }, @@ -225350,8 +236023,10 @@ "name": "_handles_type", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 2619796661, "return_value": { "type": "bool" }, @@ -225366,8 +236041,10 @@ "name": "_get_resource_type", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3135753539, "return_value": { "type": "String" }, @@ -225382,8 +236059,10 @@ "name": "_get_resource_script_class", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3135753539, "return_value": { "type": "String" }, @@ -225398,8 +236077,10 @@ "name": "_get_resource_uid", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1321353865, "return_value": { "type": "int", "meta": "int64" @@ -225415,8 +236096,10 @@ "name": "_get_dependencies", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 6257701, "return_value": { "type": "PackedStringArray" }, @@ -225435,8 +236118,10 @@ "name": "_rename_dependencies", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 223715120, "return_value": { "type": "enum::Error" }, @@ -225455,8 +236140,10 @@ "name": "_exists", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3927539163, "return_value": { "type": "bool" }, @@ -225471,8 +236158,10 @@ "name": "_get_classes_used", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 4291131558, "return_value": { "type": "PackedStringArray" }, @@ -225487,8 +236176,10 @@ "name": "_load", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 2885906527, "return_value": { "type": "Variant" }, @@ -225525,8 +236216,10 @@ "name": "_save", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 2794699034, "return_value": { "type": "enum::Error" }, @@ -225550,8 +236243,10 @@ "name": "_set_uid", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 993915709, "return_value": { "type": "enum::Error" }, @@ -225571,8 +236266,10 @@ "name": "_recognize", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3190994482, "return_value": { "type": "bool" }, @@ -225587,8 +236284,10 @@ "name": "_get_recognized_extensions", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1567505034, "return_value": { "type": "PackedStringArray" }, @@ -225603,8 +236302,10 @@ "name": "_recognize_path", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 710996192, "return_value": { "type": "bool" }, @@ -225726,7 +236427,7 @@ }, "arguments": [ { - "name": "buffer", + "name": "stream_data", "type": "PackedByteArray" } ] @@ -226106,6 +236807,23 @@ "type": "String" } ] + }, + { + "name": "list_directory", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3538744774, + "return_value": { + "type": "PackedStringArray" + }, + "arguments": [ + { + "name": "directory_path", + "type": "String" + } + ] } ] }, @@ -226347,6 +237065,29 @@ "type": "ResourceFormatSaver" } ] + }, + { + "name": "get_resource_id_for_path", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 150756522, + "return_value": { + "type": "int", + "meta": "int64" + }, + "arguments": [ + { + "name": "path", + "type": "String" + }, + { + "name": "generate", + "type": "bool", + "default_value": "false" + } + ] } ] }, @@ -226502,6 +237243,209 @@ } ] }, + { + "name": "RetargetModifier3D", + "is_refcounted": false, + "is_instantiable": true, + "inherits": "SkeletonModifier3D", + "api_type": "core", + "enums": [ + { + "name": "TransformFlag", + "is_bitfield": true, + "values": [ + { + "name": "TRANSFORM_FLAG_POSITION", + "value": 1 + }, + { + "name": "TRANSFORM_FLAG_ROTATION", + "value": 2 + }, + { + "name": "TRANSFORM_FLAG_SCALE", + "value": 4 + }, + { + "name": "TRANSFORM_FLAG_ALL", + "value": 7 + } + ] + } + ], + "methods": [ + { + "name": "set_profile", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3870374136, + "arguments": [ + { + "name": "profile", + "type": "SkeletonProfile" + } + ] + }, + { + "name": "get_profile", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 4291782652, + "return_value": { + "type": "SkeletonProfile" + } + }, + { + "name": "set_use_global_pose", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 2586408642, + "arguments": [ + { + "name": "use_global_pose", + "type": "bool" + } + ] + }, + { + "name": "is_using_global_pose", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 36873697, + "return_value": { + "type": "bool" + } + }, + { + "name": "set_enable_flags", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 2687954213, + "arguments": [ + { + "name": "enable_flags", + "type": "bitfield::RetargetModifier3D.TransformFlag" + } + ] + }, + { + "name": "get_enable_flags", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 358995420, + "return_value": { + "type": "bitfield::RetargetModifier3D.TransformFlag" + } + }, + { + "name": "set_position_enabled", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 2586408642, + "arguments": [ + { + "name": "enabled", + "type": "bool" + } + ] + }, + { + "name": "is_position_enabled", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 36873697, + "return_value": { + "type": "bool" + } + }, + { + "name": "set_rotation_enabled", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 2586408642, + "arguments": [ + { + "name": "enabled", + "type": "bool" + } + ] + }, + { + "name": "is_rotation_enabled", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 36873697, + "return_value": { + "type": "bool" + } + }, + { + "name": "set_scale_enabled", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 2586408642, + "arguments": [ + { + "name": "enabled", + "type": "bool" + } + ] + }, + { + "name": "is_scale_enabled", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 36873697, + "return_value": { + "type": "bool" + } + } + ], + "properties": [ + { + "type": "SkeletonProfile", + "name": "profile", + "setter": "set_profile", + "getter": "get_profile" + }, + { + "type": "bool", + "name": "use_global_pose", + "setter": "set_use_global_pose", + "getter": "is_using_global_pose" + }, + { + "type": "int", + "name": "enable", + "setter": "set_enable_flags", + "getter": "get_enable_flags" + } + ] + }, { "name": "RibbonTrailMesh", "is_refcounted": true, @@ -226734,8 +237678,10 @@ "name": "_process_custom_fx", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 31984339, "return_value": { "type": "bool" }, @@ -227289,8 +238235,9 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 2206155733, + "hash": 3765356747, "hash_compatibility": [ + 2206155733, 1114965689 ], "arguments": [ @@ -227302,6 +238249,11 @@ "name": "underline_mode", "type": "enum::RichTextLabel.MetaUnderline", "default_value": "1" + }, + { + "name": "tooltip", + "type": "String", + "default_value": "\"\"" } ] }, @@ -227431,10 +238383,11 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 2185176273, + "hash": 117236061, "hash_compatibility": [ 4258957458, - 4132157579 + 2185176273, + 4258957458 ], "arguments": [ { @@ -227451,6 +238404,11 @@ "type": "int", "meta": "int32", "default_value": "1" + }, + { + "name": "shrink", + "type": "bool", + "default_value": "true" } ] }, @@ -227737,6 +238695,31 @@ "type": "enum::HorizontalAlignment" } }, + { + "name": "set_vertical_alignment", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1796458609, + "arguments": [ + { + "name": "alignment", + "type": "enum::VerticalAlignment" + } + ] + }, + { + "name": "get_vertical_alignment", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3274884059, + "return_value": { + "type": "enum::VerticalAlignment" + } + }, { "name": "set_justification_flags", "is_const": false, @@ -228162,6 +239145,18 @@ "meta": "int32" } }, + { + "name": "get_selection_line_offset", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1740695150, + "return_value": { + "type": "float", + "meta": "float" + } + }, { "name": "select_all", "is_const": false, @@ -228468,6 +239463,24 @@ "meta": "int32" } }, + { + "name": "get_line_range", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3665014314, + "return_value": { + "type": "Vector2i" + }, + "arguments": [ + { + "name": "line", + "type": "int", + "meta": "int32" + } + ] + }, { "name": "get_visible_line_count", "is_const": true, @@ -228753,6 +239766,12 @@ "setter": "set_horizontal_alignment", "getter": "get_horizontal_alignment" }, + { + "type": "int", + "name": "vertical_alignment", + "setter": "set_vertical_alignment", + "getter": "get_vertical_alignment" + }, { "type": "int", "name": "justification_flags", @@ -228930,8 +239949,10 @@ "name": "_integrate_forces", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 370287496, "arguments": [ { "name": "state", @@ -229983,8 +241004,10 @@ "name": "_integrate_forces", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 420958145, "arguments": [ { "name": "state", @@ -233315,6 +244338,17 @@ "return_value": { "type": "bool" } + }, + { + "name": "get_rpc_config", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1214101251, + "return_value": { + "type": "Variant" + } } ], "properties": [ @@ -233513,6 +244547,20 @@ "type": "String" } ] + }, + { + "name": "update_docs_from_script", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3657522847, + "arguments": [ + { + "name": "script", + "type": "Script" + } + ] } ], "signals": [ @@ -233663,8 +244711,10 @@ "name": "_editor_can_reload_from_file", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2240911060, "return_value": { "type": "bool" } @@ -233673,8 +244723,10 @@ "name": "_placeholder_erased", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1286410249, "arguments": [ { "name": "placeholder", @@ -233686,8 +244738,10 @@ "name": "_can_instantiate", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 36873697, "return_value": { "type": "bool" } @@ -233696,8 +244750,10 @@ "name": "_get_base_script", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 278624046, "return_value": { "type": "Script" } @@ -233706,8 +244762,10 @@ "name": "_get_global_name", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2002593661, "return_value": { "type": "StringName" } @@ -233716,8 +244774,10 @@ "name": "_inherits_script", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3669307804, "return_value": { "type": "bool" }, @@ -233732,8 +244792,10 @@ "name": "_get_instance_base_type", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2002593661, "return_value": { "type": "StringName" } @@ -233742,8 +244804,10 @@ "name": "_instance_create", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1107568780, "return_value": { "type": "void*" }, @@ -233758,8 +244822,10 @@ "name": "_placeholder_instance_create", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1107568780, "return_value": { "type": "void*" }, @@ -233774,8 +244840,10 @@ "name": "_instance_has", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 397768994, "return_value": { "type": "bool" }, @@ -233790,8 +244858,10 @@ "name": "_has_source_code", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 36873697, "return_value": { "type": "bool" } @@ -233800,8 +244870,10 @@ "name": "_get_source_code", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 201670096, "return_value": { "type": "String" } @@ -233810,8 +244882,10 @@ "name": "_set_source_code", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 83702148, "arguments": [ { "name": "code", @@ -233823,8 +244897,10 @@ "name": "_reload", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1413768114, "return_value": { "type": "enum::Error" }, @@ -233835,12 +244911,26 @@ } ] }, + { + "name": "_get_doc_class_name", + "is_const": true, + "is_static": false, + "is_required": true, + "is_vararg": false, + "is_virtual": true, + "hash": 2002593661, + "return_value": { + "type": "StringName" + } + }, { "name": "_get_documentation", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3995934104, "return_value": { "type": "typedarray::Dictionary" } @@ -233849,8 +244939,10 @@ "name": "_get_class_icon_path", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 201670096, "return_value": { "type": "String" } @@ -233859,8 +244951,10 @@ "name": "_has_method", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2619796661, "return_value": { "type": "bool" }, @@ -233875,8 +244969,10 @@ "name": "_has_static_method", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2619796661, "return_value": { "type": "bool" }, @@ -233891,8 +244987,10 @@ "name": "_get_script_method_argument_count", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 2760726917, "return_value": { "type": "Variant" }, @@ -233907,8 +245005,10 @@ "name": "_get_method_info", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 4028089122, "return_value": { "type": "Dictionary" }, @@ -233923,8 +245023,10 @@ "name": "_is_tool", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 36873697, "return_value": { "type": "bool" } @@ -233933,8 +245035,10 @@ "name": "_is_valid", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 36873697, "return_value": { "type": "bool" } @@ -233943,8 +245047,10 @@ "name": "_is_abstract", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 36873697, "return_value": { "type": "bool" } @@ -233953,8 +245059,10 @@ "name": "_get_language", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3096237657, "return_value": { "type": "ScriptLanguage" } @@ -233963,8 +245071,10 @@ "name": "_has_script_signal", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2619796661, "return_value": { "type": "bool" }, @@ -233979,8 +245089,10 @@ "name": "_get_script_signal_list", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3995934104, "return_value": { "type": "typedarray::Dictionary" } @@ -233989,8 +245101,10 @@ "name": "_has_property_default_value", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2619796661, "return_value": { "type": "bool" }, @@ -234005,8 +245119,10 @@ "name": "_get_property_default_value", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2760726917, "return_value": { "type": "Variant" }, @@ -234021,15 +245137,19 @@ "name": "_update_exports", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, - "is_virtual": true + "is_virtual": true, + "hash": 3218959716 }, { "name": "_get_script_method_list", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3995934104, "return_value": { "type": "typedarray::Dictionary" } @@ -234038,8 +245158,10 @@ "name": "_get_script_property_list", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3995934104, "return_value": { "type": "typedarray::Dictionary" } @@ -234048,8 +245170,10 @@ "name": "_get_member_line", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2458036349, "return_value": { "type": "int", "meta": "int32" @@ -234065,8 +245189,10 @@ "name": "_get_constants", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3102165223, "return_value": { "type": "Dictionary" } @@ -234075,8 +245201,10 @@ "name": "_get_members", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3995934104, "return_value": { "type": "typedarray::StringName" } @@ -234085,8 +245213,10 @@ "name": "_is_placeholder_fallback_enabled", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 36873697, "return_value": { "type": "bool" } @@ -234095,8 +245225,10 @@ "name": "_get_rpc_config", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1214101251, "return_value": { "type": "Variant" } @@ -234182,8 +245314,16 @@ "value": 8 }, { - "name": "LOOKUP_RESULT_MAX", + "name": "LOOKUP_RESULT_LOCAL_CONSTANT", "value": 9 + }, + { + "name": "LOOKUP_RESULT_LOCAL_VARIABLE", + "value": 10 + }, + { + "name": "LOOKUP_RESULT_MAX", + "value": 11 } ] }, @@ -234265,8 +245405,10 @@ "name": "_get_name", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 201670096, "return_value": { "type": "String" } @@ -234275,15 +245417,19 @@ "name": "_init", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, - "is_virtual": true + "is_virtual": true, + "hash": 3218959716 }, { "name": "_get_type", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 201670096, "return_value": { "type": "String" } @@ -234292,8 +245438,10 @@ "name": "_get_extension", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 201670096, "return_value": { "type": "String" } @@ -234302,15 +245450,19 @@ "name": "_finish", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, - "is_virtual": true + "is_virtual": true, + "hash": 3218959716 }, { "name": "_get_reserved_words", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1139954409, "return_value": { "type": "PackedStringArray" } @@ -234319,8 +245471,10 @@ "name": "_is_control_flow_keyword", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3927539163, "return_value": { "type": "bool" }, @@ -234335,8 +245489,10 @@ "name": "_get_comment_delimiters", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1139954409, "return_value": { "type": "PackedStringArray" } @@ -234345,8 +245501,10 @@ "name": "_get_doc_comment_delimiters", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1139954409, "return_value": { "type": "PackedStringArray" } @@ -234355,8 +245513,10 @@ "name": "_get_string_delimiters", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1139954409, "return_value": { "type": "PackedStringArray" } @@ -234365,8 +245525,10 @@ "name": "_make_template", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3583744548, "return_value": { "type": "Script" }, @@ -234389,8 +245551,10 @@ "name": "_get_built_in_templates", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3147814860, "return_value": { "type": "typedarray::Dictionary" }, @@ -234405,8 +245569,10 @@ "name": "_is_using_templates", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2240911060, "return_value": { "type": "bool" } @@ -234415,8 +245581,10 @@ "name": "_validate", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1697887509, "return_value": { "type": "Dictionary" }, @@ -234451,8 +245619,10 @@ "name": "_validate_path", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3135753539, "return_value": { "type": "String" }, @@ -234467,8 +245637,10 @@ "name": "_create_script", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1981248198, "return_value": { "type": "Object" } @@ -234477,8 +245649,10 @@ "name": "_has_named_classes", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 36873697, "return_value": { "type": "bool" } @@ -234487,8 +245661,10 @@ "name": "_supports_builtin_mode", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 36873697, "return_value": { "type": "bool" } @@ -234497,8 +245673,10 @@ "name": "_supports_documentation", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 36873697, "return_value": { "type": "bool" } @@ -234507,8 +245685,10 @@ "name": "_can_inherit_from_file", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 36873697, "return_value": { "type": "bool" } @@ -234517,8 +245697,10 @@ "name": "_find_function", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2878152881, "return_value": { "type": "int", "meta": "int32" @@ -234538,8 +245720,10 @@ "name": "_make_function", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1243061914, "return_value": { "type": "String" }, @@ -234562,8 +245746,10 @@ "name": "_can_make_function", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 36873697, "return_value": { "type": "bool" } @@ -234572,8 +245758,10 @@ "name": "_open_in_external_editor", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 552845695, "return_value": { "type": "enum::Error" }, @@ -234598,8 +245786,10 @@ "name": "_overrides_external_editor", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2240911060, "return_value": { "type": "bool" } @@ -234608,8 +245798,10 @@ "name": "_preferred_file_name_casing", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 2969522789, "return_value": { "type": "enum::ScriptLanguage.ScriptNameCasing" } @@ -234618,8 +245810,10 @@ "name": "_complete_code", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 950756616, "return_value": { "type": "Dictionary" }, @@ -234642,8 +245836,10 @@ "name": "_lookup_code", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3143837309, "return_value": { "type": "Dictionary" }, @@ -234670,8 +245866,10 @@ "name": "_auto_indent_code", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2531480354, "return_value": { "type": "String" }, @@ -234696,8 +245894,10 @@ "name": "_add_global_constant", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3776071444, "arguments": [ { "name": "name", @@ -234713,8 +245913,10 @@ "name": "_add_named_global_constant", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3776071444, "arguments": [ { "name": "name", @@ -234730,8 +245932,10 @@ "name": "_remove_named_global_constant", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3304788590, "arguments": [ { "name": "name", @@ -234743,22 +245947,28 @@ "name": "_thread_enter", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, - "is_virtual": true + "is_virtual": true, + "hash": 3218959716 }, { "name": "_thread_exit", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, - "is_virtual": true + "is_virtual": true, + "hash": 3218959716 }, { "name": "_debug_get_error", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 201670096, "return_value": { "type": "String" } @@ -234767,8 +245977,10 @@ "name": "_debug_get_stack_level_count", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3905245786, "return_value": { "type": "int", "meta": "int32" @@ -234778,8 +245990,10 @@ "name": "_debug_get_stack_level_line", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 923996154, "return_value": { "type": "int", "meta": "int32" @@ -234796,8 +246010,10 @@ "name": "_debug_get_stack_level_function", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 844755477, "return_value": { "type": "String" }, @@ -234813,8 +246029,10 @@ "name": "_debug_get_stack_level_source", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 844755477, "return_value": { "type": "String" }, @@ -234830,8 +246048,10 @@ "name": "_debug_get_stack_level_locals", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 335235777, "return_value": { "type": "Dictionary" }, @@ -234857,8 +246077,10 @@ "name": "_debug_get_stack_level_members", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 335235777, "return_value": { "type": "Dictionary" }, @@ -234884,8 +246106,10 @@ "name": "_debug_get_stack_level_instance", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3744713108, "return_value": { "type": "void*" }, @@ -234901,8 +246125,10 @@ "name": "_debug_get_globals", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 4123630098, "return_value": { "type": "Dictionary" }, @@ -234923,8 +246149,10 @@ "name": "_debug_parse_stack_level_expression", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1135811067, "return_value": { "type": "String" }, @@ -234954,8 +246182,10 @@ "name": "_debug_get_current_stack_info", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2915620761, "return_value": { "type": "typedarray::Dictionary" } @@ -234964,15 +246194,19 @@ "name": "_reload_all_scripts", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, - "is_virtual": true + "is_virtual": true, + "hash": 3218959716 }, { "name": "_reload_scripts", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3156113851, "arguments": [ { "name": "scripts", @@ -234988,8 +246222,10 @@ "name": "_reload_tool_script", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1957307671, "arguments": [ { "name": "script", @@ -235005,8 +246241,10 @@ "name": "_get_recognized_extensions", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1139954409, "return_value": { "type": "PackedStringArray" } @@ -235015,8 +246253,10 @@ "name": "_get_public_functions", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3995934104, "return_value": { "type": "typedarray::Dictionary" } @@ -235025,8 +246265,10 @@ "name": "_get_public_constants", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3102165223, "return_value": { "type": "Dictionary" } @@ -235035,8 +246277,10 @@ "name": "_get_public_annotations", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3995934104, "return_value": { "type": "typedarray::Dictionary" } @@ -235045,22 +246289,28 @@ "name": "_profiling_start", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, - "is_virtual": true + "is_virtual": true, + "hash": 3218959716 }, { "name": "_profiling_stop", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, - "is_virtual": true + "is_virtual": true, + "hash": 3218959716 }, { "name": "_profiling_set_save_native_calls", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2586408642, "arguments": [ { "name": "enable", @@ -235072,8 +246322,10 @@ "name": "_profiling_get_accumulated_data", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 50157827, "return_value": { "type": "int", "meta": "int32" @@ -235094,8 +246346,10 @@ "name": "_profiling_get_frame_data", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 50157827, "return_value": { "type": "int", "meta": "int32" @@ -235116,15 +246370,19 @@ "name": "_frame", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, - "is_virtual": true + "is_virtual": true, + "hash": 3218959716 }, { "name": "_handles_global_class_type", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3927539163, "return_value": { "type": "bool" }, @@ -235139,8 +246397,10 @@ "name": "_get_global_class_name", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2248993622, "return_value": { "type": "Dictionary" }, @@ -235228,6 +246488,10 @@ { "name": "SCROLL_MODE_SHOW_NEVER", "value": 3 + }, + { + "name": "SCROLL_MODE_RESERVE", + "value": 4 } ] } @@ -235478,6 +246742,31 @@ "type": "Control" } ] + }, + { + "name": "set_draw_focus_border", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 2586408642, + "arguments": [ + { + "name": "draw", + "type": "bool" + } + ] + }, + { + "name": "get_draw_focus_border", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 2240911060, + "return_value": { + "type": "bool" + } } ], "signals": [ @@ -235495,6 +246784,12 @@ "setter": "set_follow_focus", "getter": "is_following_focus" }, + { + "type": "bool", + "name": "draw_focus_border", + "setter": "set_draw_focus_border", + "getter": "get_draw_focus_border" + }, { "type": "int", "name": "scroll_horizontal", @@ -235959,6 +247254,14 @@ "default_value": "false" } ] + }, + { + "name": "inspect_native_shader_code", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3218959716 } ], "properties": [ @@ -236019,6 +247322,60 @@ } ] }, + { + "name": "ShaderIncludeDB", + "is_refcounted": false, + "is_instantiable": true, + "inherits": "Object", + "api_type": "core", + "methods": [ + { + "name": "list_built_in_include_files", + "is_const": false, + "is_vararg": false, + "is_static": true, + "is_virtual": false, + "hash": 2981934095, + "return_value": { + "type": "PackedStringArray" + } + }, + { + "name": "has_built_in_include_file", + "is_const": false, + "is_vararg": false, + "is_static": true, + "is_virtual": false, + "hash": 2323990056, + "return_value": { + "type": "bool" + }, + "arguments": [ + { + "name": "filename", + "type": "String" + } + ] + }, + { + "name": "get_built_in_include_file", + "is_const": false, + "is_vararg": false, + "is_static": true, + "is_virtual": false, + "hash": 1703090593, + "return_value": { + "type": "String" + }, + "arguments": [ + { + "name": "filename", + "type": "String" + } + ] + } + ] + }, { "name": "ShaderMaterial", "is_refcounted": true, @@ -237868,6 +249225,91 @@ } ] }, + { + "name": "get_bone_meta", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 203112058, + "return_value": { + "type": "Variant" + }, + "arguments": [ + { + "name": "bone_idx", + "type": "int", + "meta": "int32" + }, + { + "name": "key", + "type": "StringName" + } + ] + }, + { + "name": "get_bone_meta_list", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 663333327, + "return_value": { + "type": "typedarray::StringName" + }, + "arguments": [ + { + "name": "bone_idx", + "type": "int", + "meta": "int32" + } + ] + }, + { + "name": "has_bone_meta", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 921227809, + "return_value": { + "type": "bool" + }, + "arguments": [ + { + "name": "bone_idx", + "type": "int", + "meta": "int32" + }, + { + "name": "key", + "type": "StringName" + } + ] + }, + { + "name": "set_bone_meta", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 702482756, + "arguments": [ + { + "name": "bone_idx", + "type": "int", + "meta": "int32" + }, + { + "name": "key", + "type": "StringName" + }, + { + "name": "value", + "type": "Variant" + } + ] + }, { "name": "get_concatenated_bone_names", "is_const": true, @@ -238585,6 +250027,9 @@ } ], "signals": [ + { + "name": "rest_updated" + }, { "name": "pose_updated" }, @@ -239017,8 +250462,10 @@ "name": "_execute", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 373806689, "arguments": [ { "name": "delta", @@ -239031,8 +250478,10 @@ "name": "_setup_modification", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3907307132, "arguments": [ { "name": "modification_stack", @@ -239044,8 +250493,10 @@ "name": "_draw_editor_gizmo", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, - "is_virtual": true + "is_virtual": true, + "hash": 3218959716 }, { "name": "set_enabled", @@ -241274,13 +252725,47 @@ "is_instantiable": true, "inherits": "Node3D", "api_type": "core", + "enums": [ + { + "name": "BoneAxis", + "is_bitfield": false, + "values": [ + { + "name": "BONE_AXIS_PLUS_X", + "value": 0 + }, + { + "name": "BONE_AXIS_MINUS_X", + "value": 1 + }, + { + "name": "BONE_AXIS_PLUS_Y", + "value": 2 + }, + { + "name": "BONE_AXIS_MINUS_Y", + "value": 3 + }, + { + "name": "BONE_AXIS_PLUS_Z", + "value": 4 + }, + { + "name": "BONE_AXIS_MINUS_Z", + "value": 5 + } + ] + } + ], "methods": [ { "name": "_process_modification", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, - "is_virtual": true + "is_virtual": true, + "hash": 3218959716 }, { "name": "get_skeleton", @@ -243050,7 +254535,10 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 3814935226, + "hash": 528784402, + "hash_compatibility": [ + 3814935226 + ], "arguments": [ { "name": "point_index", @@ -243065,6 +254553,12 @@ "name": "attachment_path", "type": "NodePath", "default_value": "NodePath(\"\")" + }, + { + "name": "insert_at", + "type": "int", + "meta": "int32", + "default_value": "-1" } ] }, @@ -243828,6 +255322,148 @@ "return_value": { "type": "bool" } + }, + { + "name": "set_dragging_enabled", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 2586408642, + "arguments": [ + { + "name": "dragging_enabled", + "type": "bool" + } + ] + }, + { + "name": "is_dragging_enabled", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 36873697, + "return_value": { + "type": "bool" + } + }, + { + "name": "set_drag_area_margin_begin", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1286410249, + "arguments": [ + { + "name": "margin", + "type": "int", + "meta": "int32" + } + ] + }, + { + "name": "get_drag_area_margin_begin", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3905245786, + "return_value": { + "type": "int", + "meta": "int32" + } + }, + { + "name": "set_drag_area_margin_end", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1286410249, + "arguments": [ + { + "name": "margin", + "type": "int", + "meta": "int32" + } + ] + }, + { + "name": "get_drag_area_margin_end", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3905245786, + "return_value": { + "type": "int", + "meta": "int32" + } + }, + { + "name": "set_drag_area_offset", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1286410249, + "arguments": [ + { + "name": "offset", + "type": "int", + "meta": "int32" + } + ] + }, + { + "name": "get_drag_area_offset", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3905245786, + "return_value": { + "type": "int", + "meta": "int32" + } + }, + { + "name": "set_drag_area_highlight_in_editor", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 2586408642, + "arguments": [ + { + "name": "drag_area_highlight_in_editor", + "type": "bool" + } + ] + }, + { + "name": "is_drag_area_highlight_in_editor_enabled", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 36873697, + "return_value": { + "type": "bool" + } + }, + { + "name": "get_drag_area_control", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 829782337, + "return_value": { + "type": "Control" + } } ], "signals": [ @@ -243839,6 +255475,12 @@ "type": "int" } ] + }, + { + "name": "drag_started" + }, + { + "name": "drag_ended" } ], "properties": [ @@ -243854,6 +255496,12 @@ "setter": "set_collapsed", "getter": "is_collapsed" }, + { + "type": "bool", + "name": "dragging_enabled", + "setter": "set_dragging_enabled", + "getter": "is_dragging_enabled" + }, { "type": "int", "name": "dragger_visibility", @@ -243865,6 +255513,30 @@ "name": "vertical", "setter": "set_vertical", "getter": "is_vertical" + }, + { + "type": "int", + "name": "drag_area_margin_begin", + "setter": "set_drag_area_margin_begin", + "getter": "get_drag_area_margin_begin" + }, + { + "type": "int", + "name": "drag_area_margin_end", + "setter": "set_drag_area_margin_end", + "getter": "get_drag_area_margin_end" + }, + { + "type": "int", + "name": "drag_area_offset", + "setter": "set_drag_area_offset", + "getter": "get_drag_area_offset" + }, + { + "type": "bool", + "name": "drag_area_highlight_in_editor", + "setter": "set_drag_area_highlight_in_editor", + "getter": "is_drag_area_highlight_in_editor_enabled" } ] }, @@ -244097,6 +255769,1905 @@ } ] }, + { + "name": "SpringBoneCollision3D", + "is_refcounted": false, + "is_instantiable": true, + "inherits": "Node3D", + "api_type": "core", + "methods": [ + { + "name": "get_skeleton", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1488626673, + "return_value": { + "type": "Skeleton3D" + } + }, + { + "name": "set_bone_name", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 83702148, + "arguments": [ + { + "name": "bone_name", + "type": "String" + } + ] + }, + { + "name": "get_bone_name", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 201670096, + "return_value": { + "type": "String" + } + }, + { + "name": "set_bone", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1286410249, + "arguments": [ + { + "name": "bone", + "type": "int", + "meta": "int32" + } + ] + }, + { + "name": "get_bone", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3905245786, + "return_value": { + "type": "int", + "meta": "int32" + } + }, + { + "name": "set_position_offset", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3460891852, + "arguments": [ + { + "name": "offset", + "type": "Vector3" + } + ] + }, + { + "name": "get_position_offset", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3360562783, + "return_value": { + "type": "Vector3" + } + }, + { + "name": "set_rotation_offset", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1727505552, + "arguments": [ + { + "name": "offset", + "type": "Quaternion" + } + ] + }, + { + "name": "get_rotation_offset", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1222331677, + "return_value": { + "type": "Quaternion" + } + } + ], + "properties": [ + { + "type": "StringName", + "name": "bone_name", + "setter": "set_bone_name", + "getter": "get_bone_name" + }, + { + "type": "int", + "name": "bone", + "setter": "set_bone", + "getter": "get_bone" + }, + { + "type": "Vector3", + "name": "position_offset", + "setter": "set_position_offset", + "getter": "get_position_offset" + }, + { + "type": "Quaternion", + "name": "rotation_offset", + "setter": "set_rotation_offset", + "getter": "get_rotation_offset" + } + ] + }, + { + "name": "SpringBoneCollisionCapsule3D", + "is_refcounted": false, + "is_instantiable": true, + "inherits": "SpringBoneCollision3D", + "api_type": "core", + "methods": [ + { + "name": "set_radius", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 373806689, + "arguments": [ + { + "name": "radius", + "type": "float", + "meta": "float" + } + ] + }, + { + "name": "get_radius", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1740695150, + "return_value": { + "type": "float", + "meta": "float" + } + }, + { + "name": "set_height", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 373806689, + "arguments": [ + { + "name": "height", + "type": "float", + "meta": "float" + } + ] + }, + { + "name": "get_height", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1740695150, + "return_value": { + "type": "float", + "meta": "float" + } + }, + { + "name": "set_inside", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 2586408642, + "arguments": [ + { + "name": "enabled", + "type": "bool" + } + ] + }, + { + "name": "is_inside", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 36873697, + "return_value": { + "type": "bool" + } + } + ], + "properties": [ + { + "type": "float", + "name": "radius", + "setter": "set_radius", + "getter": "get_radius" + }, + { + "type": "float", + "name": "height", + "setter": "set_height", + "getter": "get_height" + }, + { + "type": "bool", + "name": "inside", + "setter": "set_inside", + "getter": "is_inside" + } + ] + }, + { + "name": "SpringBoneCollisionPlane3D", + "is_refcounted": false, + "is_instantiable": true, + "inherits": "SpringBoneCollision3D", + "api_type": "core" + }, + { + "name": "SpringBoneCollisionSphere3D", + "is_refcounted": false, + "is_instantiable": true, + "inherits": "SpringBoneCollision3D", + "api_type": "core", + "methods": [ + { + "name": "set_radius", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 373806689, + "arguments": [ + { + "name": "radius", + "type": "float", + "meta": "float" + } + ] + }, + { + "name": "get_radius", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1740695150, + "return_value": { + "type": "float", + "meta": "float" + } + }, + { + "name": "set_inside", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 2586408642, + "arguments": [ + { + "name": "enabled", + "type": "bool" + } + ] + }, + { + "name": "is_inside", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 36873697, + "return_value": { + "type": "bool" + } + } + ], + "properties": [ + { + "type": "float", + "name": "radius", + "setter": "set_radius", + "getter": "get_radius" + }, + { + "type": "bool", + "name": "inside", + "setter": "set_inside", + "getter": "is_inside" + } + ] + }, + { + "name": "SpringBoneSimulator3D", + "is_refcounted": false, + "is_instantiable": true, + "inherits": "SkeletonModifier3D", + "api_type": "core", + "enums": [ + { + "name": "BoneDirection", + "is_bitfield": false, + "values": [ + { + "name": "BONE_DIRECTION_PLUS_X", + "value": 0 + }, + { + "name": "BONE_DIRECTION_MINUS_X", + "value": 1 + }, + { + "name": "BONE_DIRECTION_PLUS_Y", + "value": 2 + }, + { + "name": "BONE_DIRECTION_MINUS_Y", + "value": 3 + }, + { + "name": "BONE_DIRECTION_PLUS_Z", + "value": 4 + }, + { + "name": "BONE_DIRECTION_MINUS_Z", + "value": 5 + }, + { + "name": "BONE_DIRECTION_FROM_PARENT", + "value": 6 + } + ] + }, + { + "name": "CenterFrom", + "is_bitfield": false, + "values": [ + { + "name": "CENTER_FROM_WORLD_ORIGIN", + "value": 0 + }, + { + "name": "CENTER_FROM_NODE", + "value": 1 + }, + { + "name": "CENTER_FROM_BONE", + "value": 2 + } + ] + }, + { + "name": "RotationAxis", + "is_bitfield": false, + "values": [ + { + "name": "ROTATION_AXIS_X", + "value": 0 + }, + { + "name": "ROTATION_AXIS_Y", + "value": 1 + }, + { + "name": "ROTATION_AXIS_Z", + "value": 2 + }, + { + "name": "ROTATION_AXIS_ALL", + "value": 3 + } + ] + } + ], + "methods": [ + { + "name": "set_root_bone_name", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 501894301, + "arguments": [ + { + "name": "index", + "type": "int", + "meta": "int32" + }, + { + "name": "bone_name", + "type": "String" + } + ] + }, + { + "name": "get_root_bone_name", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 844755477, + "return_value": { + "type": "String" + }, + "arguments": [ + { + "name": "index", + "type": "int", + "meta": "int32" + } + ] + }, + { + "name": "set_root_bone", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3937882851, + "arguments": [ + { + "name": "index", + "type": "int", + "meta": "int32" + }, + { + "name": "bone", + "type": "int", + "meta": "int32" + } + ] + }, + { + "name": "get_root_bone", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 923996154, + "return_value": { + "type": "int", + "meta": "int32" + }, + "arguments": [ + { + "name": "index", + "type": "int", + "meta": "int32" + } + ] + }, + { + "name": "set_end_bone_name", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 501894301, + "arguments": [ + { + "name": "index", + "type": "int", + "meta": "int32" + }, + { + "name": "bone_name", + "type": "String" + } + ] + }, + { + "name": "get_end_bone_name", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 844755477, + "return_value": { + "type": "String" + }, + "arguments": [ + { + "name": "index", + "type": "int", + "meta": "int32" + } + ] + }, + { + "name": "set_end_bone", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3937882851, + "arguments": [ + { + "name": "index", + "type": "int", + "meta": "int32" + }, + { + "name": "bone", + "type": "int", + "meta": "int32" + } + ] + }, + { + "name": "get_end_bone", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 923996154, + "return_value": { + "type": "int", + "meta": "int32" + }, + "arguments": [ + { + "name": "index", + "type": "int", + "meta": "int32" + } + ] + }, + { + "name": "set_extend_end_bone", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 300928843, + "arguments": [ + { + "name": "index", + "type": "int", + "meta": "int32" + }, + { + "name": "enabled", + "type": "bool" + } + ] + }, + { + "name": "is_end_bone_extended", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1116898809, + "return_value": { + "type": "bool" + }, + "arguments": [ + { + "name": "index", + "type": "int", + "meta": "int32" + } + ] + }, + { + "name": "set_end_bone_direction", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 204796492, + "arguments": [ + { + "name": "index", + "type": "int", + "meta": "int32" + }, + { + "name": "bone_direction", + "type": "enum::SpringBoneSimulator3D.BoneDirection" + } + ] + }, + { + "name": "get_end_bone_direction", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 2438315700, + "return_value": { + "type": "enum::SpringBoneSimulator3D.BoneDirection" + }, + "arguments": [ + { + "name": "index", + "type": "int", + "meta": "int32" + } + ] + }, + { + "name": "set_end_bone_length", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1602489585, + "arguments": [ + { + "name": "index", + "type": "int", + "meta": "int32" + }, + { + "name": "length", + "type": "float", + "meta": "float" + } + ] + }, + { + "name": "get_end_bone_length", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 2339986948, + "return_value": { + "type": "float", + "meta": "float" + }, + "arguments": [ + { + "name": "index", + "type": "int", + "meta": "int32" + } + ] + }, + { + "name": "set_center_from", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 2551505749, + "arguments": [ + { + "name": "index", + "type": "int", + "meta": "int32" + }, + { + "name": "center_from", + "type": "enum::SpringBoneSimulator3D.CenterFrom" + } + ] + }, + { + "name": "get_center_from", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 2721930813, + "return_value": { + "type": "enum::SpringBoneSimulator3D.CenterFrom" + }, + "arguments": [ + { + "name": "index", + "type": "int", + "meta": "int32" + } + ] + }, + { + "name": "set_center_node", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 2761262315, + "arguments": [ + { + "name": "index", + "type": "int", + "meta": "int32" + }, + { + "name": "node_path", + "type": "NodePath" + } + ] + }, + { + "name": "get_center_node", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 408788394, + "return_value": { + "type": "NodePath" + }, + "arguments": [ + { + "name": "index", + "type": "int", + "meta": "int32" + } + ] + }, + { + "name": "set_center_bone_name", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 501894301, + "arguments": [ + { + "name": "index", + "type": "int", + "meta": "int32" + }, + { + "name": "bone_name", + "type": "String" + } + ] + }, + { + "name": "get_center_bone_name", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 844755477, + "return_value": { + "type": "String" + }, + "arguments": [ + { + "name": "index", + "type": "int", + "meta": "int32" + } + ] + }, + { + "name": "set_center_bone", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3937882851, + "arguments": [ + { + "name": "index", + "type": "int", + "meta": "int32" + }, + { + "name": "bone", + "type": "int", + "meta": "int32" + } + ] + }, + { + "name": "get_center_bone", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 923996154, + "return_value": { + "type": "int", + "meta": "int32" + }, + "arguments": [ + { + "name": "index", + "type": "int", + "meta": "int32" + } + ] + }, + { + "name": "set_radius", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1602489585, + "arguments": [ + { + "name": "index", + "type": "int", + "meta": "int32" + }, + { + "name": "radius", + "type": "float", + "meta": "float" + } + ] + }, + { + "name": "get_radius", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 2339986948, + "return_value": { + "type": "float", + "meta": "float" + }, + "arguments": [ + { + "name": "index", + "type": "int", + "meta": "int32" + } + ] + }, + { + "name": "set_rotation_axis", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3534169209, + "arguments": [ + { + "name": "index", + "type": "int", + "meta": "int32" + }, + { + "name": "axis", + "type": "enum::SpringBoneSimulator3D.RotationAxis" + } + ] + }, + { + "name": "get_rotation_axis", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 748837671, + "return_value": { + "type": "enum::SpringBoneSimulator3D.RotationAxis" + }, + "arguments": [ + { + "name": "index", + "type": "int", + "meta": "int32" + } + ] + }, + { + "name": "set_radius_damping_curve", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1447180063, + "arguments": [ + { + "name": "index", + "type": "int", + "meta": "int32" + }, + { + "name": "curve", + "type": "Curve" + } + ] + }, + { + "name": "get_radius_damping_curve", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 747537754, + "return_value": { + "type": "Curve" + }, + "arguments": [ + { + "name": "index", + "type": "int", + "meta": "int32" + } + ] + }, + { + "name": "set_stiffness", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1602489585, + "arguments": [ + { + "name": "index", + "type": "int", + "meta": "int32" + }, + { + "name": "stiffness", + "type": "float", + "meta": "float" + } + ] + }, + { + "name": "get_stiffness", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 2339986948, + "return_value": { + "type": "float", + "meta": "float" + }, + "arguments": [ + { + "name": "index", + "type": "int", + "meta": "int32" + } + ] + }, + { + "name": "set_stiffness_damping_curve", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1447180063, + "arguments": [ + { + "name": "index", + "type": "int", + "meta": "int32" + }, + { + "name": "curve", + "type": "Curve" + } + ] + }, + { + "name": "get_stiffness_damping_curve", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 747537754, + "return_value": { + "type": "Curve" + }, + "arguments": [ + { + "name": "index", + "type": "int", + "meta": "int32" + } + ] + }, + { + "name": "set_drag", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1602489585, + "arguments": [ + { + "name": "index", + "type": "int", + "meta": "int32" + }, + { + "name": "drag", + "type": "float", + "meta": "float" + } + ] + }, + { + "name": "get_drag", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 2339986948, + "return_value": { + "type": "float", + "meta": "float" + }, + "arguments": [ + { + "name": "index", + "type": "int", + "meta": "int32" + } + ] + }, + { + "name": "set_drag_damping_curve", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1447180063, + "arguments": [ + { + "name": "index", + "type": "int", + "meta": "int32" + }, + { + "name": "curve", + "type": "Curve" + } + ] + }, + { + "name": "get_drag_damping_curve", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 747537754, + "return_value": { + "type": "Curve" + }, + "arguments": [ + { + "name": "index", + "type": "int", + "meta": "int32" + } + ] + }, + { + "name": "set_gravity", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1602489585, + "arguments": [ + { + "name": "index", + "type": "int", + "meta": "int32" + }, + { + "name": "gravity", + "type": "float", + "meta": "float" + } + ] + }, + { + "name": "get_gravity", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 2339986948, + "return_value": { + "type": "float", + "meta": "float" + }, + "arguments": [ + { + "name": "index", + "type": "int", + "meta": "int32" + } + ] + }, + { + "name": "set_gravity_damping_curve", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1447180063, + "arguments": [ + { + "name": "index", + "type": "int", + "meta": "int32" + }, + { + "name": "curve", + "type": "Curve" + } + ] + }, + { + "name": "get_gravity_damping_curve", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 747537754, + "return_value": { + "type": "Curve" + }, + "arguments": [ + { + "name": "index", + "type": "int", + "meta": "int32" + } + ] + }, + { + "name": "set_gravity_direction", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1530502735, + "arguments": [ + { + "name": "index", + "type": "int", + "meta": "int32" + }, + { + "name": "gravity_direction", + "type": "Vector3" + } + ] + }, + { + "name": "get_gravity_direction", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 711720468, + "return_value": { + "type": "Vector3" + }, + "arguments": [ + { + "name": "index", + "type": "int", + "meta": "int32" + } + ] + }, + { + "name": "set_setting_count", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1286410249, + "arguments": [ + { + "name": "count", + "type": "int", + "meta": "int32" + } + ] + }, + { + "name": "get_setting_count", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3905245786, + "return_value": { + "type": "int", + "meta": "int32" + } + }, + { + "name": "clear_settings", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3218959716 + }, + { + "name": "set_individual_config", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 300928843, + "arguments": [ + { + "name": "index", + "type": "int", + "meta": "int32" + }, + { + "name": "enabled", + "type": "bool" + } + ] + }, + { + "name": "is_config_individual", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1116898809, + "return_value": { + "type": "bool" + }, + "arguments": [ + { + "name": "index", + "type": "int", + "meta": "int32" + } + ] + }, + { + "name": "get_joint_bone_name", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1391810591, + "return_value": { + "type": "String" + }, + "arguments": [ + { + "name": "index", + "type": "int", + "meta": "int32" + }, + { + "name": "joint", + "type": "int", + "meta": "int32" + } + ] + }, + { + "name": "get_joint_bone", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3175239445, + "return_value": { + "type": "int", + "meta": "int32" + }, + "arguments": [ + { + "name": "index", + "type": "int", + "meta": "int32" + }, + { + "name": "joint", + "type": "int", + "meta": "int32" + } + ] + }, + { + "name": "set_joint_rotation_axis", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 4224018032, + "arguments": [ + { + "name": "index", + "type": "int", + "meta": "int32" + }, + { + "name": "joint", + "type": "int", + "meta": "int32" + }, + { + "name": "axis", + "type": "enum::SpringBoneSimulator3D.RotationAxis" + } + ] + }, + { + "name": "get_joint_rotation_axis", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 2488679199, + "return_value": { + "type": "enum::SpringBoneSimulator3D.RotationAxis" + }, + "arguments": [ + { + "name": "index", + "type": "int", + "meta": "int32" + }, + { + "name": "joint", + "type": "int", + "meta": "int32" + } + ] + }, + { + "name": "set_joint_radius", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3506521499, + "arguments": [ + { + "name": "index", + "type": "int", + "meta": "int32" + }, + { + "name": "joint", + "type": "int", + "meta": "int32" + }, + { + "name": "radius", + "type": "float", + "meta": "float" + } + ] + }, + { + "name": "get_joint_radius", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3085491603, + "return_value": { + "type": "float", + "meta": "float" + }, + "arguments": [ + { + "name": "index", + "type": "int", + "meta": "int32" + }, + { + "name": "joint", + "type": "int", + "meta": "int32" + } + ] + }, + { + "name": "set_joint_stiffness", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3506521499, + "arguments": [ + { + "name": "index", + "type": "int", + "meta": "int32" + }, + { + "name": "joint", + "type": "int", + "meta": "int32" + }, + { + "name": "stiffness", + "type": "float", + "meta": "float" + } + ] + }, + { + "name": "get_joint_stiffness", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3085491603, + "return_value": { + "type": "float", + "meta": "float" + }, + "arguments": [ + { + "name": "index", + "type": "int", + "meta": "int32" + }, + { + "name": "joint", + "type": "int", + "meta": "int32" + } + ] + }, + { + "name": "set_joint_drag", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3506521499, + "arguments": [ + { + "name": "index", + "type": "int", + "meta": "int32" + }, + { + "name": "joint", + "type": "int", + "meta": "int32" + }, + { + "name": "drag", + "type": "float", + "meta": "float" + } + ] + }, + { + "name": "get_joint_drag", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3085491603, + "return_value": { + "type": "float", + "meta": "float" + }, + "arguments": [ + { + "name": "index", + "type": "int", + "meta": "int32" + }, + { + "name": "joint", + "type": "int", + "meta": "int32" + } + ] + }, + { + "name": "set_joint_gravity", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3506521499, + "arguments": [ + { + "name": "index", + "type": "int", + "meta": "int32" + }, + { + "name": "joint", + "type": "int", + "meta": "int32" + }, + { + "name": "gravity", + "type": "float", + "meta": "float" + } + ] + }, + { + "name": "get_joint_gravity", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3085491603, + "return_value": { + "type": "float", + "meta": "float" + }, + "arguments": [ + { + "name": "index", + "type": "int", + "meta": "int32" + }, + { + "name": "joint", + "type": "int", + "meta": "int32" + } + ] + }, + { + "name": "set_joint_gravity_direction", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 2866752138, + "arguments": [ + { + "name": "index", + "type": "int", + "meta": "int32" + }, + { + "name": "joint", + "type": "int", + "meta": "int32" + }, + { + "name": "gravity_direction", + "type": "Vector3" + } + ] + }, + { + "name": "get_joint_gravity_direction", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1592972041, + "return_value": { + "type": "Vector3" + }, + "arguments": [ + { + "name": "index", + "type": "int", + "meta": "int32" + }, + { + "name": "joint", + "type": "int", + "meta": "int32" + } + ] + }, + { + "name": "get_joint_count", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 923996154, + "return_value": { + "type": "int", + "meta": "int32" + }, + "arguments": [ + { + "name": "index", + "type": "int", + "meta": "int32" + } + ] + }, + { + "name": "set_enable_all_child_collisions", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 300928843, + "arguments": [ + { + "name": "index", + "type": "int", + "meta": "int32" + }, + { + "name": "enabled", + "type": "bool" + } + ] + }, + { + "name": "are_all_child_collisions_enabled", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1116898809, + "return_value": { + "type": "bool" + }, + "arguments": [ + { + "name": "index", + "type": "int", + "meta": "int32" + } + ] + }, + { + "name": "set_exclude_collision_path", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 132481804, + "arguments": [ + { + "name": "index", + "type": "int", + "meta": "int32" + }, + { + "name": "collision", + "type": "int", + "meta": "int32" + }, + { + "name": "node_path", + "type": "NodePath" + } + ] + }, + { + "name": "get_exclude_collision_path", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 464924783, + "return_value": { + "type": "NodePath" + }, + "arguments": [ + { + "name": "index", + "type": "int", + "meta": "int32" + }, + { + "name": "collision", + "type": "int", + "meta": "int32" + } + ] + }, + { + "name": "set_exclude_collision_count", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3937882851, + "arguments": [ + { + "name": "index", + "type": "int", + "meta": "int32" + }, + { + "name": "count", + "type": "int", + "meta": "int32" + } + ] + }, + { + "name": "get_exclude_collision_count", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 923996154, + "return_value": { + "type": "int", + "meta": "int32" + }, + "arguments": [ + { + "name": "index", + "type": "int", + "meta": "int32" + } + ] + }, + { + "name": "clear_exclude_collisions", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1286410249, + "arguments": [ + { + "name": "index", + "type": "int", + "meta": "int32" + } + ] + }, + { + "name": "set_collision_path", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 132481804, + "arguments": [ + { + "name": "index", + "type": "int", + "meta": "int32" + }, + { + "name": "collision", + "type": "int", + "meta": "int32" + }, + { + "name": "node_path", + "type": "NodePath" + } + ] + }, + { + "name": "get_collision_path", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 464924783, + "return_value": { + "type": "NodePath" + }, + "arguments": [ + { + "name": "index", + "type": "int", + "meta": "int32" + }, + { + "name": "collision", + "type": "int", + "meta": "int32" + } + ] + }, + { + "name": "set_collision_count", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3937882851, + "arguments": [ + { + "name": "index", + "type": "int", + "meta": "int32" + }, + { + "name": "count", + "type": "int", + "meta": "int32" + } + ] + }, + { + "name": "get_collision_count", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 923996154, + "return_value": { + "type": "int", + "meta": "int32" + }, + "arguments": [ + { + "name": "index", + "type": "int", + "meta": "int32" + } + ] + }, + { + "name": "clear_collisions", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1286410249, + "arguments": [ + { + "name": "index", + "type": "int", + "meta": "int32" + } + ] + }, + { + "name": "reset", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3218959716 + } + ], + "properties": [ + { + "type": "int", + "name": "setting_count", + "setter": "set_setting_count", + "getter": "get_setting_count" + } + ] + }, { "name": "Sprite2D", "is_refcounted": false, @@ -246358,6 +259929,21 @@ } ] }, + { + "name": "put_half", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 373806689, + "arguments": [ + { + "name": "value", + "type": "float", + "meta": "float" + } + ] + }, { "name": "put_float", "is_const": false, @@ -246531,6 +260117,18 @@ "meta": "uint64" } }, + { + "name": "get_half", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 191475506, + "return_value": { + "type": "float", + "meta": "float" + } + }, { "name": "get_float", "is_const": false, @@ -246747,8 +260345,10 @@ "name": "_get_data", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 298948178, "return_value": { "type": "enum::Error" }, @@ -246772,8 +260372,10 @@ "name": "_get_partial_data", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 298948178, "return_value": { "type": "enum::Error" }, @@ -246797,8 +260399,10 @@ "name": "_put_data", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 298948178, "return_value": { "type": "enum::Error" }, @@ -246822,8 +260426,10 @@ "name": "_put_partial_data", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 298948178, "return_value": { "type": "enum::Error" }, @@ -246847,8 +260453,10 @@ "name": "_get_available_bytes", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3905245786, "return_value": { "type": "int", "meta": "int32" @@ -247228,8 +260836,10 @@ "name": "_draw", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2275962004, "arguments": [ { "name": "to_canvas_item", @@ -247245,8 +260855,10 @@ "name": "_get_draw_rect", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 408950903, "return_value": { "type": "Rect2" }, @@ -247261,8 +260873,10 @@ "name": "_get_minimum_size", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3341600327, "return_value": { "type": "Vector2" } @@ -247271,8 +260885,10 @@ "name": "_test_mask", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3735564539, "return_value": { "type": "bool" }, @@ -248850,8 +262466,10 @@ "name": "_propagate_input_event", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3738334489, "return_value": { "type": "bool" }, @@ -248913,6 +262531,31 @@ "type": "int", "meta": "int32" } + }, + { + "name": "set_mouse_target", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 2586408642, + "arguments": [ + { + "name": "amount", + "type": "bool" + } + ] + }, + { + "name": "is_mouse_target_enabled", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 2240911060, + "return_value": { + "type": "bool" + } } ], "properties": [ @@ -248927,6 +262570,39 @@ "name": "stretch_shrink", "setter": "set_stretch_shrink", "getter": "get_stretch_shrink" + }, + { + "type": "bool", + "name": "mouse_target", + "setter": "set_mouse_target", + "getter": "is_mouse_target_enabled" + } + ] + }, + { + "name": "SubtweenTweener", + "is_refcounted": true, + "is_instantiable": true, + "inherits": "Tweener", + "api_type": "core", + "methods": [ + { + "name": "set_delay", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 449181780, + "return_value": { + "type": "SubtweenTweener" + }, + "arguments": [ + { + "name": "delay", + "type": "float", + "meta": "double" + } + ] } ] }, @@ -249524,8 +263200,10 @@ "name": "_get_line_syntax_highlighting", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3485342025, "return_value": { "type": "Dictionary" }, @@ -249541,15 +263219,19 @@ "name": "_clear_highlighting_cache", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, - "is_virtual": true + "is_virtual": true, + "hash": 3218959716 }, { "name": "_update_cache", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, - "is_virtual": true + "is_virtual": true, + "hash": 3218959716 }, { "name": "get_line_syntax_highlighting", @@ -249780,6 +263462,31 @@ "type": "enum::TextServer.SubpixelPositioning" } }, + { + "name": "set_keep_rounding_remainders", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 2586408642, + "arguments": [ + { + "name": "keep_rounding_remainders", + "type": "bool" + } + ] + }, + { + "name": "get_keep_rounding_remainders", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 36873697, + "return_value": { + "type": "bool" + } + }, { "name": "set_multichannel_signed_distance_field", "is_const": false, @@ -250034,6 +263741,12 @@ "setter": "set_subpixel_positioning", "getter": "get_subpixel_positioning" }, + { + "type": "bool", + "name": "keep_rounding_remainders", + "setter": "set_keep_rounding_remainders", + "getter": "get_keep_rounding_remainders" + }, { "type": "bool", "name": "multichannel_signed_distance_field", @@ -252351,8 +266064,12 @@ "value": 29 }, { - "name": "MENU_MAX", + "name": "MENU_EMOJI_AND_SYMBOL", "value": 30 + }, + { + "name": "MENU_MAX", + "value": 31 } ] }, @@ -252474,8 +266191,10 @@ "name": "_handle_unicode_input", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3937882851, "arguments": [ { "name": "unicode_char", @@ -252493,8 +266212,10 @@ "name": "_backspace", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1286410249, "arguments": [ { "name": "caret_index", @@ -252507,8 +266228,10 @@ "name": "_cut", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1286410249, "arguments": [ { "name": "caret_index", @@ -252521,8 +266244,10 @@ "name": "_copy", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1286410249, "arguments": [ { "name": "caret_index", @@ -252535,8 +266260,10 @@ "name": "_paste", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1286410249, "arguments": [ { "name": "caret_index", @@ -252549,8 +266276,10 @@ "name": "_paste_primary_clipboard", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1286410249, "arguments": [ { "name": "caret_index", @@ -252813,6 +266542,31 @@ "type": "bool" } }, + { + "name": "set_emoji_menu_enabled", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 2586408642, + "arguments": [ + { + "name": "enable", + "type": "bool" + } + ] + }, + { + "name": "is_emoji_menu_enabled", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 36873697, + "return_value": { + "type": "bool" + } + }, { "name": "set_shortcut_keys_enabled", "is_const": false, @@ -252888,6 +266642,31 @@ "type": "bool" } }, + { + "name": "set_empty_selection_clipboard_enabled", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 2586408642, + "arguments": [ + { + "name": "enabled", + "type": "bool" + } + ] + }, + { + "name": "is_empty_selection_clipboard_enabled", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 36873697, + "return_value": { + "type": "bool" + } + }, { "name": "clear", "is_const": false, @@ -252995,6 +266774,24 @@ } ] }, + { + "name": "get_line_with_ime", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 844755477, + "return_value": { + "type": "String" + }, + "arguments": [ + { + "name": "line", + "type": "int", + "meta": "int32" + } + ] + }, { "name": "get_line_width", "is_const": true, @@ -253588,8 +267385,9 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 239517838, + "hash": 3472935744, "hash_compatibility": [ + 239517838, 850652858 ], "return_value": { @@ -253601,7 +267399,12 @@ "type": "Vector2i" }, { - "name": "allow_out_of_bounds", + "name": "clamp_line", + "type": "bool", + "default_value": "true" + }, + { + "name": "clamp_column", "type": "bool", "default_value": "true" } @@ -256371,6 +270174,12 @@ "setter": "set_context_menu_enabled", "getter": "is_context_menu_enabled" }, + { + "type": "bool", + "name": "emoji_menu_enabled", + "setter": "set_emoji_menu_enabled", + "getter": "is_emoji_menu_enabled" + }, { "type": "bool", "name": "shortcut_keys_enabled", @@ -256407,6 +270216,12 @@ "setter": "set_middle_mouse_paste_enabled", "getter": "is_middle_mouse_paste_enabled" }, + { + "type": "bool", + "name": "empty_selection_clipboard_enabled", + "setter": "set_empty_selection_clipboard_enabled", + "getter": "is_empty_selection_clipboard_enabled" + }, { "type": "int", "name": "wrap_mode", @@ -258395,6 +272210,33 @@ "meta": "int32" } }, + { + "name": "set_line_spacing", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 373806689, + "arguments": [ + { + "name": "line_spacing", + "type": "float", + "meta": "float" + } + ] + }, + { + "name": "get_line_spacing", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1740695150, + "return_value": { + "type": "float", + "meta": "float" + } + }, { "name": "get_line_objects", "is_const": true, @@ -258874,6 +272716,12 @@ "name": "max_lines_visible", "setter": "set_max_lines_visible", "getter": "get_max_lines_visible" + }, + { + "type": "float", + "name": "line_spacing", + "setter": "set_line_spacing", + "getter": "get_line_spacing" } ] }, @@ -259536,6 +273384,17 @@ } ] }, + { + "name": "get_support_data", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 2362200018, + "return_value": { + "type": "PackedByteArray" + } + }, { "name": "is_locale_right_to_left", "is_const": true, @@ -260343,6 +274202,41 @@ } ] }, + { + "name": "font_set_keep_rounding_remainders", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1265174801, + "arguments": [ + { + "name": "font_rid", + "type": "RID" + }, + { + "name": "keep_rounding_remainders", + "type": "bool" + } + ] + }, + { + "name": "font_get_keep_rounding_remainders", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 4155700596, + "return_value": { + "type": "bool" + }, + "arguments": [ + { + "name": "font_rid", + "type": "RID" + } + ] + }, { "name": "font_set_embolden", "is_const": false, @@ -262660,6 +276554,28 @@ } ] }, + { + "name": "shaped_get_span_embedded_object", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 4069510997, + "return_value": { + "type": "Variant" + }, + "arguments": [ + { + "name": "shaped", + "type": "RID" + }, + { + "name": "index", + "type": "int", + "meta": "int64" + } + ] + }, { "name": "shaped_set_span_update_font", "is_const": false, @@ -264012,8 +277928,10 @@ "name": "_has_feature", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3967367083, "return_value": { "type": "bool" }, @@ -264028,8 +277946,10 @@ "name": "_get_name", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 201670096, "return_value": { "type": "String" } @@ -264038,8 +277958,10 @@ "name": "_get_features", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3905245786, "return_value": { "type": "int", "meta": "int64" @@ -264049,8 +277971,10 @@ "name": "_free_rid", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2722037293, "arguments": [ { "name": "rid", @@ -264062,8 +277986,10 @@ "name": "_has", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3521089500, "return_value": { "type": "bool" }, @@ -264078,8 +278004,10 @@ "name": "_load_support_data", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 2323990056, "return_value": { "type": "bool" }, @@ -264094,8 +278022,10 @@ "name": "_get_support_data_filename", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 201670096, "return_value": { "type": "String" } @@ -264104,8 +278034,10 @@ "name": "_get_support_data_info", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 201670096, "return_value": { "type": "String" } @@ -264114,8 +278046,10 @@ "name": "_save_support_data", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3927539163, "return_value": { "type": "bool" }, @@ -264126,12 +278060,26 @@ } ] }, + { + "name": "_get_support_data", + "is_const": true, + "is_static": false, + "is_required": false, + "is_vararg": false, + "is_virtual": true, + "hash": 2362200018, + "return_value": { + "type": "PackedByteArray" + } + }, { "name": "_is_locale_right_to_left", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3927539163, "return_value": { "type": "bool" }, @@ -264146,8 +278094,10 @@ "name": "_name_to_tag", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1321353865, "return_value": { "type": "int", "meta": "int64" @@ -264163,8 +278113,10 @@ "name": "_tag_to_name", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 844755477, "return_value": { "type": "String" }, @@ -264180,8 +278132,10 @@ "name": "_create_font", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 529393457, "return_value": { "type": "RID" } @@ -264190,8 +278144,10 @@ "name": "_create_font_linked_variation", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 41030802, "return_value": { "type": "RID" }, @@ -264206,8 +278162,10 @@ "name": "_font_set_data", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1355495400, "arguments": [ { "name": "font_rid", @@ -264223,8 +278181,10 @@ "name": "_font_set_data_ptr", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 4288446313, "arguments": [ { "name": "font_rid", @@ -264245,8 +278205,10 @@ "name": "_font_set_face_index", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3411492887, "arguments": [ { "name": "font_rid", @@ -264263,8 +278225,10 @@ "name": "_font_get_face_index", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 2198884583, "return_value": { "type": "int", "meta": "int64" @@ -264280,8 +278244,10 @@ "name": "_font_get_face_count", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 2198884583, "return_value": { "type": "int", "meta": "int64" @@ -264297,8 +278263,10 @@ "name": "_font_set_style", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 898466325, "arguments": [ { "name": "font_rid", @@ -264314,8 +278282,10 @@ "name": "_font_get_style", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3082502592, "return_value": { "type": "bitfield::TextServer.FontStyle" }, @@ -264330,8 +278300,10 @@ "name": "_font_set_name", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 2726140452, "arguments": [ { "name": "font_rid", @@ -264347,8 +278319,10 @@ "name": "_font_get_name", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 642473191, "return_value": { "type": "String" }, @@ -264363,8 +278337,10 @@ "name": "_font_get_ot_name_strings", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1882737106, "return_value": { "type": "Dictionary" }, @@ -264379,8 +278355,10 @@ "name": "_font_set_style_name", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 2726140452, "arguments": [ { "name": "font_rid", @@ -264396,8 +278374,10 @@ "name": "_font_get_style_name", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 642473191, "return_value": { "type": "String" }, @@ -264412,8 +278392,10 @@ "name": "_font_set_weight", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3411492887, "arguments": [ { "name": "font_rid", @@ -264430,8 +278412,10 @@ "name": "_font_get_weight", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 2198884583, "return_value": { "type": "int", "meta": "int64" @@ -264447,8 +278431,10 @@ "name": "_font_set_stretch", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3411492887, "arguments": [ { "name": "font_rid", @@ -264465,8 +278451,10 @@ "name": "_font_get_stretch", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 2198884583, "return_value": { "type": "int", "meta": "int64" @@ -264482,8 +278470,10 @@ "name": "_font_set_antialiasing", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 958337235, "arguments": [ { "name": "font_rid", @@ -264499,8 +278489,10 @@ "name": "_font_get_antialiasing", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3389420495, "return_value": { "type": "enum::TextServer.FontAntialiasing" }, @@ -264515,8 +278507,10 @@ "name": "_font_set_disable_embedded_bitmaps", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1265174801, "arguments": [ { "name": "font_rid", @@ -264532,8 +278526,10 @@ "name": "_font_get_disable_embedded_bitmaps", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 4155700596, "return_value": { "type": "bool" }, @@ -264548,8 +278544,10 @@ "name": "_font_set_generate_mipmaps", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1265174801, "arguments": [ { "name": "font_rid", @@ -264565,8 +278563,10 @@ "name": "_font_get_generate_mipmaps", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 4155700596, "return_value": { "type": "bool" }, @@ -264581,8 +278581,10 @@ "name": "_font_set_multichannel_signed_distance_field", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1265174801, "arguments": [ { "name": "font_rid", @@ -264598,8 +278600,10 @@ "name": "_font_is_multichannel_signed_distance_field", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 4155700596, "return_value": { "type": "bool" }, @@ -264614,8 +278618,10 @@ "name": "_font_set_msdf_pixel_range", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3411492887, "arguments": [ { "name": "font_rid", @@ -264632,8 +278638,10 @@ "name": "_font_get_msdf_pixel_range", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 2198884583, "return_value": { "type": "int", "meta": "int64" @@ -264649,8 +278657,10 @@ "name": "_font_set_msdf_size", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3411492887, "arguments": [ { "name": "font_rid", @@ -264667,8 +278677,10 @@ "name": "_font_get_msdf_size", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 2198884583, "return_value": { "type": "int", "meta": "int64" @@ -264684,8 +278696,10 @@ "name": "_font_set_fixed_size", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3411492887, "arguments": [ { "name": "font_rid", @@ -264702,8 +278716,10 @@ "name": "_font_get_fixed_size", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2198884583, "return_value": { "type": "int", "meta": "int64" @@ -264719,8 +278735,10 @@ "name": "_font_set_fixed_size_scale_mode", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1029390307, "arguments": [ { "name": "font_rid", @@ -264736,8 +278754,10 @@ "name": "_font_get_fixed_size_scale_mode", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 4113120379, "return_value": { "type": "enum::TextServer.FixedSizeScaleMode" }, @@ -264752,8 +278772,10 @@ "name": "_font_set_allow_system_fallback", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1265174801, "arguments": [ { "name": "font_rid", @@ -264769,8 +278791,10 @@ "name": "_font_is_allow_system_fallback", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 4155700596, "return_value": { "type": "bool" }, @@ -264785,8 +278809,10 @@ "name": "_font_set_force_autohinter", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1265174801, "arguments": [ { "name": "font_rid", @@ -264802,8 +278828,10 @@ "name": "_font_is_force_autohinter", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 4155700596, "return_value": { "type": "bool" }, @@ -264818,8 +278846,10 @@ "name": "_font_set_hinting", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1520010864, "arguments": [ { "name": "font_rid", @@ -264835,8 +278865,10 @@ "name": "_font_get_hinting", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3971592737, "return_value": { "type": "enum::TextServer.Hinting" }, @@ -264851,8 +278883,10 @@ "name": "_font_set_subpixel_positioning", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3830459669, "arguments": [ { "name": "font_rid", @@ -264868,8 +278902,10 @@ "name": "_font_get_subpixel_positioning", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 2752233671, "return_value": { "type": "enum::TextServer.SubpixelPositioning" }, @@ -264880,12 +278916,51 @@ } ] }, + { + "name": "_font_set_keep_rounding_remainders", + "is_const": false, + "is_static": false, + "is_required": false, + "is_vararg": false, + "is_virtual": true, + "hash": 1265174801, + "arguments": [ + { + "name": "font_rid", + "type": "RID" + }, + { + "name": "keep_rounding_remainders", + "type": "bool" + } + ] + }, + { + "name": "_font_get_keep_rounding_remainders", + "is_const": true, + "is_static": false, + "is_required": false, + "is_vararg": false, + "is_virtual": true, + "hash": 4155700596, + "return_value": { + "type": "bool" + }, + "arguments": [ + { + "name": "font_rid", + "type": "RID" + } + ] + }, { "name": "_font_set_embolden", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1794382983, "arguments": [ { "name": "font_rid", @@ -264902,8 +278977,10 @@ "name": "_font_get_embolden", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 866169185, "return_value": { "type": "float", "meta": "double" @@ -264919,8 +278996,10 @@ "name": "_font_set_spacing", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1307259930, "arguments": [ { "name": "font_rid", @@ -264941,8 +279020,10 @@ "name": "_font_get_spacing", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1213653558, "return_value": { "type": "int", "meta": "int64" @@ -264962,8 +279043,10 @@ "name": "_font_set_baseline_offset", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1794382983, "arguments": [ { "name": "font_rid", @@ -264980,8 +279063,10 @@ "name": "_font_get_baseline_offset", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 866169185, "return_value": { "type": "float", "meta": "double" @@ -264997,8 +279082,10 @@ "name": "_font_set_transform", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1246044741, "arguments": [ { "name": "font_rid", @@ -265014,8 +279101,10 @@ "name": "_font_get_transform", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 213527486, "return_value": { "type": "Transform2D" }, @@ -265030,8 +279119,10 @@ "name": "_font_set_variation_coordinates", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1217542888, "arguments": [ { "name": "font_rid", @@ -265047,8 +279138,10 @@ "name": "_font_get_variation_coordinates", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1882737106, "return_value": { "type": "Dictionary" }, @@ -265063,8 +279156,10 @@ "name": "_font_set_oversampling", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1794382983, "arguments": [ { "name": "font_rid", @@ -265081,8 +279176,10 @@ "name": "_font_get_oversampling", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 866169185, "return_value": { "type": "float", "meta": "double" @@ -265098,8 +279195,10 @@ "name": "_font_get_size_cache_list", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2684255073, "return_value": { "type": "typedarray::Vector2i" }, @@ -265114,8 +279213,10 @@ "name": "_font_clear_size_cache", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2722037293, "arguments": [ { "name": "font_rid", @@ -265127,8 +279228,10 @@ "name": "_font_remove_size_cache", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2450610377, "arguments": [ { "name": "font_rid", @@ -265144,8 +279247,10 @@ "name": "_font_set_ascent", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1892459533, "arguments": [ { "name": "font_rid", @@ -265167,8 +279272,10 @@ "name": "_font_get_ascent", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 755457166, "return_value": { "type": "float", "meta": "double" @@ -265189,8 +279296,10 @@ "name": "_font_set_descent", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1892459533, "arguments": [ { "name": "font_rid", @@ -265212,8 +279321,10 @@ "name": "_font_get_descent", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 755457166, "return_value": { "type": "float", "meta": "double" @@ -265234,8 +279345,10 @@ "name": "_font_set_underline_position", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1892459533, "arguments": [ { "name": "font_rid", @@ -265257,8 +279370,10 @@ "name": "_font_get_underline_position", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 755457166, "return_value": { "type": "float", "meta": "double" @@ -265279,8 +279394,10 @@ "name": "_font_set_underline_thickness", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1892459533, "arguments": [ { "name": "font_rid", @@ -265302,8 +279419,10 @@ "name": "_font_get_underline_thickness", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 755457166, "return_value": { "type": "float", "meta": "double" @@ -265324,8 +279443,10 @@ "name": "_font_set_scale", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1892459533, "arguments": [ { "name": "font_rid", @@ -265347,8 +279468,10 @@ "name": "_font_get_scale", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 755457166, "return_value": { "type": "float", "meta": "double" @@ -265369,8 +279492,10 @@ "name": "_font_get_texture_count", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1311001310, "return_value": { "type": "int", "meta": "int64" @@ -265390,8 +279515,10 @@ "name": "_font_clear_textures", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2450610377, "arguments": [ { "name": "font_rid", @@ -265407,8 +279534,10 @@ "name": "_font_remove_texture", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3810512262, "arguments": [ { "name": "font_rid", @@ -265429,8 +279558,10 @@ "name": "_font_set_texture_image", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2354485091, "arguments": [ { "name": "font_rid", @@ -265455,8 +279586,10 @@ "name": "_font_get_texture_image", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2451761155, "return_value": { "type": "Image" }, @@ -265480,8 +279613,10 @@ "name": "_font_set_texture_offsets", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3005398047, "arguments": [ { "name": "font_rid", @@ -265506,8 +279641,10 @@ "name": "_font_get_texture_offsets", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3420028887, "return_value": { "type": "PackedInt32Array" }, @@ -265531,8 +279668,10 @@ "name": "_font_get_glyph_list", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 46086620, "return_value": { "type": "PackedInt32Array" }, @@ -265551,8 +279690,10 @@ "name": "_font_clear_glyphs", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2450610377, "arguments": [ { "name": "font_rid", @@ -265568,8 +279709,10 @@ "name": "_font_remove_glyph", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3810512262, "arguments": [ { "name": "font_rid", @@ -265590,8 +279733,10 @@ "name": "_font_get_glyph_advance", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2555689501, "return_value": { "type": "Vector2" }, @@ -265616,8 +279761,10 @@ "name": "_font_set_glyph_advance", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3219397315, "arguments": [ { "name": "font_rid", @@ -265643,8 +279790,10 @@ "name": "_font_get_glyph_offset", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 513728628, "return_value": { "type": "Vector2" }, @@ -265668,8 +279817,10 @@ "name": "_font_set_glyph_offset", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1812632090, "arguments": [ { "name": "font_rid", @@ -265694,8 +279845,10 @@ "name": "_font_get_glyph_size", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 513728628, "return_value": { "type": "Vector2" }, @@ -265719,8 +279872,10 @@ "name": "_font_set_glyph_size", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1812632090, "arguments": [ { "name": "font_rid", @@ -265745,8 +279900,10 @@ "name": "_font_get_glyph_uv_rect", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2274268786, "return_value": { "type": "Rect2" }, @@ -265770,8 +279927,10 @@ "name": "_font_set_glyph_uv_rect", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1973324081, "arguments": [ { "name": "font_rid", @@ -265796,8 +279955,10 @@ "name": "_font_get_glyph_texture_idx", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 4292800474, "return_value": { "type": "int", "meta": "int64" @@ -265822,8 +279983,10 @@ "name": "_font_set_glyph_texture_idx", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 4254580980, "arguments": [ { "name": "font_rid", @@ -265849,8 +280012,10 @@ "name": "_font_get_glyph_texture_rid", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1451696141, "return_value": { "type": "RID" }, @@ -265874,8 +280039,10 @@ "name": "_font_get_glyph_texture_size", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 513728628, "return_value": { "type": "Vector2" }, @@ -265899,8 +280066,10 @@ "name": "_font_get_glyph_contours", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 2903964473, "return_value": { "type": "Dictionary" }, @@ -265925,8 +280094,10 @@ "name": "_font_get_kerning_list", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1778388067, "return_value": { "type": "typedarray::Vector2i" }, @@ -265946,8 +280117,10 @@ "name": "_font_clear_kerning_map", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3411492887, "arguments": [ { "name": "font_rid", @@ -265964,8 +280137,10 @@ "name": "_font_remove_kerning", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 2141860016, "arguments": [ { "name": "font_rid", @@ -265986,8 +280161,10 @@ "name": "_font_set_kerning", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3630965883, "arguments": [ { "name": "font_rid", @@ -266012,8 +280189,10 @@ "name": "_font_get_kerning", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1019980169, "return_value": { "type": "Vector2" }, @@ -266037,8 +280216,10 @@ "name": "_font_get_glyph_index", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1765635060, "return_value": { "type": "int", "meta": "int64" @@ -266069,8 +280250,10 @@ "name": "_font_get_char_from_glyph_index", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2156738276, "return_value": { "type": "int", "meta": "int64" @@ -266096,8 +280279,10 @@ "name": "_font_has_char", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3120086654, "return_value": { "type": "bool" }, @@ -266117,8 +280302,10 @@ "name": "_font_get_supported_chars", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 642473191, "return_value": { "type": "String" }, @@ -266133,8 +280320,10 @@ "name": "_font_get_supported_glyphs", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 788230395, "return_value": { "type": "PackedInt32Array" }, @@ -266149,8 +280338,10 @@ "name": "_font_render_range", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 4254580980, "arguments": [ { "name": "font_rid", @@ -266176,8 +280367,10 @@ "name": "_font_render_glyph", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3810512262, "arguments": [ { "name": "font_rid", @@ -266198,8 +280391,10 @@ "name": "_font_draw_glyph", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 309868464, "arguments": [ { "name": "font_rid", @@ -266233,8 +280428,10 @@ "name": "_font_draw_glyph_outline", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3090733778, "arguments": [ { "name": "font_rid", @@ -266273,8 +280470,10 @@ "name": "_font_is_language_supported", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3199320846, "return_value": { "type": "bool" }, @@ -266293,8 +280492,10 @@ "name": "_font_set_language_support_override", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 2313957094, "arguments": [ { "name": "font_rid", @@ -266314,8 +280515,10 @@ "name": "_font_get_language_support_override", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 2829184646, "return_value": { "type": "bool" }, @@ -266334,8 +280537,10 @@ "name": "_font_remove_language_support_override", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 2726140452, "arguments": [ { "name": "font_rid", @@ -266351,8 +280556,10 @@ "name": "_font_get_language_support_overrides", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 2801473409, "return_value": { "type": "PackedStringArray" }, @@ -266367,8 +280574,10 @@ "name": "_font_is_script_supported", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3199320846, "return_value": { "type": "bool" }, @@ -266387,8 +280596,10 @@ "name": "_font_set_script_support_override", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 2313957094, "arguments": [ { "name": "font_rid", @@ -266408,8 +280619,10 @@ "name": "_font_get_script_support_override", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 2829184646, "return_value": { "type": "bool" }, @@ -266428,8 +280641,10 @@ "name": "_font_remove_script_support_override", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 2726140452, "arguments": [ { "name": "font_rid", @@ -266445,8 +280660,10 @@ "name": "_font_get_script_support_overrides", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 2801473409, "return_value": { "type": "PackedStringArray" }, @@ -266461,8 +280678,10 @@ "name": "_font_set_opentype_feature_overrides", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1217542888, "arguments": [ { "name": "font_rid", @@ -266478,8 +280697,10 @@ "name": "_font_get_opentype_feature_overrides", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1882737106, "return_value": { "type": "Dictionary" }, @@ -266494,8 +280715,10 @@ "name": "_font_supported_feature_list", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1882737106, "return_value": { "type": "Dictionary" }, @@ -266510,8 +280733,10 @@ "name": "_font_supported_variation_list", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1882737106, "return_value": { "type": "Dictionary" }, @@ -266526,8 +280751,10 @@ "name": "_font_get_global_oversampling", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1740695150, "return_value": { "type": "float", "meta": "double" @@ -266537,8 +280764,10 @@ "name": "_font_set_global_oversampling", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 373806689, "arguments": [ { "name": "oversampling", @@ -266551,8 +280780,10 @@ "name": "_get_hex_code_box_size", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3016396712, "return_value": { "type": "Vector2" }, @@ -266573,8 +280804,10 @@ "name": "_draw_hex_code_box", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1602046441, "arguments": [ { "name": "canvas", @@ -266604,8 +280837,10 @@ "name": "_create_shaped_text", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1431128392, "return_value": { "type": "RID" }, @@ -266624,8 +280859,10 @@ "name": "_shaped_text_clear", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2722037293, "arguments": [ { "name": "shaped", @@ -266637,8 +280874,10 @@ "name": "_shaped_text_set_direction", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 4276135416, "arguments": [ { "name": "shaped", @@ -266654,8 +280893,10 @@ "name": "_shaped_text_get_direction", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3065904362, "return_value": { "type": "enum::TextServer.Direction" }, @@ -266670,8 +280911,10 @@ "name": "_shaped_text_get_inferred_direction", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3065904362, "return_value": { "type": "enum::TextServer.Direction" }, @@ -266686,8 +280929,10 @@ "name": "_shaped_text_set_bidi_override", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 684822712, "arguments": [ { "name": "shaped", @@ -266703,8 +280948,10 @@ "name": "_shaped_text_set_custom_punctuation", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 2726140452, "arguments": [ { "name": "shaped", @@ -266720,8 +280967,10 @@ "name": "_shaped_text_get_custom_punctuation", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 642473191, "return_value": { "type": "String" }, @@ -266736,8 +280985,10 @@ "name": "_shaped_text_set_custom_ellipsis", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3411492887, "arguments": [ { "name": "shaped", @@ -266754,8 +281005,10 @@ "name": "_shaped_text_get_custom_ellipsis", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 2198884583, "return_value": { "type": "int", "meta": "int64" @@ -266771,8 +281024,10 @@ "name": "_shaped_text_set_orientation", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 2306444742, "arguments": [ { "name": "shaped", @@ -266788,8 +281043,10 @@ "name": "_shaped_text_get_orientation", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3142708106, "return_value": { "type": "enum::TextServer.Orientation" }, @@ -266804,8 +281061,10 @@ "name": "_shaped_text_set_preserve_invalid", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1265174801, "arguments": [ { "name": "shaped", @@ -266821,8 +281080,10 @@ "name": "_shaped_text_get_preserve_invalid", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 4155700596, "return_value": { "type": "bool" }, @@ -266837,8 +281098,10 @@ "name": "_shaped_text_set_preserve_control", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1265174801, "arguments": [ { "name": "shaped", @@ -266854,8 +281117,10 @@ "name": "_shaped_text_get_preserve_control", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 4155700596, "return_value": { "type": "bool" }, @@ -266870,8 +281135,10 @@ "name": "_shaped_text_set_spacing", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1307259930, "arguments": [ { "name": "shaped", @@ -266892,8 +281159,10 @@ "name": "_shaped_text_get_spacing", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1213653558, "return_value": { "type": "int", "meta": "int64" @@ -266913,8 +281182,10 @@ "name": "_shaped_text_add_string", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 875249313, "return_value": { "type": "bool" }, @@ -266954,8 +281225,10 @@ "name": "_shaped_text_add_object", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2452224230, "return_value": { "type": "bool" }, @@ -266992,8 +281265,10 @@ "name": "_shaped_text_resize_object", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2747466775, "return_value": { "type": "bool" }, @@ -267025,8 +281300,10 @@ "name": "_shaped_get_span_count", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2198884583, "return_value": { "type": "int", "meta": "int64" @@ -267042,8 +281319,33 @@ "name": "_shaped_get_span_meta", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 4069510997, + "return_value": { + "type": "Variant" + }, + "arguments": [ + { + "name": "shaped", + "type": "RID" + }, + { + "name": "index", + "type": "int", + "meta": "int64" + } + ] + }, + { + "name": "_shaped_get_span_embedded_object", + "is_const": true, + "is_static": false, + "is_required": true, + "is_vararg": false, + "is_virtual": true, + "hash": 4069510997, "return_value": { "type": "Variant" }, @@ -267063,8 +281365,10 @@ "name": "_shaped_set_span_update_font", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2569459151, "arguments": [ { "name": "shaped", @@ -267094,8 +281398,10 @@ "name": "_shaped_text_substr", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1937682086, "return_value": { "type": "RID" }, @@ -267120,8 +281426,10 @@ "name": "_shaped_text_get_parent", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3814569979, "return_value": { "type": "RID" }, @@ -267136,8 +281444,10 @@ "name": "_shaped_text_fit_to_width", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1426448222, "return_value": { "type": "float", "meta": "double" @@ -267162,8 +281472,10 @@ "name": "_shaped_text_tab_align", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1283669550, "return_value": { "type": "float", "meta": "double" @@ -267183,8 +281495,10 @@ "name": "_shaped_text_shape", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3521089500, "return_value": { "type": "bool" }, @@ -267199,8 +281513,10 @@ "name": "_shaped_text_update_breaks", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3521089500, "return_value": { "type": "bool" }, @@ -267215,8 +281531,10 @@ "name": "_shaped_text_update_justification_ops", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3521089500, "return_value": { "type": "bool" }, @@ -267231,8 +281549,10 @@ "name": "_shaped_text_is_ready", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 4155700596, "return_value": { "type": "bool" }, @@ -267247,8 +281567,10 @@ "name": "_shaped_text_get_glyphs", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2198884583, "return_value": { "type": "const Glyph*" }, @@ -267263,8 +281585,10 @@ "name": "_shaped_text_sort_logical", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3917799429, "return_value": { "type": "const Glyph*" }, @@ -267279,8 +281603,10 @@ "name": "_shaped_text_get_glyph_count", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2198884583, "return_value": { "type": "int", "meta": "int64" @@ -267296,8 +281622,10 @@ "name": "_shaped_text_get_range", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 733700038, "return_value": { "type": "Vector2i" }, @@ -267312,8 +281640,10 @@ "name": "_shaped_text_get_line_breaks_adv", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1488467363, "return_value": { "type": "PackedInt32Array" }, @@ -267345,8 +281675,10 @@ "name": "_shaped_text_get_line_breaks", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3131311977, "return_value": { "type": "PackedInt32Array" }, @@ -267375,8 +281707,10 @@ "name": "_shaped_text_get_word_breaks", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 2423529412, "return_value": { "type": "PackedInt32Array" }, @@ -267399,8 +281733,10 @@ "name": "_shaped_text_get_trim_pos", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2198884583, "return_value": { "type": "int", "meta": "int64" @@ -267416,8 +281752,10 @@ "name": "_shaped_text_get_ellipsis_pos", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2198884583, "return_value": { "type": "int", "meta": "int64" @@ -267433,8 +281771,10 @@ "name": "_shaped_text_get_ellipsis_glyph_count", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2198884583, "return_value": { "type": "int", "meta": "int64" @@ -267450,8 +281790,10 @@ "name": "_shaped_text_get_ellipsis_glyphs", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2198884583, "return_value": { "type": "const Glyph*" }, @@ -267466,8 +281808,10 @@ "name": "_shaped_text_overrun_trim_to_width", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3364950921, "arguments": [ { "name": "shaped", @@ -267488,8 +281832,10 @@ "name": "_shaped_text_get_objects", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2684255073, "return_value": { "type": "Array" }, @@ -267504,8 +281850,10 @@ "name": "_shaped_text_get_object_rect", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 447978354, "return_value": { "type": "Rect2" }, @@ -267524,8 +281872,10 @@ "name": "_shaped_text_get_object_range", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2524675647, "return_value": { "type": "Vector2i" }, @@ -267544,8 +281894,10 @@ "name": "_shaped_text_get_object_glyph", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1260085030, "return_value": { "type": "int", "meta": "int64" @@ -267565,8 +281917,10 @@ "name": "_shaped_text_get_size", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2440833711, "return_value": { "type": "Vector2" }, @@ -267581,8 +281935,10 @@ "name": "_shaped_text_get_ascent", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 866169185, "return_value": { "type": "float", "meta": "double" @@ -267598,8 +281954,10 @@ "name": "_shaped_text_get_descent", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 866169185, "return_value": { "type": "float", "meta": "double" @@ -267615,8 +281973,10 @@ "name": "_shaped_text_get_width", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 866169185, "return_value": { "type": "float", "meta": "double" @@ -267632,8 +281992,10 @@ "name": "_shaped_text_get_underline_position", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 866169185, "return_value": { "type": "float", "meta": "double" @@ -267649,8 +282011,10 @@ "name": "_shaped_text_get_underline_thickness", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 866169185, "return_value": { "type": "float", "meta": "double" @@ -267666,8 +282030,10 @@ "name": "_shaped_text_get_dominant_direction_in_range", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 2156738276, "return_value": { "type": "int", "meta": "int64" @@ -267693,8 +282059,10 @@ "name": "_shaped_text_get_carets", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1191777527, "arguments": [ { "name": "shaped", @@ -267715,8 +282083,10 @@ "name": "_shaped_text_get_selection", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3714187733, "return_value": { "type": "PackedVector2Array" }, @@ -267741,8 +282111,10 @@ "name": "_shaped_text_hit_test_grapheme", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3149310417, "return_value": { "type": "int", "meta": "int64" @@ -267763,8 +282135,10 @@ "name": "_shaped_text_hit_test_position", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3149310417, "return_value": { "type": "int", "meta": "int64" @@ -267785,8 +282159,10 @@ "name": "_shaped_text_draw", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 2453262187, "arguments": [ { "name": "shaped", @@ -267820,8 +282196,10 @@ "name": "_shaped_text_draw_outline", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1686767567, "arguments": [ { "name": "shaped", @@ -267860,8 +282238,10 @@ "name": "_shaped_text_get_grapheme_bounds", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 2546185844, "return_value": { "type": "Vector2" }, @@ -267881,8 +282261,10 @@ "name": "_shaped_text_next_grapheme_pos", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1120910005, "return_value": { "type": "int", "meta": "int64" @@ -267903,8 +282285,10 @@ "name": "_shaped_text_prev_grapheme_pos", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1120910005, "return_value": { "type": "int", "meta": "int64" @@ -267925,8 +282309,10 @@ "name": "_shaped_text_get_character_breaks", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 788230395, "return_value": { "type": "PackedInt32Array" }, @@ -267941,8 +282327,10 @@ "name": "_shaped_text_next_character_pos", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1120910005, "return_value": { "type": "int", "meta": "int64" @@ -267963,8 +282351,10 @@ "name": "_shaped_text_prev_character_pos", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1120910005, "return_value": { "type": "int", "meta": "int64" @@ -267985,8 +282375,10 @@ "name": "_shaped_text_closest_character_pos", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1120910005, "return_value": { "type": "int", "meta": "int64" @@ -268007,8 +282399,10 @@ "name": "_format_number", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 315676799, "return_value": { "type": "String" }, @@ -268027,8 +282421,10 @@ "name": "_parse_number", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 315676799, "return_value": { "type": "String" }, @@ -268047,8 +282443,10 @@ "name": "_percent_sign", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3135753539, "return_value": { "type": "String" }, @@ -268063,8 +282461,10 @@ "name": "_strip_diacritics", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3135753539, "return_value": { "type": "String" }, @@ -268079,8 +282479,10 @@ "name": "_is_valid_identifier", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3927539163, "return_value": { "type": "bool" }, @@ -268095,8 +282497,10 @@ "name": "_is_valid_letter", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1116898809, "return_value": { "type": "bool" }, @@ -268112,8 +282516,10 @@ "name": "_string_get_word_breaks", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3658450588, "return_value": { "type": "PackedInt32Array" }, @@ -268137,8 +282543,10 @@ "name": "_string_get_character_breaks", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 2509056759, "return_value": { "type": "PackedInt32Array" }, @@ -268157,8 +282565,10 @@ "name": "_is_confusable", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1433197768, "return_value": { "type": "int", "meta": "int64" @@ -268178,8 +282588,10 @@ "name": "_spoof_check", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3927539163, "return_value": { "type": "bool" }, @@ -268194,8 +282606,10 @@ "name": "_string_to_upper", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 315676799, "return_value": { "type": "String" }, @@ -268214,8 +282628,10 @@ "name": "_string_to_lower", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 315676799, "return_value": { "type": "String" }, @@ -268234,8 +282650,10 @@ "name": "_string_to_title", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 315676799, "return_value": { "type": "String" }, @@ -268254,8 +282672,10 @@ "name": "_parse_structured_text", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3310685015, "return_value": { "type": "typedarray::Vector3i" }, @@ -268278,8 +282698,10 @@ "name": "_cleanup", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, - "is_virtual": true + "is_virtual": true, + "hash": 3218959716 } ] }, @@ -268441,8 +282863,10 @@ "name": "_get_width", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3905245786, "return_value": { "type": "int", "meta": "int32" @@ -268452,8 +282876,10 @@ "name": "_get_height", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3905245786, "return_value": { "type": "int", "meta": "int32" @@ -268463,8 +282889,10 @@ "name": "_is_pixel_opaque", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 2522259332, "return_value": { "type": "bool" }, @@ -268485,8 +282913,10 @@ "name": "_has_alpha", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 36873697, "return_value": { "type": "bool" } @@ -268495,8 +282925,10 @@ "name": "_draw", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1384643611, "arguments": [ { "name": "to_canvas_item", @@ -268520,8 +282952,10 @@ "name": "_draw_rect", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3819628907, "arguments": [ { "name": "to_canvas_item", @@ -268549,8 +282983,10 @@ "name": "_draw_rect_region", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 4094143664, "arguments": [ { "name": "to_canvas_item", @@ -268834,8 +283270,10 @@ "name": "_get_format", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3847873762, "return_value": { "type": "enum::Image.Format" } @@ -268844,8 +283282,10 @@ "name": "_get_width", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3905245786, "return_value": { "type": "int", "meta": "int32" @@ -268855,8 +283295,10 @@ "name": "_get_height", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3905245786, "return_value": { "type": "int", "meta": "int32" @@ -268866,8 +283308,10 @@ "name": "_get_depth", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3905245786, "return_value": { "type": "int", "meta": "int32" @@ -268877,8 +283321,10 @@ "name": "_has_mipmaps", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 36873697, "return_value": { "type": "bool" } @@ -268887,8 +283333,10 @@ "name": "_get_data", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3995934104, "return_value": { "type": "typedarray::Image" } @@ -269419,8 +283867,10 @@ "name": "_get_format", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3847873762, "return_value": { "type": "enum::Image.Format" } @@ -269429,8 +283879,10 @@ "name": "_get_layered_type", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3905245786, "return_value": { "type": "int", "meta": "uint32" @@ -269440,8 +283892,10 @@ "name": "_get_width", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3905245786, "return_value": { "type": "int", "meta": "int32" @@ -269451,8 +283905,10 @@ "name": "_get_height", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3905245786, "return_value": { "type": "int", "meta": "int32" @@ -269462,8 +283918,10 @@ "name": "_get_layers", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3905245786, "return_value": { "type": "int", "meta": "int32" @@ -269473,8 +283931,10 @@ "name": "_has_mipmaps", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 36873697, "return_value": { "type": "bool" } @@ -269483,8 +283943,10 @@ "name": "_get_layer_data", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3655284255, "return_value": { "type": "Image" }, @@ -272869,6 +287331,23 @@ } ] }, + { + "name": "has_custom_data", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3927539163, + "return_value": { + "type": "bool" + }, + "arguments": [ + { + "name": "layer_name", + "type": "String" + } + ] + }, { "name": "set_custom_data_by_layer_id", "is_const": false, @@ -273012,8 +287491,10 @@ "name": "_use_tile_data_runtime_update", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3957903770, "return_value": { "type": "bool" }, @@ -273033,8 +287514,10 @@ "name": "_tile_data_runtime_update", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 4223434291, "arguments": [ { "name": "layer", @@ -274294,8 +288777,10 @@ "name": "_use_tile_data_runtime_update", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3715736492, "return_value": { "type": "bool" }, @@ -274310,8 +288795,10 @@ "name": "_tile_data_runtime_update", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1627322126, "arguments": [ { "name": "coords", @@ -274323,6 +288810,25 @@ } ] }, + { + "name": "_update_cells", + "is_const": false, + "is_static": false, + "is_required": false, + "is_vararg": false, + "is_virtual": true, + "hash": 3156113851, + "arguments": [ + { + "name": "coords", + "type": "typedarray::Vector2i" + }, + { + "name": "forced_cleanup", + "type": "bool" + } + ] + }, { "name": "set_cell", "is_const": false, @@ -274698,7 +289204,10 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 2275361663 + "hash": 3218959716, + "hash_compatibility": [ + 2275361663 + ] }, { "name": "map_pattern", @@ -276094,6 +290603,45 @@ } ] }, + { + "name": "set_physics_layer_collision_priority", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1602489585, + "arguments": [ + { + "name": "layer_index", + "type": "int", + "meta": "int32" + }, + { + "name": "priority", + "type": "float", + "meta": "float" + } + ] + }, + { + "name": "get_physics_layer_collision_priority", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 2339986948, + "return_value": { + "type": "float", + "meta": "float" + }, + "arguments": [ + { + "name": "layer_index", + "type": "int", + "meta": "int32" + } + ] + }, { "name": "set_physics_layer_physics_material", "is_const": false, @@ -276662,6 +291210,23 @@ } ] }, + { + "name": "has_custom_data_layer_by_name", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3927539163, + "return_value": { + "type": "bool" + }, + "arguments": [ + { + "name": "layer_name", + "type": "String" + } + ] + }, { "name": "get_custom_data_layer_name", "is_const": true, @@ -278902,6 +293467,31 @@ "type": "bool" } }, + { + "name": "set_ignore_time_scale", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 2586408642, + "arguments": [ + { + "name": "ignore", + "type": "bool" + } + ] + }, + { + "name": "is_ignoring_time_scale", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 2240911060, + "return_value": { + "type": "bool" + } + }, { "name": "is_stopped", "is_const": true, @@ -278987,6 +293577,12 @@ "setter": "set_paused", "getter": "is_paused" }, + { + "type": "bool", + "name": "ignore_time_scale", + "setter": "set_ignore_time_scale", + "getter": "is_ignoring_time_scale" + }, { "type": "float", "name": "time_left", @@ -279473,8 +294069,10 @@ "name": "_get_plural_message", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1970324172, "return_value": { "type": "StringName" }, @@ -279502,8 +294100,10 @@ "name": "_get_message", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3639719779, "return_value": { "type": "StringName" }, @@ -279549,9 +294149,8 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 971803314, + "hash": 3898530326, "hash_compatibility": [ - 3898530326, 971803314 ], "arguments": [ @@ -279576,9 +294175,8 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 360316719, + "hash": 2356982266, "hash_compatibility": [ - 2356982266, 360316719 ], "arguments": [ @@ -279603,9 +294201,8 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 58037827, + "hash": 1829228469, "hash_compatibility": [ - 1829228469, 58037827 ], "return_value": { @@ -279629,9 +294226,8 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 1333931916, + "hash": 229954002, "hash_compatibility": [ - 229954002, 1333931916 ], "return_value": { @@ -279664,9 +294260,8 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 3919944288, + "hash": 3959009644, "hash_compatibility": [ - 3959009644, 3919944288 ], "arguments": [ @@ -279731,6 +294326,421 @@ } ] }, + { + "name": "TranslationDomain", + "is_refcounted": true, + "is_instantiable": true, + "inherits": "RefCounted", + "api_type": "core", + "methods": [ + { + "name": "get_translation_object", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 606768082, + "return_value": { + "type": "Translation" + }, + "arguments": [ + { + "name": "locale", + "type": "String" + } + ] + }, + { + "name": "add_translation", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1466479800, + "arguments": [ + { + "name": "translation", + "type": "Translation" + } + ] + }, + { + "name": "remove_translation", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1466479800, + "arguments": [ + { + "name": "translation", + "type": "Translation" + } + ] + }, + { + "name": "clear", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3218959716 + }, + { + "name": "translate", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1829228469, + "return_value": { + "type": "StringName" + }, + "arguments": [ + { + "name": "message", + "type": "StringName" + }, + { + "name": "context", + "type": "StringName", + "default_value": "&\"\"" + } + ] + }, + { + "name": "translate_plural", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 229954002, + "return_value": { + "type": "StringName" + }, + "arguments": [ + { + "name": "message", + "type": "StringName" + }, + { + "name": "message_plural", + "type": "StringName" + }, + { + "name": "n", + "type": "int", + "meta": "int32" + }, + { + "name": "context", + "type": "StringName", + "default_value": "&\"\"" + } + ] + }, + { + "name": "is_pseudolocalization_enabled", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 36873697, + "return_value": { + "type": "bool" + } + }, + { + "name": "set_pseudolocalization_enabled", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 2586408642, + "arguments": [ + { + "name": "enabled", + "type": "bool" + } + ] + }, + { + "name": "is_pseudolocalization_accents_enabled", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 36873697, + "return_value": { + "type": "bool" + } + }, + { + "name": "set_pseudolocalization_accents_enabled", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 2586408642, + "arguments": [ + { + "name": "enabled", + "type": "bool" + } + ] + }, + { + "name": "is_pseudolocalization_double_vowels_enabled", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 36873697, + "return_value": { + "type": "bool" + } + }, + { + "name": "set_pseudolocalization_double_vowels_enabled", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 2586408642, + "arguments": [ + { + "name": "enabled", + "type": "bool" + } + ] + }, + { + "name": "is_pseudolocalization_fake_bidi_enabled", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 36873697, + "return_value": { + "type": "bool" + } + }, + { + "name": "set_pseudolocalization_fake_bidi_enabled", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 2586408642, + "arguments": [ + { + "name": "enabled", + "type": "bool" + } + ] + }, + { + "name": "is_pseudolocalization_override_enabled", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 36873697, + "return_value": { + "type": "bool" + } + }, + { + "name": "set_pseudolocalization_override_enabled", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 2586408642, + "arguments": [ + { + "name": "enabled", + "type": "bool" + } + ] + }, + { + "name": "is_pseudolocalization_skip_placeholders_enabled", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 36873697, + "return_value": { + "type": "bool" + } + }, + { + "name": "set_pseudolocalization_skip_placeholders_enabled", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 2586408642, + "arguments": [ + { + "name": "enabled", + "type": "bool" + } + ] + }, + { + "name": "get_pseudolocalization_expansion_ratio", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1740695150, + "return_value": { + "type": "float", + "meta": "float" + } + }, + { + "name": "set_pseudolocalization_expansion_ratio", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 373806689, + "arguments": [ + { + "name": "ratio", + "type": "float", + "meta": "float" + } + ] + }, + { + "name": "get_pseudolocalization_prefix", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 201670096, + "return_value": { + "type": "String" + } + }, + { + "name": "set_pseudolocalization_prefix", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 83702148, + "arguments": [ + { + "name": "prefix", + "type": "String" + } + ] + }, + { + "name": "get_pseudolocalization_suffix", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 201670096, + "return_value": { + "type": "String" + } + }, + { + "name": "set_pseudolocalization_suffix", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 83702148, + "arguments": [ + { + "name": "suffix", + "type": "String" + } + ] + }, + { + "name": "pseudolocalize", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1965194235, + "return_value": { + "type": "StringName" + }, + "arguments": [ + { + "name": "message", + "type": "StringName" + } + ] + } + ], + "properties": [ + { + "type": "bool", + "name": "pseudolocalization_enabled", + "setter": "set_pseudolocalization_enabled", + "getter": "is_pseudolocalization_enabled" + }, + { + "type": "bool", + "name": "pseudolocalization_accents_enabled", + "setter": "set_pseudolocalization_accents_enabled", + "getter": "is_pseudolocalization_accents_enabled" + }, + { + "type": "bool", + "name": "pseudolocalization_double_vowels_enabled", + "setter": "set_pseudolocalization_double_vowels_enabled", + "getter": "is_pseudolocalization_double_vowels_enabled" + }, + { + "type": "bool", + "name": "pseudolocalization_fake_bidi_enabled", + "setter": "set_pseudolocalization_fake_bidi_enabled", + "getter": "is_pseudolocalization_fake_bidi_enabled" + }, + { + "type": "bool", + "name": "pseudolocalization_override_enabled", + "setter": "set_pseudolocalization_override_enabled", + "getter": "is_pseudolocalization_override_enabled" + }, + { + "type": "bool", + "name": "pseudolocalization_skip_placeholders_enabled", + "setter": "set_pseudolocalization_skip_placeholders_enabled", + "getter": "is_pseudolocalization_skip_placeholders_enabled" + }, + { + "type": "float", + "name": "pseudolocalization_expansion_ratio", + "setter": "set_pseudolocalization_expansion_ratio", + "getter": "get_pseudolocalization_expansion_ratio" + }, + { + "type": "String", + "name": "pseudolocalization_prefix", + "setter": "set_pseudolocalization_prefix", + "getter": "get_pseudolocalization_prefix" + }, + { + "type": "String", + "name": "pseudolocalization_suffix", + "setter": "set_pseudolocalization_suffix", + "getter": "get_pseudolocalization_suffix" + } + ] + }, { "name": "TranslationServer", "is_refcounted": false, @@ -279802,7 +294812,10 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 3135753539, + "hash": 4216441673, + "hash_compatibility": [ + 3135753539 + ], "return_value": { "type": "String" }, @@ -279810,6 +294823,11 @@ { "name": "locale", "type": "String" + }, + { + "name": "add_defaults", + "type": "bool", + "default_value": "false" } ] }, @@ -279920,9 +294938,8 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 58037827, + "hash": 1829228469, "hash_compatibility": [ - 1829228469, 58037827 ], "return_value": { @@ -279946,9 +294963,8 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 1333931916, + "hash": 229954002, "hash_compatibility": [ - 229954002, 1333931916 ], "return_value": { @@ -280020,6 +295036,54 @@ } ] }, + { + "name": "has_domain", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 2619796661, + "return_value": { + "type": "bool" + }, + "arguments": [ + { + "name": "domain", + "type": "StringName" + } + ] + }, + { + "name": "get_or_add_domain", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 397200075, + "return_value": { + "type": "TranslationDomain" + }, + "arguments": [ + { + "name": "domain", + "type": "StringName" + } + ] + }, + { + "name": "remove_domain", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3304788590, + "arguments": [ + { + "name": "domain", + "type": "StringName" + } + ] + }, { "name": "clear", "is_const": false, @@ -281062,6 +296126,31 @@ "return_value": { "type": "bool" } + }, + { + "name": "set_auto_tooltip", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 2586408642, + "arguments": [ + { + "name": "enable", + "type": "bool" + } + ] + }, + { + "name": "is_auto_tooltip_enabled", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 36873697, + "return_value": { + "type": "bool" + } } ], "signals": [ @@ -281273,6 +296362,12 @@ "name": "scroll_vertical_enabled", "setter": "set_v_scroll_enabled", "getter": "is_v_scroll_enabled" + }, + { + "type": "bool", + "name": "auto_tooltip", + "setter": "set_auto_tooltip", + "getter": "is_auto_tooltip_enabled" } ] }, @@ -281348,6 +296443,43 @@ } ] }, + { + "name": "set_auto_translate_mode", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 287402019, + "arguments": [ + { + "name": "column", + "type": "int", + "meta": "int32" + }, + { + "name": "mode", + "type": "enum::Node.AutoTranslateMode" + } + ] + }, + { + "name": "get_auto_translate_mode", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 906302372, + "return_value": { + "type": "enum::Node.AutoTranslateMode" + }, + "arguments": [ + { + "name": "column", + "type": "int", + "meta": "int32" + } + ] + }, { "name": "set_edit_multiline", "is_const": false, @@ -281815,6 +296947,43 @@ } ] }, + { + "name": "set_icon_overlay", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 666127730, + "arguments": [ + { + "name": "column", + "type": "int", + "meta": "int32" + }, + { + "name": "texture", + "type": "Texture2D" + } + ] + }, + { + "name": "get_icon_overlay", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3536238170, + "return_value": { + "type": "Texture2D" + }, + "arguments": [ + { + "name": "column", + "type": "int", + "meta": "int32" + } + ] + }, { "name": "set_icon_region", "is_const": false, @@ -282589,6 +297758,14 @@ } ] }, + { + "name": "clear_buttons", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3218959716 + }, { "name": "add_button", "is_const": false, @@ -283823,6 +299000,23 @@ } ] }, + { + "name": "tween_subtween", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1567358477, + "return_value": { + "type": "SubtweenTweener" + }, + "arguments": [ + { + "name": "subtween", + "type": "Tween" + } + ] + }, { "name": "custom_step", "is_const": false, @@ -283958,6 +299152,24 @@ } ] }, + { + "name": "set_ignore_time_scale", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1942052223, + "return_value": { + "type": "Tween" + }, + "arguments": [ + { + "name": "ignore", + "type": "bool", + "default_value": "true" + } + ] + }, { "name": "set_parallel", "is_const": false, @@ -286166,8 +301378,10 @@ "name": "_instantiate_playback", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 294648086, "return_value": { "type": "VideoStreamPlayback" } @@ -286218,22 +301432,28 @@ "name": "_stop", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, - "is_virtual": true + "is_virtual": true, + "hash": 3218959716 }, { "name": "_play", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, - "is_virtual": true + "is_virtual": true, + "hash": 3218959716 }, { "name": "_is_playing", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 36873697, "return_value": { "type": "bool" } @@ -286242,8 +301462,10 @@ "name": "_set_paused", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 2586408642, "arguments": [ { "name": "paused", @@ -286255,8 +301477,10 @@ "name": "_is_paused", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 36873697, "return_value": { "type": "bool" } @@ -286265,8 +301489,10 @@ "name": "_get_length", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1740695150, "return_value": { "type": "float", "meta": "double" @@ -286276,8 +301502,10 @@ "name": "_get_playback_position", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1740695150, "return_value": { "type": "float", "meta": "double" @@ -286287,8 +301515,10 @@ "name": "_seek", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 373806689, "arguments": [ { "name": "time", @@ -286301,8 +301531,10 @@ "name": "_set_audio_track", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1286410249, "arguments": [ { "name": "idx", @@ -286315,8 +301547,10 @@ "name": "_get_texture", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3635182373, "return_value": { "type": "Texture2D" } @@ -286325,8 +301559,10 @@ "name": "_update", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 373806689, "arguments": [ { "name": "delta", @@ -286339,8 +301575,10 @@ "name": "_get_channels", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3905245786, "return_value": { "type": "int", "meta": "int32" @@ -286350,8 +301588,10 @@ "name": "_get_mix_rate", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3905245786, "return_value": { "type": "int", "meta": "int32" @@ -286889,8 +302129,16 @@ "value": 2 }, { - "name": "SCALING_3D_MODE_MAX", + "name": "SCALING_3D_MODE_METALFX_SPATIAL", "value": 3 + }, + { + "name": "SCALING_3D_MODE_METALFX_TEMPORAL", + "value": 4 + }, + { + "name": "SCALING_3D_MODE_MAX", + "value": 5 } ] }, @@ -286920,6 +302168,36 @@ } ] }, + { + "name": "AnisotropicFiltering", + "is_bitfield": false, + "values": [ + { + "name": "ANISOTROPY_DISABLED", + "value": 0 + }, + { + "name": "ANISOTROPY_2X", + "value": 1 + }, + { + "name": "ANISOTROPY_4X", + "value": 2 + }, + { + "name": "ANISOTROPY_8X", + "value": 3 + }, + { + "name": "ANISOTROPY_16X", + "value": 4 + }, + { + "name": "ANISOTROPY_MAX", + "value": 5 + } + ] + }, { "name": "ScreenSpaceAA", "is_bitfield": false, @@ -287324,6 +302602,17 @@ "type": "Transform2D" } }, + { + "name": "get_stretch_transform", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3814499831, + "return_value": { + "type": "Transform2D" + } + }, { "name": "get_final_transform", "is_const": true, @@ -287753,6 +303042,22 @@ } ] }, + { + "name": "notify_mouse_entered", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3218959716 + }, + { + "name": "notify_mouse_exited", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3218959716 + }, { "name": "get_mouse_position", "is_const": true, @@ -288342,6 +303647,17 @@ "type": "bool" } }, + { + "name": "get_audio_listener_2d", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1840977180, + "return_value": { + "type": "AudioListener2D" + } + }, { "name": "get_camera_2d", "is_const": true, @@ -288414,6 +303730,17 @@ "type": "bool" } }, + { + "name": "get_audio_listener_3d", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3472246991, + "return_value": { + "type": "AudioListener3D" + } + }, { "name": "get_camera_3d", "is_const": true, @@ -288606,6 +303933,31 @@ "meta": "float" } }, + { + "name": "set_anisotropic_filtering_level", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3445583046, + "arguments": [ + { + "name": "anisotropic_filtering_level", + "type": "enum::Viewport.AnisotropicFiltering" + } + ] + }, + { + "name": "get_anisotropic_filtering_level", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3991528932, + "return_value": { + "type": "enum::Viewport.AnisotropicFiltering" + } + }, { "name": "set_vrs_mode", "is_const": false, @@ -288823,6 +304175,12 @@ "setter": "set_texture_mipmap_bias", "getter": "get_texture_mipmap_bias" }, + { + "type": "int", + "name": "anisotropic_filtering_level", + "setter": "set_anisotropic_filtering_level", + "getter": "get_anisotropic_filtering_level" + }, { "type": "float", "name": "fsr_sharpness", @@ -289329,8 +304687,10 @@ "name": "_get_aabb", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1068685055, "return_value": { "type": "AABB" } @@ -290770,8 +306130,16 @@ "value": 3 }, { - "name": "FUNC_MAX", + "name": "FUNC_LINEAR_TO_SRGB", "value": 4 + }, + { + "name": "FUNC_SRGB_TO_LINEAR", + "value": 5 + }, + { + "name": "FUNC_MAX", + "value": 6 } ] } @@ -291478,8 +306846,10 @@ "name": "_get_name", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 201670096, "return_value": { "type": "String" } @@ -291488,8 +306858,10 @@ "name": "_get_description", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 201670096, "return_value": { "type": "String" } @@ -291498,8 +306870,10 @@ "name": "_get_category", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 201670096, "return_value": { "type": "String" } @@ -291508,8 +306882,10 @@ "name": "_get_return_icon_type", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1287173294, "return_value": { "type": "enum::VisualShaderNode.PortType" } @@ -291518,8 +306894,10 @@ "name": "_get_input_port_count", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3905245786, "return_value": { "type": "int", "meta": "int32" @@ -291529,8 +306907,10 @@ "name": "_get_input_port_type", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 4102573379, "return_value": { "type": "enum::VisualShaderNode.PortType" }, @@ -291546,8 +306926,10 @@ "name": "_get_input_port_name", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 844755477, "return_value": { "type": "String" }, @@ -291563,8 +306945,10 @@ "name": "_get_input_port_default_value", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 4227898402, "return_value": { "type": "Variant" }, @@ -291580,8 +306964,10 @@ "name": "_get_default_input_port", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1894493699, "return_value": { "type": "int", "meta": "int32" @@ -291597,8 +306983,10 @@ "name": "_get_output_port_count", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3905245786, "return_value": { "type": "int", "meta": "int32" @@ -291608,8 +306996,10 @@ "name": "_get_output_port_type", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 4102573379, "return_value": { "type": "enum::VisualShaderNode.PortType" }, @@ -291625,8 +307015,10 @@ "name": "_get_output_port_name", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 844755477, "return_value": { "type": "String" }, @@ -291642,8 +307034,10 @@ "name": "_get_property_count", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3905245786, "return_value": { "type": "int", "meta": "int32" @@ -291653,8 +307047,10 @@ "name": "_get_property_name", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 844755477, "return_value": { "type": "String" }, @@ -291670,8 +307066,10 @@ "name": "_get_property_default_index", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 923996154, "return_value": { "type": "int", "meta": "int32" @@ -291688,8 +307086,10 @@ "name": "_get_property_options", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 647634434, "return_value": { "type": "PackedStringArray" }, @@ -291705,8 +307105,10 @@ "name": "_get_code", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 4287175357, "return_value": { "type": "String" }, @@ -291733,8 +307135,10 @@ "name": "_get_func_code", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1924221678, "return_value": { "type": "String" }, @@ -291753,8 +307157,10 @@ "name": "_get_global_code", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3956542358, "return_value": { "type": "String" }, @@ -291769,8 +307175,10 @@ "name": "_is_highend", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 36873697, "return_value": { "type": "bool" } @@ -291779,8 +307187,10 @@ "name": "_is_available", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1932120545, "return_value": { "type": "bool" }, @@ -294542,7 +309952,82 @@ "is_refcounted": true, "is_instantiable": true, "inherits": "VisualShaderNode", - "api_type": "core" + "api_type": "core", + "enums": [ + { + "name": "OpType", + "is_bitfield": false, + "values": [ + { + "name": "OP_TYPE_SCALAR", + "value": 0 + }, + { + "name": "OP_TYPE_VECTOR_2D", + "value": 1 + }, + { + "name": "OP_TYPE_VECTOR_2D_SCALAR", + "value": 2 + }, + { + "name": "OP_TYPE_VECTOR_3D", + "value": 3 + }, + { + "name": "OP_TYPE_VECTOR_3D_SCALAR", + "value": 4 + }, + { + "name": "OP_TYPE_VECTOR_4D", + "value": 5 + }, + { + "name": "OP_TYPE_VECTOR_4D_SCALAR", + "value": 6 + }, + { + "name": "OP_TYPE_MAX", + "value": 7 + } + ] + } + ], + "methods": [ + { + "name": "set_op_type", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1703697889, + "arguments": [ + { + "name": "op_type", + "type": "enum::VisualShaderNodeRemap.OpType" + } + ] + }, + { + "name": "get_op_type", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1678380563, + "return_value": { + "type": "enum::VisualShaderNodeRemap.OpType" + } + } + ], + "properties": [ + { + "type": "int", + "name": "op_type", + "setter": "set_op_type", + "getter": "get_op_type" + } + ] }, { "name": "VisualShaderNodeReroute", @@ -296624,6 +312109,12 @@ "name": "constant", "setter": "set_constant", "getter": "get_constant" + }, + { + "type": "Vector4", + "name": "constant_v4", + "setter": "_set_constant_v4", + "getter": "_get_constant_v4" } ] }, @@ -297873,8 +313364,10 @@ "name": "_get_packet", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3099858825, "return_value": { "type": "enum::Error" }, @@ -297893,8 +313386,10 @@ "name": "_put_packet", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3099858825, "return_value": { "type": "enum::Error" }, @@ -297914,8 +313409,10 @@ "name": "_get_available_packet_count", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3905245786, "return_value": { "type": "int", "meta": "int32" @@ -297925,8 +313422,10 @@ "name": "_get_max_packet_size", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3905245786, "return_value": { "type": "int", "meta": "int32" @@ -297936,8 +313435,10 @@ "name": "_poll", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 166280745, "return_value": { "type": "enum::Error" } @@ -297946,15 +313447,19 @@ "name": "_close", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, - "is_virtual": true + "is_virtual": true, + "hash": 3218959716 }, { "name": "_set_write_mode", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1999768052, "arguments": [ { "name": "p_write_mode", @@ -297966,8 +313471,10 @@ "name": "_get_write_mode", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2848495172, "return_value": { "type": "enum::WebRTCDataChannel.WriteMode" } @@ -297976,8 +313483,10 @@ "name": "_was_string_packet", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 36873697, "return_value": { "type": "bool" } @@ -297986,8 +313495,10 @@ "name": "_get_ready_state", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3501143017, "return_value": { "type": "enum::WebRTCDataChannel.ChannelState" } @@ -297996,8 +313507,10 @@ "name": "_get_label", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 201670096, "return_value": { "type": "String" } @@ -298006,8 +313519,10 @@ "name": "_is_ordered", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 36873697, "return_value": { "type": "bool" } @@ -298016,8 +313531,10 @@ "name": "_get_id", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3905245786, "return_value": { "type": "int", "meta": "int32" @@ -298027,8 +313544,10 @@ "name": "_get_max_packet_life_time", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3905245786, "return_value": { "type": "int", "meta": "int32" @@ -298038,8 +313557,10 @@ "name": "_get_max_retransmits", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3905245786, "return_value": { "type": "int", "meta": "int32" @@ -298049,8 +313570,10 @@ "name": "_get_protocol", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 201670096, "return_value": { "type": "String" } @@ -298059,8 +313582,10 @@ "name": "_is_negotiated", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 36873697, "return_value": { "type": "bool" } @@ -298069,8 +313594,10 @@ "name": "_get_buffered_amount", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3905245786, "return_value": { "type": "int", "meta": "int32" @@ -298579,8 +314106,10 @@ "name": "_get_connection_state", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 2275710506, "return_value": { "type": "enum::WebRTCPeerConnection.ConnectionState" } @@ -298589,8 +314118,10 @@ "name": "_get_gathering_state", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 4262591401, "return_value": { "type": "enum::WebRTCPeerConnection.GatheringState" } @@ -298599,8 +314130,10 @@ "name": "_get_signaling_state", "is_const": true, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3342956226, "return_value": { "type": "enum::WebRTCPeerConnection.SignalingState" } @@ -298609,8 +314142,10 @@ "name": "_initialize", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 1494659981, "return_value": { "type": "enum::Error" }, @@ -298625,8 +314160,10 @@ "name": "_create_data_channel", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 4111292546, "return_value": { "type": "WebRTCDataChannel" }, @@ -298645,8 +314182,10 @@ "name": "_create_offer", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 166280745, "return_value": { "type": "enum::Error" } @@ -298655,8 +314194,10 @@ "name": "_set_remote_description", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 852856452, "return_value": { "type": "enum::Error" }, @@ -298675,8 +314216,10 @@ "name": "_set_local_description", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 852856452, "return_value": { "type": "enum::Error" }, @@ -298695,8 +314238,10 @@ "name": "_add_ice_candidate", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 3958950400, "return_value": { "type": "enum::Error" }, @@ -298720,8 +314265,10 @@ "name": "_poll", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, "is_virtual": true, + "hash": 166280745, "return_value": { "type": "enum::Error" } @@ -298730,8 +314277,10 @@ "name": "_close", "is_const": false, "is_static": false, + "is_required": true, "is_vararg": false, - "is_virtual": true + "is_virtual": true, + "hash": 3218959716 } ] }, @@ -299455,6 +315004,33 @@ "type": "int", "meta": "int32" } + }, + { + "name": "set_heartbeat_interval", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 373806689, + "arguments": [ + { + "name": "interval", + "type": "float", + "meta": "double" + } + ] + }, + { + "name": "get_heartbeat_interval", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1740695150, + "return_value": { + "type": "float", + "meta": "double" + } } ], "properties": [ @@ -299487,6 +315063,12 @@ "name": "max_queued_packets", "setter": "set_max_queued_packets", "getter": "get_max_queued_packets" + }, + { + "type": "int", + "name": "heartbeat_interval", + "setter": "set_heartbeat_interval", + "getter": "get_heartbeat_interval" } ] }, @@ -299979,8 +315561,16 @@ "value": 7 }, { - "name": "FLAG_MAX", + "name": "FLAG_SHARP_CORNERS", "value": 8 + }, + { + "name": "FLAG_EXCLUDE_FROM_CAPTURE", + "value": 9 + }, + { + "name": "FLAG_MAX", + "value": 10 } ] }, @@ -300051,7 +315641,7 @@ "value": 0 }, { - "name": "LAYOUT_DIRECTION_LOCALE", + "name": "LAYOUT_DIRECTION_APPLICATION_LOCALE", "value": 1 }, { @@ -300061,6 +315651,18 @@ { "name": "LAYOUT_DIRECTION_RTL", "value": 3 + }, + { + "name": "LAYOUT_DIRECTION_SYSTEM_LOCALE", + "value": 4 + }, + { + "name": "LAYOUT_DIRECTION_MAX", + "value": 5 + }, + { + "name": "LAYOUT_DIRECTION_LOCALE", + "value": 1 } ] }, @@ -300100,8 +315702,10 @@ "name": "_get_contents_minimum_size", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3341600327, "return_value": { "type": "Vector2" } @@ -300580,6 +316184,28 @@ "is_virtual": false, "hash": 3218959716 }, + { + "name": "start_drag", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 3218959716 + }, + { + "name": "start_resize", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 122288853, + "arguments": [ + { + "name": "edge", + "type": "enum::DisplayServer.WindowResizeEdge" + } + ] + }, { "name": "set_ime_active", "is_const": false, @@ -301156,9 +316782,8 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 2336455395, + "hash": 3163973443, "hash_compatibility": [ - 3163973443, 2336455395 ], "return_value": { @@ -301182,9 +316807,8 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 2759935355, + "hash": 604739069, "hash_compatibility": [ - 604739069, 2759935355 ], "return_value": { @@ -301208,9 +316832,8 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 387378635, + "hash": 2826986490, "hash_compatibility": [ - 2826986490, 387378635 ], "return_value": { @@ -301234,9 +316857,8 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 229578101, + "hash": 1327056374, "hash_compatibility": [ - 1327056374, 229578101 ], "return_value": { @@ -301261,9 +316883,8 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 2377051548, + "hash": 2798751242, "hash_compatibility": [ - 2798751242, 2377051548 ], "return_value": { @@ -301287,9 +316908,8 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 229578101, + "hash": 1327056374, "hash_compatibility": [ - 1327056374, 229578101 ], "return_value": { @@ -301416,9 +317036,8 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 1187511791, + "hash": 866386512, "hash_compatibility": [ - 866386512, 1187511791 ], "return_value": { @@ -301442,9 +317061,8 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 1187511791, + "hash": 866386512, "hash_compatibility": [ - 866386512, 1187511791 ], "return_value": { @@ -301468,9 +317086,8 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 1187511791, + "hash": 866386512, "hash_compatibility": [ - 866386512, 1187511791 ], "return_value": { @@ -301494,9 +317111,8 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 1187511791, + "hash": 866386512, "hash_compatibility": [ - 866386512, 1187511791 ], "return_value": { @@ -301520,9 +317136,8 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 1187511791, + "hash": 866386512, "hash_compatibility": [ - 866386512, 1187511791 ], "return_value": { @@ -301546,9 +317161,8 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 1187511791, + "hash": 866386512, "hash_compatibility": [ - 866386512, 1187511791 ], "return_value": { @@ -301908,6 +317522,9 @@ }, { "name": "titlebar_changed" + }, + { + "name": "title_changed" } ], "properties": [ @@ -302039,6 +317656,20 @@ "getter": "get_flag", "index": 7 }, + { + "type": "bool", + "name": "sharp_corners", + "setter": "set_flag", + "getter": "get_flag", + "index": 8 + }, + { + "type": "bool", + "name": "exclude_from_capture", + "setter": "set_flag", + "getter": "get_flag", + "index": 9 + }, { "type": "bool", "name": "force_native", @@ -305734,8 +321365,10 @@ "name": "_get_name", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 2002593661, "return_value": { "type": "StringName" } @@ -305744,8 +321377,10 @@ "name": "_get_capabilities", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3905245786, "return_value": { "type": "int", "meta": "uint32" @@ -305755,8 +321390,10 @@ "name": "_is_initialized", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 36873697, "return_value": { "type": "bool" } @@ -305765,8 +321402,10 @@ "name": "_initialize", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 2240911060, "return_value": { "type": "bool" } @@ -305775,15 +321414,19 @@ "name": "_uninitialize", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, - "is_virtual": true + "is_virtual": true, + "hash": 3218959716 }, { "name": "_get_system_info", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3102165223, "return_value": { "type": "Dictionary" } @@ -305792,8 +321435,10 @@ "name": "_supports_play_area_mode", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 2693703033, "return_value": { "type": "bool" }, @@ -305808,8 +321453,10 @@ "name": "_get_play_area_mode", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1615132885, "return_value": { "type": "enum::XRInterface.PlayAreaMode" } @@ -305818,8 +321465,10 @@ "name": "_set_play_area_mode", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 2693703033, "return_value": { "type": "bool" }, @@ -305834,8 +321483,10 @@ "name": "_get_play_area", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 497664490, "return_value": { "type": "PackedVector3Array" } @@ -305844,8 +321495,10 @@ "name": "_get_render_target_size", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1497962370, "return_value": { "type": "Vector2" } @@ -305854,8 +321507,10 @@ "name": "_get_view_count", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 2455072627, "return_value": { "type": "int", "meta": "uint32" @@ -305865,8 +321520,10 @@ "name": "_get_camera_transform", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 4183770049, "return_value": { "type": "Transform3D" } @@ -305875,8 +321532,10 @@ "name": "_get_transform_for_view", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 518934792, "return_value": { "type": "Transform3D" }, @@ -305896,8 +321555,10 @@ "name": "_get_projection_for_view", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 4067457445, "return_value": { "type": "PackedFloat64Array" }, @@ -305928,8 +321589,10 @@ "name": "_get_vrs_texture", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 529393457, "return_value": { "type": "RID" } @@ -305938,22 +321601,28 @@ "name": "_process", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, - "is_virtual": true + "is_virtual": true, + "hash": 3218959716 }, { "name": "_pre_render", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, - "is_virtual": true + "is_virtual": true, + "hash": 3218959716 }, { "name": "_pre_draw_viewport", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3521089500, "return_value": { "type": "bool" }, @@ -305968,8 +321637,10 @@ "name": "_post_draw_viewport", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1378122625, "arguments": [ { "name": "render_target", @@ -305985,15 +321656,19 @@ "name": "_end_frame", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, - "is_virtual": true + "is_virtual": true, + "hash": 3218959716 }, { "name": "_get_suggested_tracker_names", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1139954409, "return_value": { "type": "PackedStringArray" } @@ -306002,8 +321677,10 @@ "name": "_get_suggested_pose_names", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 1761182771, "return_value": { "type": "PackedStringArray" }, @@ -306018,8 +321695,10 @@ "name": "_get_tracking_status", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 167423259, "return_value": { "type": "enum::XRInterface.TrackingStatus" } @@ -306028,8 +321707,10 @@ "name": "_trigger_haptic_pulse", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3752640163, "arguments": [ { "name": "action_name", @@ -306065,8 +321746,10 @@ "name": "_get_anchor_detection_is_enabled", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 36873697, "return_value": { "type": "bool" } @@ -306075,8 +321758,10 @@ "name": "_set_anchor_detection_is_enabled", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 2586408642, "arguments": [ { "name": "enabled", @@ -306088,8 +321773,10 @@ "name": "_get_camera_feed_id", "is_const": true, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 3905245786, "return_value": { "type": "int", "meta": "int32" @@ -306099,8 +321786,10 @@ "name": "_get_color_texture", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 529393457, "return_value": { "type": "RID" } @@ -306109,8 +321798,10 @@ "name": "_get_depth_texture", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 529393457, "return_value": { "type": "RID" } @@ -306119,8 +321810,10 @@ "name": "_get_velocity_texture", "is_const": false, "is_static": false, + "is_required": false, "is_vararg": false, "is_virtual": true, + "hash": 529393457, "return_value": { "type": "RID" } @@ -307177,6 +322870,31 @@ "type": "Transform3D" } }, + { + "name": "set_camera_locked_to_origin", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 2586408642, + "arguments": [ + { + "name": "enabled", + "type": "bool" + } + ] + }, + { + "name": "is_camera_locked_to_origin", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 36873697, + "return_value": { + "type": "bool" + } + }, { "name": "add_interface", "is_const": false, @@ -307436,6 +323154,12 @@ "setter": "set_world_origin", "getter": "get_world_origin" }, + { + "type": "bool", + "name": "camera_locked_to_origin", + "setter": "set_camera_locked_to_origin", + "getter": "is_camera_locked_to_origin" + }, { "type": "Object", "name": "primary_interface", @@ -307609,6 +323333,31 @@ } ] }, + { + "name": "get_vrs_render_region", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 410525958, + "return_value": { + "type": "Rect2i" + } + }, + { + "name": "set_vrs_render_region", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1763793166, + "arguments": [ + { + "name": "render_region", + "type": "Rect2i" + } + ] + }, { "name": "make_vrs_texture", "is_const": false, @@ -307643,6 +323392,12 @@ "name": "vrs_strength", "setter": "set_vrs_strength", "getter": "get_vrs_strength" + }, + { + "type": "Rect2i", + "name": "vrs_render_region", + "setter": "set_vrs_render_region", + "getter": "get_vrs_render_region" } ] }, @@ -307860,6 +323615,22 @@ "name": "Performance", "type": "Performance" }, + { + "name": "Engine", + "type": "Engine" + }, + { + "name": "ProjectSettings", + "type": "ProjectSettings" + }, + { + "name": "OS", + "type": "OS" + }, + { + "name": "Time", + "type": "Time" + }, { "name": "TextServerManager", "type": "TextServerManager" @@ -307876,10 +323647,6 @@ "name": "NavigationMeshGenerator", "type": "NavigationMeshGenerator" }, - { - "name": "ProjectSettings", - "type": "ProjectSettings" - }, { "name": "IP", "type": "IP" @@ -307900,14 +323667,6 @@ "name": "ResourceSaver", "type": "ResourceSaver" }, - { - "name": "OS", - "type": "OS" - }, - { - "name": "Engine", - "type": "Engine" - }, { "name": "ClassDB", "type": "ClassDB" @@ -307932,10 +323691,6 @@ "name": "EngineDebugger", "type": "EngineDebugger" }, - { - "name": "Time", - "type": "Time" - }, { "name": "GDExtensionManager", "type": "GDExtensionManager" diff --git a/gdextension/gdextension_interface.h b/gdextension/gdextension_interface.h index 8268afc3a..ac0181e07 100644 --- a/gdextension/gdextension_interface.h +++ b/gdextension/gdextension_interface.h @@ -273,7 +273,9 @@ typedef GDExtensionObjectPtr (*GDExtensionClassCreateInstance2)(void *p_class_us typedef void (*GDExtensionClassFreeInstance)(void *p_class_userdata, GDExtensionClassInstancePtr p_instance); typedef GDExtensionClassInstancePtr (*GDExtensionClassRecreateInstance)(void *p_class_userdata, GDExtensionObjectPtr p_object); typedef GDExtensionClassCallVirtual (*GDExtensionClassGetVirtual)(void *p_class_userdata, GDExtensionConstStringNamePtr p_name); +typedef GDExtensionClassCallVirtual (*GDExtensionClassGetVirtual2)(void *p_class_userdata, GDExtensionConstStringNamePtr p_name, uint32_t p_hash); typedef void *(*GDExtensionClassGetVirtualCallData)(void *p_class_userdata, GDExtensionConstStringNamePtr p_name); +typedef void *(*GDExtensionClassGetVirtualCallData2)(void *p_class_userdata, GDExtensionConstStringNamePtr p_name, uint32_t p_hash); typedef void (*GDExtensionClassCallVirtualWithData)(GDExtensionClassInstancePtr p_instance, GDExtensionConstStringNamePtr p_name, void *p_virtual_call_userdata, const GDExtensionConstTypePtr *p_args, GDExtensionTypePtr r_ret); typedef struct { @@ -368,6 +370,7 @@ typedef struct { GDExtensionBool is_abstract; GDExtensionBool is_exposed; GDExtensionBool is_runtime; + GDExtensionConstStringPtr icon_path; GDExtensionClassSet set_func; GDExtensionClassGet get_func; GDExtensionClassGetPropertyList get_property_list_func; @@ -383,14 +386,14 @@ typedef struct { GDExtensionClassFreeInstance free_instance_func; // Destructor; mandatory. GDExtensionClassRecreateInstance recreate_instance_func; // Queries a virtual function by name and returns a callback to invoke the requested virtual function. - GDExtensionClassGetVirtual get_virtual_func; + GDExtensionClassGetVirtual2 get_virtual_func; // Paired with `call_virtual_with_data_func`, this is an alternative to `get_virtual_func` for extensions that // need or benefit from extra data when calling virtual functions. // Returns user data that will be passed to `call_virtual_with_data_func`. // Returning `NULL` from this function signals to Godot that the virtual function is not overridden. // Data returned from this function should be managed by the extension and must be valid until the extension is deinitialized. // You should supply either `get_virtual_func`, or `get_virtual_call_data_func` with `call_virtual_with_data_func`. - GDExtensionClassGetVirtualCallData get_virtual_call_data_func; + GDExtensionClassGetVirtualCallData2 get_virtual_call_data_func; // Used to call virtual functions when `get_virtual_call_data_func` is not null. GDExtensionClassCallVirtualWithData call_virtual_with_data_func; void *class_userdata; // Per-class user data, later accessible in instance bindings. @@ -842,7 +845,7 @@ typedef void (*GDExtensionInterfaceMemFree)(void *p_ptr); * * Logs an error to Godot's built-in debugger and to the OS terminal. * - * @param p_description The code trigging the error. + * @param p_description The code triggering the error. * @param p_function The function name where the error occurred. * @param p_file The file where the error occurred. * @param p_line The line where the error occurred. @@ -856,7 +859,7 @@ typedef void (*GDExtensionInterfacePrintError)(const char *p_description, const * * Logs an error with a message to Godot's built-in debugger and to the OS terminal. * - * @param p_description The code trigging the error. + * @param p_description The code triggering the error. * @param p_message The message to show along with the error. * @param p_function The function name where the error occurred. * @param p_file The file where the error occurred. @@ -871,7 +874,7 @@ typedef void (*GDExtensionInterfacePrintErrorWithMessage)(const char *p_descript * * Logs a warning to Godot's built-in debugger and to the OS terminal. * - * @param p_description The code trigging the warning. + * @param p_description The code triggering the warning. * @param p_function The function name where the warning occurred. * @param p_file The file where the warning occurred. * @param p_line The line where the warning occurred. @@ -885,7 +888,7 @@ typedef void (*GDExtensionInterfacePrintWarning)(const char *p_description, cons * * Logs a warning with a message to Godot's built-in debugger and to the OS terminal. * - * @param p_description The code trigging the warning. + * @param p_description The code triggering the warning. * @param p_message The message to show along with the warning. * @param p_function The function name where the warning occurred. * @param p_file The file where the warning occurred. @@ -900,7 +903,7 @@ typedef void (*GDExtensionInterfacePrintWarningWithMessage)(const char *p_descri * * Logs a script error to Godot's built-in debugger and to the OS terminal. * - * @param p_description The code trigging the error. + * @param p_description The code triggering the error. * @param p_function The function name where the error occurred. * @param p_file The file where the error occurred. * @param p_line The line where the error occurred. @@ -914,7 +917,7 @@ typedef void (*GDExtensionInterfacePrintScriptError)(const char *p_description, * * Logs a script error with a message to Godot's built-in debugger and to the OS terminal. * - * @param p_description The code trigging the error. + * @param p_description The code triggering the error. * @param p_message The message to show along with the error. * @param p_function The function name where the error occurred. * @param p_file The file where the error occurred. diff --git a/include/godot_cpp/classes/editor_plugin_registration.hpp b/include/godot_cpp/classes/editor_plugin_registration.hpp index 7870bfc70..366008a43 100644 --- a/include/godot_cpp/classes/editor_plugin_registration.hpp +++ b/include/godot_cpp/classes/editor_plugin_registration.hpp @@ -28,8 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef GODOT_EDITOR_PLUGIN_REGISTRATION_HPP -#define GODOT_EDITOR_PLUGIN_REGISTRATION_HPP +#pragma once #include @@ -58,5 +57,3 @@ class EditorPlugins { }; } // namespace godot - -#endif // GODOT_EDITOR_PLUGIN_REGISTRATION_HPP diff --git a/include/godot_cpp/classes/ref.hpp b/include/godot_cpp/classes/ref.hpp index 137b677bf..541c5ce31 100644 --- a/include/godot_cpp/classes/ref.hpp +++ b/include/godot_cpp/classes/ref.hpp @@ -28,8 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef GODOT_REF_HPP -#define GODOT_REF_HPP +#pragma once #include @@ -71,6 +70,10 @@ class Ref { } public: + static _FORCE_INLINE_ String get_class_static() { + return T::get_class_static(); + } + _FORCE_INLINE_ bool operator==(const T *p_ptr) const { return reference == p_ptr; } @@ -230,7 +233,9 @@ template struct PtrToArg> { _FORCE_INLINE_ static Ref convert(const void *p_ptr) { GDExtensionRefPtr ref = (GDExtensionRefPtr)p_ptr; - ERR_FAIL_NULL_V(p_ptr, Ref()); + if (unlikely(!p_ptr)) { + return Ref(); + } return Ref(reinterpret_cast(godot::internal::get_object_instance_binding(godot::internal::gdextension_interface_ref_get_object(ref)))); } @@ -254,7 +259,9 @@ struct PtrToArg &> { _FORCE_INLINE_ static Ref convert(const void *p_ptr) { GDExtensionRefPtr ref = const_cast(p_ptr); - ERR_FAIL_NULL_V(p_ptr, Ref()); + if (unlikely(!p_ptr)) { + return Ref(); + } return Ref(reinterpret_cast(godot::internal::get_object_instance_binding(godot::internal::gdextension_interface_ref_get_object(ref)))); } }; @@ -280,5 +287,3 @@ struct GetTypeInfo &, typename EnableIf }; } // namespace godot - -#endif // GODOT_REF_HPP diff --git a/include/godot_cpp/classes/wrapped.hpp b/include/godot_cpp/classes/wrapped.hpp index 0c02d1520..2b4a9035e 100644 --- a/include/godot_cpp/classes/wrapped.hpp +++ b/include/godot_cpp/classes/wrapped.hpp @@ -28,8 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef GODOT_WRAPPED_HPP -#define GODOT_WRAPPED_HPP +#pragma once #include @@ -505,14 +504,9 @@ public: // Don't use this for your classes, use GDCLASS() instead. #define GDEXTENSION_CLASS(m_class, m_inherits) GDEXTENSION_CLASS_ALIAS(m_class, m_class, m_inherits) -#define GDVIRTUAL_CALL(m_name, ...) _gdvirtual_##m_name##_call(__VA_ARGS__) -#define GDVIRTUAL_CALL_PTR(m_obj, m_name, ...) m_obj->_gdvirtual_##m_name##_call(__VA_ARGS__) - -#define GDVIRTUAL_REQUIRED_CALL(m_name, ...) _gdvirtual_##m_name##_call(__VA_ARGS__) -#define GDVIRTUAL_REQUIRED_CALL_PTR(m_obj, m_name, ...) m_obj->_gdvirtual_##m_name##_call(__VA_ARGS__) +#define GDVIRTUAL_CALL(m_name, ...) _gdvirtual_##m_name##_call(__VA_ARGS__) +#define GDVIRTUAL_CALL_PTR(m_obj, m_name, ...) m_obj->_gdvirtual_##m_name##_call(__VA_ARGS__) #define GDVIRTUAL_BIND(m_name, ...) ::godot::ClassDB::add_virtual_method(get_class_static(), _gdvirtual_##m_name##_get_method_info(), ::godot::snarray(__VA_ARGS__)); #define GDVIRTUAL_IS_OVERRIDDEN(m_name) _gdvirtual_##m_name##_overridden() #define GDVIRTUAL_IS_OVERRIDDEN_PTR(m_obj, m_name) m_obj->_gdvirtual_##m_name##_overridden() - -#endif // GODOT_WRAPPED_HPP diff --git a/include/godot_cpp/core/binder_common.hpp b/include/godot_cpp/core/binder_common.hpp index 26ed4ca39..6a8777350 100644 --- a/include/godot_cpp/core/binder_common.hpp +++ b/include/godot_cpp/core/binder_common.hpp @@ -28,8 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef GODOT_BINDER_COMMON_HPP -#define GODOT_BINDER_COMMON_HPP +#pragma once #include @@ -692,5 +691,3 @@ void call_with_ptr_args_static_method_ret(R (*p_method)(P...), const GDExtension #include #include - -#endif // GODOT_BINDER_COMMON_HPP diff --git a/include/godot_cpp/core/builtin_ptrcall.hpp b/include/godot_cpp/core/builtin_ptrcall.hpp index 286051fa8..cf5310e2d 100644 --- a/include/godot_cpp/core/builtin_ptrcall.hpp +++ b/include/godot_cpp/core/builtin_ptrcall.hpp @@ -28,8 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef GODOT_BUILTIN_PTRCALL_HPP -#define GODOT_BUILTIN_PTRCALL_HPP +#pragma once #include #include @@ -88,5 +87,3 @@ T _call_builtin_ptr_getter(const GDExtensionPtrGetter getter, GDExtensionConstTy } // namespace internal } // namespace godot - -#endif // GODOT_BUILTIN_PTRCALL_HPP diff --git a/include/godot_cpp/core/class_db.hpp b/include/godot_cpp/core/class_db.hpp index 865deb819..1dcfebe3e 100644 --- a/include/godot_cpp/core/class_db.hpp +++ b/include/godot_cpp/core/class_db.hpp @@ -28,8 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef GODOT_CLASS_DB_HPP -#define GODOT_CLASS_DB_HPP +#pragma once #include @@ -88,12 +87,17 @@ class ClassDB { public: struct ClassInfo { + struct VirtualMethod { + GDExtensionClassCallVirtual func; + uint32_t hash; + }; + StringName name; StringName parent_name; GDExtensionInitializationLevel level = GDEXTENSION_INITIALIZATION_SCENE; std::unordered_map method_map; std::set signal_names; - std::unordered_map virtual_methods; + std::unordered_map virtual_methods; std::set property_names; std::set constant_names; // Pointer to the parent custom class, if any. Will be null if the parent class is a Godot class. @@ -193,13 +197,13 @@ class ClassDB { static void add_signal(const StringName &p_class, const MethodInfo &p_signal); static void bind_integer_constant(const StringName &p_class_name, const StringName &p_enum_name, const StringName &p_constant_name, GDExtensionInt p_constant_value, bool p_is_bitfield = false); // Binds an implementation of a virtual method defined in Godot. - static void bind_virtual_method(const StringName &p_class, const StringName &p_method, GDExtensionClassCallVirtual p_call); + static void bind_virtual_method(const StringName &p_class, const StringName &p_method, GDExtensionClassCallVirtual p_call, uint32_t p_hash); // Add a new virtual method that can be implemented by scripts. static void add_virtual_method(const StringName &p_class, const MethodInfo &p_method, const Vector &p_arg_names = Vector()); static MethodBind *get_method(const StringName &p_class, const StringName &p_method); - static GDExtensionClassCallVirtual get_virtual_func(void *p_userdata, GDExtensionConstStringNamePtr p_name); + static GDExtensionClassCallVirtual get_virtual_func(void *p_userdata, GDExtensionConstStringNamePtr p_name, uint32_t p_hash); static const GDExtensionInstanceBindingCallbacks *get_instance_binding_callbacks(const StringName &p_class); static void initialize(GDExtensionInitializationLevel p_level); @@ -217,12 +221,12 @@ class ClassDB { #define BIND_BITFIELD_FLAG(m_constant) \ ::godot::ClassDB::bind_integer_constant(get_class_static(), ::godot::_gde_constant_get_bitfield_name(m_constant, #m_constant), #m_constant, m_constant, true); -#define BIND_VIRTUAL_METHOD(m_class, m_method) \ +#define BIND_VIRTUAL_METHOD(m_class, m_method, m_hash) \ { \ auto _call##m_method = [](GDExtensionObjectPtr p_instance, const GDExtensionConstTypePtr *p_args, GDExtensionTypePtr p_ret) -> void { \ call_with_ptr_args(reinterpret_cast(p_instance), &m_class::m_method, p_args, p_ret); \ }; \ - ::godot::ClassDB::bind_virtual_method(m_class::get_class_static(), #m_method, _call##m_method); \ + ::godot::ClassDB::bind_virtual_method(m_class::get_class_static(), #m_method, _call##m_method, m_hash); \ } template @@ -251,6 +255,7 @@ void ClassDB::_register_class(bool p_virtual, bool p_exposed, bool p_runtime) { is_abstract, // GDExtensionBool is_abstract; p_exposed, // GDExtensionBool is_exposed; p_runtime, // GDExtensionBool is_runtime; + nullptr, // GDExtensionConstStringPtr icon_path; T::set_bind, // GDExtensionClassSet set_func; T::get_bind, // GDExtensionClassGet get_func; T::has_get_property_list() ? T::get_property_list_bind : nullptr, // GDExtensionClassGetPropertyList get_property_list_func; @@ -364,5 +369,3 @@ MethodBind *ClassDB::bind_vararg_method(uint32_t p_flags, StringName p_name, M p } // namespace godot CLASSDB_SINGLETON_VARIANT_CAST; - -#endif // GODOT_CLASS_DB_HPP diff --git a/include/godot_cpp/core/defs.hpp b/include/godot_cpp/core/defs.hpp index 5b985ffc3..c5115aa9a 100644 --- a/include/godot_cpp/core/defs.hpp +++ b/include/godot_cpp/core/defs.hpp @@ -28,8 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef GODOT_DEFS_HPP -#define GODOT_DEFS_HPP +#pragma once #include #include @@ -74,10 +73,6 @@ namespace godot { #endif #endif -#ifndef _NO_DISCARD_ -#define _NO_DISCARD_ [[nodiscard]] -#endif - // Windows badly defines a lot of stuff we'll never use. Undefine it. #ifdef _WIN32 #undef min // override standard definition @@ -134,5 +129,3 @@ struct BuildIndexSequence<0, Is...> : IndexSequence {}; // To maintain compatibility an alias is defined outside the namespace. // Consider it deprecated. using real_t = godot::real_t; - -#endif // GODOT_DEFS_HPP diff --git a/include/godot_cpp/core/engine_ptrcall.hpp b/include/godot_cpp/core/engine_ptrcall.hpp index 555806b8e..3e4db0621 100644 --- a/include/godot_cpp/core/engine_ptrcall.hpp +++ b/include/godot_cpp/core/engine_ptrcall.hpp @@ -28,8 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef GODOT_ENGINE_PTRCALL_HPP -#define GODOT_ENGINE_PTRCALL_HPP +#pragma once #include @@ -56,10 +55,10 @@ O *_call_native_mb_ret_obj(const GDExtensionMethodBindPtr mb, void *instance, co template R _call_native_mb_ret(const GDExtensionMethodBindPtr mb, void *instance, const Args &...args) { - R ret; + typename PtrToArg::EncodeT ret; std::array mb_args = { { (GDExtensionConstTypePtr)args... } }; internal::gdextension_interface_object_method_bind_ptrcall(mb, instance, mb_args.data(), &ret); - return ret; + return static_cast(ret); } template @@ -70,10 +69,10 @@ void _call_native_mb_no_ret(const GDExtensionMethodBindPtr mb, void *instance, c template R _call_utility_ret(GDExtensionPtrUtilityFunction func, const Args &...args) { - R ret; + typename PtrToArg::EncodeT ret; std::array mb_args = { { (GDExtensionConstTypePtr)args... } }; func(&ret, mb_args.data(), mb_args.size()); - return ret; + return static_cast(ret); } template @@ -93,5 +92,3 @@ void _call_utility_no_ret(const GDExtensionPtrUtilityFunction func, const Args & } // namespace internal } // namespace godot - -#endif // GODOT_ENGINE_PTRCALL_HPP diff --git a/include/godot_cpp/core/error_macros.hpp b/include/godot_cpp/core/error_macros.hpp index a27c2cb02..1337b0b70 100644 --- a/include/godot_cpp/core/error_macros.hpp +++ b/include/godot_cpp/core/error_macros.hpp @@ -28,8 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef GODOT_ERROR_MACROS_HPP -#define GODOT_ERROR_MACROS_HPP +#pragma once #include @@ -802,5 +801,3 @@ void _err_flush_stdout(); #define CHECK_METHOD_BIND_RET(m_mb, m_ret) #define CHECK_METHOD_BIND(m_mb) #endif - -#endif // GODOT_ERROR_MACROS_HPP diff --git a/include/godot_cpp/core/math.hpp b/include/godot_cpp/core/math.hpp index 1949360a9..44cc30145 100644 --- a/include/godot_cpp/core/math.hpp +++ b/include/godot_cpp/core/math.hpp @@ -28,8 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef GODOT_MATH_HPP -#define GODOT_MATH_HPP +#pragma once #include @@ -538,6 +537,26 @@ inline float bezier_interpolate(float p_start, float p_control_1, float p_contro return p_start * omt3 + p_control_1 * omt2 * p_t * 3.0f + p_control_2 * omt * t2 * 3.0f + p_end * t3; } +inline double bezier_derivative(double p_start, double p_control_1, double p_control_2, double p_end, double p_t) { + /* Formula from Wikipedia article on Bezier curves. */ + double omt = (1.0 - p_t); + double omt2 = omt * omt; + double t2 = p_t * p_t; + + double d = (p_control_1 - p_start) * 3.0 * omt2 + (p_control_2 - p_control_1) * 6.0 * omt * p_t + (p_end - p_control_2) * 3.0 * t2; + return d; +} + +inline float bezier_derivative(float p_start, float p_control_1, float p_control_2, float p_end, float p_t) { + /* Formula from Wikipedia article on Bezier curves. */ + float omt = (1.0f - p_t); + float omt2 = omt * omt; + float t2 = p_t * p_t; + + float d = (p_control_1 - p_start) * 3.0f * omt2 + (p_control_2 - p_control_1) * 6.0f * omt * p_t + (p_end - p_control_2) * 3.0f * t2; + return d; +} + template inline T clamp(T x, T minv, T maxv) { if (x < minv) { @@ -815,5 +834,3 @@ inline float snap_scalar_separation(float p_offset, float p_step, float p_target } // namespace Math } // namespace godot - -#endif // GODOT_MATH_HPP diff --git a/include/godot_cpp/core/memory.hpp b/include/godot_cpp/core/memory.hpp index 1934ee458..4905ba897 100644 --- a/include/godot_cpp/core/memory.hpp +++ b/include/godot_cpp/core/memory.hpp @@ -28,8 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef GODOT_MEMORY_HPP -#define GODOT_MEMORY_HPP +#pragma once #include #include @@ -216,5 +215,3 @@ struct _GlobalNilClass { }; } // namespace godot - -#endif // GODOT_MEMORY_HPP diff --git a/include/godot_cpp/core/method_bind.hpp b/include/godot_cpp/core/method_bind.hpp index f2da66ce0..07d51be6e 100644 --- a/include/godot_cpp/core/method_bind.hpp +++ b/include/godot_cpp/core/method_bind.hpp @@ -28,8 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef GODOT_METHOD_BIND_HPP -#define GODOT_METHOD_BIND_HPP +#pragma once #include #include @@ -731,5 +730,3 @@ MethodBind *create_static_method_bind(R (*p_method)(P...)) { } } // namespace godot - -#endif // GODOT_METHOD_BIND_HPP diff --git a/include/godot_cpp/core/method_ptrcall.hpp b/include/godot_cpp/core/method_ptrcall.hpp index 8889e8214..820e59e9b 100644 --- a/include/godot_cpp/core/method_ptrcall.hpp +++ b/include/godot_cpp/core/method_ptrcall.hpp @@ -28,8 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef GODOT_METHOD_PTRCALL_HPP -#define GODOT_METHOD_PTRCALL_HPP +#pragma once #include @@ -122,6 +121,9 @@ MAKE_PTRARGCONV(uint16_t, int64_t); MAKE_PTRARGCONV(int16_t, int64_t); MAKE_PTRARGCONV(uint32_t, int64_t); MAKE_PTRARGCONV(int32_t, int64_t); +MAKE_PTRARGCONV(char16_t, int64_t); +MAKE_PTRARGCONV(char32_t, int64_t); +MAKE_PTRARGCONV(wchar_t, int64_t); MAKE_PTRARG(int64_t); MAKE_PTRARG(uint64_t); // Float types @@ -234,5 +236,3 @@ GDVIRTUAL_NATIVE_PTR(float); GDVIRTUAL_NATIVE_PTR(double); } // namespace godot - -#endif // GODOT_METHOD_PTRCALL_HPP diff --git a/include/godot_cpp/core/mutex_lock.hpp b/include/godot_cpp/core/mutex_lock.hpp index aa81d4dcd..4d0029a9b 100644 --- a/include/godot_cpp/core/mutex_lock.hpp +++ b/include/godot_cpp/core/mutex_lock.hpp @@ -28,8 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef GODOT_MUTEX_LOCK_HPP -#define GODOT_MUTEX_LOCK_HPP +#pragma once #include @@ -55,5 +54,3 @@ class MutexLock { #define _THREAD_SAFE_UNLOCK_ _thread_safe_.unlock(); } // namespace godot - -#endif // GODOT_MUTEX_LOCK_HPP diff --git a/include/godot_cpp/core/object.hpp b/include/godot_cpp/core/object.hpp index 917ec6cc4..9eab6e5c0 100644 --- a/include/godot_cpp/core/object.hpp +++ b/include/godot_cpp/core/object.hpp @@ -28,8 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef GODOT_OBJECT_HPP -#define GODOT_OBJECT_HPP +#pragma once #include @@ -148,5 +147,3 @@ const T *Object::cast_to(const Object *p_object) { } } // namespace godot - -#endif // GODOT_OBJECT_HPP diff --git a/include/godot_cpp/core/object_id.hpp b/include/godot_cpp/core/object_id.hpp index 9f3bc96ff..815622b9c 100644 --- a/include/godot_cpp/core/object_id.hpp +++ b/include/godot_cpp/core/object_id.hpp @@ -28,8 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef GODOT_OBJECT_ID_HPP -#define GODOT_OBJECT_ID_HPP +#pragma once #include @@ -58,5 +57,3 @@ class ObjectID { }; } // namespace godot - -#endif // GODOT_OBJECT_ID_HPP diff --git a/include/godot_cpp/core/print_string.hpp b/include/godot_cpp/core/print_string.hpp index 3d70c796e..69afaf07b 100644 --- a/include/godot_cpp/core/print_string.hpp +++ b/include/godot_cpp/core/print_string.hpp @@ -28,8 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef GODOT_PRINT_STRING_HPP -#define GODOT_PRINT_STRING_HPP +#pragma once #include @@ -61,15 +60,11 @@ void print_line_rich(const Variant &p_variant, Args... p_args) { UtilityFunctions::print_rich(p_variant, p_args...); } +template +void print_verbose(const Variant &p_variant, Args... p_args) { + UtilityFunctions::print_verbose(p_variant, p_args...); +} + bool is_print_verbose_enabled(); -// Checking the condition before evaluating the text to be printed avoids processing unless it actually has to be printed, saving some CPU usage. -#define print_verbose(m_variant) \ - { \ - if (is_print_verbose_enabled()) { \ - print_line(m_variant); \ - } \ - } } // namespace godot - -#endif // GODOT_PRINT_STRING_HPP diff --git a/include/godot_cpp/core/property_info.hpp b/include/godot_cpp/core/property_info.hpp index dd71d48af..23da33e31 100644 --- a/include/godot_cpp/core/property_info.hpp +++ b/include/godot_cpp/core/property_info.hpp @@ -28,8 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef GODOT_PROPERTY_INFO_HPP -#define GODOT_PROPERTY_INFO_HPP +#pragma once #include @@ -128,5 +127,3 @@ struct PropertyInfo { }; } // namespace godot - -#endif // GODOT_PROPERTY_INFO_HPP diff --git a/include/godot_cpp/core/type_info.hpp b/include/godot_cpp/core/type_info.hpp index ebdad7b29..e584aab31 100644 --- a/include/godot_cpp/core/type_info.hpp +++ b/include/godot_cpp/core/type_info.hpp @@ -28,12 +28,11 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef GODOT_TYPE_INFO_HPP -#define GODOT_TYPE_INFO_HPP +#pragma once +#include #include #include -#include #include #include @@ -414,208 +413,6 @@ MAKE_TYPED_ARRAY_INFO(IPAddress, Variant::STRING) #undef MAKE_TYPED_ARRAY_INFO -template -struct PtrToArg> { - _FORCE_INLINE_ static TypedDictionary convert(const void *p_ptr) { - return TypedDictionary(*reinterpret_cast(p_ptr)); - } - typedef Dictionary EncodeT; - _FORCE_INLINE_ static void encode(TypedDictionary p_val, void *p_ptr) { - *(Dictionary *)p_ptr = p_val; - } -}; - -template -struct PtrToArg &> { - typedef Dictionary EncodeT; - _FORCE_INLINE_ static TypedDictionary - convert(const void *p_ptr) { - return TypedDictionary(*reinterpret_cast(p_ptr)); - } -}; - -template -struct GetTypeInfo> { - static constexpr GDExtensionVariantType VARIANT_TYPE = GDEXTENSION_VARIANT_TYPE_DICTIONARY; - static constexpr GDExtensionClassMethodArgumentMetadata METADATA = GDEXTENSION_METHOD_ARGUMENT_METADATA_NONE; - static inline PropertyInfo get_class_info() { - return PropertyInfo(Variant::Type::DICTIONARY, String(), PROPERTY_HINT_DICTIONARY_TYPE, vformat("%s;%s", K::get_class_static(), V::get_class_static())); - } -}; - -template -struct GetTypeInfo &> { - static constexpr GDExtensionVariantType VARIANT_TYPE = GDEXTENSION_VARIANT_TYPE_DICTIONARY; - static constexpr GDExtensionClassMethodArgumentMetadata METADATA = GDEXTENSION_METHOD_ARGUMENT_METADATA_NONE; - static inline PropertyInfo get_class_info() { - return PropertyInfo(Variant::Type::DICTIONARY, String(), PROPERTY_HINT_DICTIONARY_TYPE, vformat("%s;%s", K::get_class_static(), V::get_class_static())); - } -}; - -#define MAKE_TYPED_DICTIONARY_INFO_WITH_OBJECT(m_type, m_variant_type) \ - template \ - struct GetTypeInfo> { \ - static constexpr GDExtensionVariantType VARIANT_TYPE = GDEXTENSION_VARIANT_TYPE_DICTIONARY; \ - static constexpr GDExtensionClassMethodArgumentMetadata METADATA = GDEXTENSION_METHOD_ARGUMENT_METADATA_NONE; \ - static inline PropertyInfo get_class_info() { \ - return PropertyInfo(Variant::Type::DICTIONARY, String(), PROPERTY_HINT_DICTIONARY_TYPE, \ - vformat("%s;%s", T::get_class_static(), m_variant_type == Variant::Type::NIL ? "Variant" : Variant::get_type_name(m_variant_type).utf8().get_data())); \ - } \ - }; \ - template \ - struct GetTypeInfo &> { \ - static constexpr GDExtensionVariantType VARIANT_TYPE = GDEXTENSION_VARIANT_TYPE_DICTIONARY; \ - static constexpr GDExtensionClassMethodArgumentMetadata METADATA = GDEXTENSION_METHOD_ARGUMENT_METADATA_NONE; \ - static inline PropertyInfo get_class_info() { \ - return PropertyInfo(Variant::Type::DICTIONARY, String(), PROPERTY_HINT_DICTIONARY_TYPE, \ - vformat("%s;%s", T::get_class_static(), m_variant_type == Variant::Type::NIL ? "Variant" : Variant::get_type_name(m_variant_type).utf8().get_data())); \ - } \ - }; \ - template \ - struct GetTypeInfo> { \ - static constexpr GDExtensionVariantType VARIANT_TYPE = GDEXTENSION_VARIANT_TYPE_DICTIONARY; \ - static constexpr GDExtensionClassMethodArgumentMetadata METADATA = GDEXTENSION_METHOD_ARGUMENT_METADATA_NONE; \ - static inline PropertyInfo get_class_info() { \ - return PropertyInfo(Variant::Type::DICTIONARY, String(), PROPERTY_HINT_DICTIONARY_TYPE, \ - vformat("%s;%s", m_variant_type == Variant::Type::NIL ? "Variant" : Variant::get_type_name(m_variant_type).utf8().get_data(), T::get_class_static())); \ - } \ - }; \ - template \ - struct GetTypeInfo &> { \ - static constexpr GDExtensionVariantType VARIANT_TYPE = GDEXTENSION_VARIANT_TYPE_DICTIONARY; \ - static constexpr GDExtensionClassMethodArgumentMetadata METADATA = GDEXTENSION_METHOD_ARGUMENT_METADATA_NONE; \ - static inline PropertyInfo get_class_info() { \ - return PropertyInfo(Variant::Type::DICTIONARY, String(), PROPERTY_HINT_DICTIONARY_TYPE, \ - vformat("%s;%s", m_variant_type == Variant::Type::NIL ? "Variant" : Variant::get_type_name(m_variant_type).utf8().get_data(), T::get_class_static())); \ - } \ - }; - -#define MAKE_TYPED_DICTIONARY_INFO_EXPANDED(m_type_key, m_variant_type_key, m_type_value, m_variant_type_value) \ - template <> \ - struct GetTypeInfo> { \ - static constexpr GDExtensionVariantType VARIANT_TYPE = GDEXTENSION_VARIANT_TYPE_DICTIONARY; \ - static constexpr GDExtensionClassMethodArgumentMetadata METADATA = GDEXTENSION_METHOD_ARGUMENT_METADATA_NONE; \ - static inline PropertyInfo get_class_info() { \ - return PropertyInfo(Variant::Type::DICTIONARY, String(), PROPERTY_HINT_DICTIONARY_TYPE, \ - vformat("%s;%s", m_variant_type_key == Variant::Type::NIL ? "Variant" : Variant::get_type_name(m_variant_type_key).utf8().get_data(), \ - m_variant_type_value == Variant::Type::NIL ? "Variant" : Variant::get_type_name(m_variant_type_value).utf8().get_data())); \ - } \ - }; \ - template <> \ - struct GetTypeInfo &> { \ - static constexpr GDExtensionVariantType VARIANT_TYPE = GDEXTENSION_VARIANT_TYPE_DICTIONARY; \ - static constexpr GDExtensionClassMethodArgumentMetadata METADATA = GDEXTENSION_METHOD_ARGUMENT_METADATA_NONE; \ - static inline PropertyInfo get_class_info() { \ - return PropertyInfo(Variant::Type::DICTIONARY, String(), PROPERTY_HINT_DICTIONARY_TYPE, \ - vformat("%s;%s", m_variant_type_key == Variant::Type::NIL ? "Variant" : Variant::get_type_name(m_variant_type_key).utf8().get_data(), \ - m_variant_type_value == Variant::Type::NIL ? "Variant" : Variant::get_type_name(m_variant_type_value).utf8().get_data())); \ - } \ - }; - -#define MAKE_TYPED_DICTIONARY_INFO_NIL(m_type, m_variant_type) \ - MAKE_TYPED_DICTIONARY_INFO_WITH_OBJECT(m_type, m_variant_type) \ - MAKE_TYPED_DICTIONARY_INFO_EXPANDED(m_type, m_variant_type, bool, Variant::BOOL) \ - MAKE_TYPED_DICTIONARY_INFO_EXPANDED(m_type, m_variant_type, uint8_t, Variant::INT) \ - MAKE_TYPED_DICTIONARY_INFO_EXPANDED(m_type, m_variant_type, int8_t, Variant::INT) \ - MAKE_TYPED_DICTIONARY_INFO_EXPANDED(m_type, m_variant_type, uint16_t, Variant::INT) \ - MAKE_TYPED_DICTIONARY_INFO_EXPANDED(m_type, m_variant_type, int16_t, Variant::INT) \ - MAKE_TYPED_DICTIONARY_INFO_EXPANDED(m_type, m_variant_type, uint32_t, Variant::INT) \ - MAKE_TYPED_DICTIONARY_INFO_EXPANDED(m_type, m_variant_type, int32_t, Variant::INT) \ - MAKE_TYPED_DICTIONARY_INFO_EXPANDED(m_type, m_variant_type, uint64_t, Variant::INT) \ - MAKE_TYPED_DICTIONARY_INFO_EXPANDED(m_type, m_variant_type, int64_t, Variant::INT) \ - MAKE_TYPED_DICTIONARY_INFO_EXPANDED(m_type, m_variant_type, float, Variant::FLOAT) \ - MAKE_TYPED_DICTIONARY_INFO_EXPANDED(m_type, m_variant_type, double, Variant::FLOAT) \ - MAKE_TYPED_DICTIONARY_INFO_EXPANDED(m_type, m_variant_type, String, Variant::STRING) \ - MAKE_TYPED_DICTIONARY_INFO_EXPANDED(m_type, m_variant_type, Vector2, Variant::VECTOR2) \ - MAKE_TYPED_DICTIONARY_INFO_EXPANDED(m_type, m_variant_type, Vector2i, Variant::VECTOR2I) \ - MAKE_TYPED_DICTIONARY_INFO_EXPANDED(m_type, m_variant_type, Rect2, Variant::RECT2) \ - MAKE_TYPED_DICTIONARY_INFO_EXPANDED(m_type, m_variant_type, Rect2i, Variant::RECT2I) \ - MAKE_TYPED_DICTIONARY_INFO_EXPANDED(m_type, m_variant_type, Vector3, Variant::VECTOR3) \ - MAKE_TYPED_DICTIONARY_INFO_EXPANDED(m_type, m_variant_type, Vector3i, Variant::VECTOR3I) \ - MAKE_TYPED_DICTIONARY_INFO_EXPANDED(m_type, m_variant_type, Transform2D, Variant::TRANSFORM2D) \ - MAKE_TYPED_DICTIONARY_INFO_EXPANDED(m_type, m_variant_type, Plane, Variant::PLANE) \ - MAKE_TYPED_DICTIONARY_INFO_EXPANDED(m_type, m_variant_type, Quaternion, Variant::QUATERNION) \ - MAKE_TYPED_DICTIONARY_INFO_EXPANDED(m_type, m_variant_type, AABB, Variant::AABB) \ - MAKE_TYPED_DICTIONARY_INFO_EXPANDED(m_type, m_variant_type, Basis, Variant::BASIS) \ - MAKE_TYPED_DICTIONARY_INFO_EXPANDED(m_type, m_variant_type, Transform3D, Variant::TRANSFORM3D) \ - MAKE_TYPED_DICTIONARY_INFO_EXPANDED(m_type, m_variant_type, Color, Variant::COLOR) \ - MAKE_TYPED_DICTIONARY_INFO_EXPANDED(m_type, m_variant_type, StringName, Variant::STRING_NAME) \ - MAKE_TYPED_DICTIONARY_INFO_EXPANDED(m_type, m_variant_type, NodePath, Variant::NODE_PATH) \ - MAKE_TYPED_DICTIONARY_INFO_EXPANDED(m_type, m_variant_type, RID, Variant::RID) \ - MAKE_TYPED_DICTIONARY_INFO_EXPANDED(m_type, m_variant_type, Callable, Variant::CALLABLE) \ - MAKE_TYPED_DICTIONARY_INFO_EXPANDED(m_type, m_variant_type, Signal, Variant::SIGNAL) \ - MAKE_TYPED_DICTIONARY_INFO_EXPANDED(m_type, m_variant_type, Dictionary, Variant::DICTIONARY) \ - MAKE_TYPED_DICTIONARY_INFO_EXPANDED(m_type, m_variant_type, Array, Variant::ARRAY) \ - MAKE_TYPED_DICTIONARY_INFO_EXPANDED(m_type, m_variant_type, PackedByteArray, Variant::PACKED_BYTE_ARRAY) \ - MAKE_TYPED_DICTIONARY_INFO_EXPANDED(m_type, m_variant_type, PackedInt32Array, Variant::PACKED_INT32_ARRAY) \ - MAKE_TYPED_DICTIONARY_INFO_EXPANDED(m_type, m_variant_type, PackedInt64Array, Variant::PACKED_INT64_ARRAY) \ - MAKE_TYPED_DICTIONARY_INFO_EXPANDED(m_type, m_variant_type, PackedFloat32Array, Variant::PACKED_FLOAT32_ARRAY) \ - MAKE_TYPED_DICTIONARY_INFO_EXPANDED(m_type, m_variant_type, PackedFloat64Array, Variant::PACKED_FLOAT64_ARRAY) \ - MAKE_TYPED_DICTIONARY_INFO_EXPANDED(m_type, m_variant_type, PackedStringArray, Variant::PACKED_STRING_ARRAY) \ - MAKE_TYPED_DICTIONARY_INFO_EXPANDED(m_type, m_variant_type, PackedVector2Array, Variant::PACKED_VECTOR2_ARRAY) \ - MAKE_TYPED_DICTIONARY_INFO_EXPANDED(m_type, m_variant_type, PackedVector3Array, Variant::PACKED_VECTOR3_ARRAY) \ - MAKE_TYPED_DICTIONARY_INFO_EXPANDED(m_type, m_variant_type, PackedVector4Array, Variant::PACKED_VECTOR4_ARRAY) \ - MAKE_TYPED_DICTIONARY_INFO_EXPANDED(m_type, m_variant_type, PackedColorArray, Variant::PACKED_COLOR_ARRAY) \ - /* MAKE_TYPED_DICTIONARY_INFO_EXPANDED(m_type, m_variant_type, IPAddress, Variant::STRING) */ - -#define MAKE_TYPED_DICTIONARY_INFO(m_type, m_variant_type) \ - MAKE_TYPED_DICTIONARY_INFO_EXPANDED(m_type, m_variant_type, Variant, Variant::NIL) \ - MAKE_TYPED_DICTIONARY_INFO_NIL(m_type, m_variant_type) - -MAKE_TYPED_DICTIONARY_INFO_NIL(Variant, Variant::NIL) -MAKE_TYPED_DICTIONARY_INFO(bool, Variant::BOOL) -MAKE_TYPED_DICTIONARY_INFO(uint8_t, Variant::INT) -MAKE_TYPED_DICTIONARY_INFO(int8_t, Variant::INT) -MAKE_TYPED_DICTIONARY_INFO(uint16_t, Variant::INT) -MAKE_TYPED_DICTIONARY_INFO(int16_t, Variant::INT) -MAKE_TYPED_DICTIONARY_INFO(uint32_t, Variant::INT) -MAKE_TYPED_DICTIONARY_INFO(int32_t, Variant::INT) -MAKE_TYPED_DICTIONARY_INFO(uint64_t, Variant::INT) -MAKE_TYPED_DICTIONARY_INFO(int64_t, Variant::INT) -MAKE_TYPED_DICTIONARY_INFO(float, Variant::FLOAT) -MAKE_TYPED_DICTIONARY_INFO(double, Variant::FLOAT) -MAKE_TYPED_DICTIONARY_INFO(String, Variant::STRING) -MAKE_TYPED_DICTIONARY_INFO(Vector2, Variant::VECTOR2) -MAKE_TYPED_DICTIONARY_INFO(Vector2i, Variant::VECTOR2I) -MAKE_TYPED_DICTIONARY_INFO(Rect2, Variant::RECT2) -MAKE_TYPED_DICTIONARY_INFO(Rect2i, Variant::RECT2I) -MAKE_TYPED_DICTIONARY_INFO(Vector3, Variant::VECTOR3) -MAKE_TYPED_DICTIONARY_INFO(Vector3i, Variant::VECTOR3I) -MAKE_TYPED_DICTIONARY_INFO(Transform2D, Variant::TRANSFORM2D) -MAKE_TYPED_DICTIONARY_INFO(Plane, Variant::PLANE) -MAKE_TYPED_DICTIONARY_INFO(Quaternion, Variant::QUATERNION) -MAKE_TYPED_DICTIONARY_INFO(AABB, Variant::AABB) -MAKE_TYPED_DICTIONARY_INFO(Basis, Variant::BASIS) -MAKE_TYPED_DICTIONARY_INFO(Transform3D, Variant::TRANSFORM3D) -MAKE_TYPED_DICTIONARY_INFO(Color, Variant::COLOR) -MAKE_TYPED_DICTIONARY_INFO(StringName, Variant::STRING_NAME) -MAKE_TYPED_DICTIONARY_INFO(NodePath, Variant::NODE_PATH) -MAKE_TYPED_DICTIONARY_INFO(RID, Variant::RID) -MAKE_TYPED_DICTIONARY_INFO(Callable, Variant::CALLABLE) -MAKE_TYPED_DICTIONARY_INFO(Signal, Variant::SIGNAL) -MAKE_TYPED_DICTIONARY_INFO(Dictionary, Variant::DICTIONARY) -MAKE_TYPED_DICTIONARY_INFO(Array, Variant::ARRAY) -MAKE_TYPED_DICTIONARY_INFO(PackedByteArray, Variant::PACKED_BYTE_ARRAY) -MAKE_TYPED_DICTIONARY_INFO(PackedInt32Array, Variant::PACKED_INT32_ARRAY) -MAKE_TYPED_DICTIONARY_INFO(PackedInt64Array, Variant::PACKED_INT64_ARRAY) -MAKE_TYPED_DICTIONARY_INFO(PackedFloat32Array, Variant::PACKED_FLOAT32_ARRAY) -MAKE_TYPED_DICTIONARY_INFO(PackedFloat64Array, Variant::PACKED_FLOAT64_ARRAY) -MAKE_TYPED_DICTIONARY_INFO(PackedStringArray, Variant::PACKED_STRING_ARRAY) -MAKE_TYPED_DICTIONARY_INFO(PackedVector2Array, Variant::PACKED_VECTOR2_ARRAY) -MAKE_TYPED_DICTIONARY_INFO(PackedVector3Array, Variant::PACKED_VECTOR3_ARRAY) -MAKE_TYPED_DICTIONARY_INFO(PackedVector4Array, Variant::PACKED_VECTOR4_ARRAY) -MAKE_TYPED_DICTIONARY_INFO(PackedColorArray, Variant::PACKED_COLOR_ARRAY) -/* -MAKE_TYPED_DICTIONARY_INFO(IPAddress, Variant::STRING) -*/ - -#undef MAKE_TYPED_DICTIONARY_INFO -#undef MAKE_TYPED_DICTIONARY_INFO_NIL -#undef MAKE_TYPED_DICTIONARY_INFO_EXPANDED -#undef MAKE_TYPED_DICTIONARY_INFO_WITH_OBJECT - #define CLASS_INFO(m_type) (GetTypeInfo::get_class_info()) } // namespace godot - -#endif // GODOT_TYPE_INFO_HPP diff --git a/include/godot_cpp/godot.hpp b/include/godot_cpp/godot.hpp index 39a5f05dc..7659f8a95 100644 --- a/include/godot_cpp/godot.hpp +++ b/include/godot_cpp/godot.hpp @@ -28,8 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef GODOT_GODOT_HPP -#define GODOT_GODOT_HPP +#pragma once #include @@ -88,6 +87,7 @@ extern "C" GDExtensionInterfaceVariantCanConvert gdextension_interface_variant_c extern "C" GDExtensionInterfaceVariantCanConvertStrict gdextension_interface_variant_can_convert_strict; extern "C" GDExtensionInterfaceGetVariantFromTypeConstructor gdextension_interface_get_variant_from_type_constructor; extern "C" GDExtensionInterfaceGetVariantToTypeConstructor gdextension_interface_get_variant_to_type_constructor; +extern "C" GDExtensionInterfaceGetVariantGetInternalPtrFunc gdextension_interface_variant_get_ptr_internal_getter; extern "C" GDExtensionInterfaceVariantGetPtrOperatorEvaluator gdextension_interface_variant_get_ptr_operator_evaluator; extern "C" GDExtensionInterfaceVariantGetPtrBuiltinMethod gdextension_interface_variant_get_ptr_builtin_method; extern "C" GDExtensionInterfaceVariantGetPtrConstructor gdextension_interface_variant_get_ptr_constructor; @@ -264,5 +264,3 @@ class GDExtensionBinding { }; } // namespace godot - -#endif // GODOT_GODOT_HPP diff --git a/include/godot_cpp/templates/cowdata.hpp b/include/godot_cpp/templates/cowdata.hpp index dcb74eccc..39ba5c8e7 100644 --- a/include/godot_cpp/templates/cowdata.hpp +++ b/include/godot_cpp/templates/cowdata.hpp @@ -28,8 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef GODOT_COWDATA_HPP -#define GODOT_COWDATA_HPP +#pragma once #include #include @@ -38,8 +37,10 @@ #include #include +#include #include #include +#include namespace godot { @@ -167,13 +168,25 @@ class CowData { return *out; } - void _unref(void *p_data); + // Decrements the reference count. Deallocates the backing buffer if needed. + // After this function, _ptr is guaranteed to be NULL. + void _unref(); void _ref(const CowData *p_from); void _ref(const CowData &p_from); USize _copy_on_write(); + Error _realloc(Size p_alloc_size); public: void operator=(const CowData &p_from) { _ref(p_from); } + void operator=(CowData &&p_from) { + if (_ptr == p_from._ptr) { + return; + } + + _unref(); + _ptr = p_from._ptr; + p_from._ptr = nullptr; + } _FORCE_INLINE_ T *ptrw() { _copy_on_write(); @@ -222,19 +235,22 @@ class CowData { T *p = ptrw(); Size len = size(); for (Size i = p_index; i < len - 1; i++) { - p[i] = p[i + 1]; + p[i] = std::move(p[i + 1]); } resize(len - 1); } Error insert(Size p_pos, const T &p_val) { - ERR_FAIL_INDEX_V(p_pos, size() + 1, ERR_INVALID_PARAMETER); - resize(size() + 1); - for (Size i = (size() - 1); i > p_pos; i--) { - set(i, get(i - 1)); + Size new_size = size() + 1; + ERR_FAIL_INDEX_V(p_pos, new_size, ERR_INVALID_PARAMETER); + Error err = resize(new_size); + ERR_FAIL_COND_V(err, err); + T *p = ptrw(); + for (Size i = new_size - 1; i > p_pos; i--) { + p[i] = std::move(p[i - 1]); } - set(p_pos, p_val); + p[p_pos] = p_val; return OK; } @@ -244,35 +260,47 @@ class CowData { Size count(const T &p_val) const; _FORCE_INLINE_ CowData() {} - _FORCE_INLINE_ ~CowData(); - _FORCE_INLINE_ CowData(CowData &p_from) { _ref(p_from); }; + _FORCE_INLINE_ ~CowData() { _unref(); } + _FORCE_INLINE_ CowData(std::initializer_list p_init); + _FORCE_INLINE_ CowData(const CowData &p_from) { _ref(p_from); } + _FORCE_INLINE_ CowData(CowData &&p_from) { + _ptr = p_from._ptr; + p_from._ptr = nullptr; + } }; template -void CowData::_unref(void *p_data) { - if (!p_data) { +void CowData::_unref() { + if (!_ptr) { return; } SafeNumeric *refc = _get_refcount(); - if (refc->decrement() > 0) { - return; // still in use + // Data is still in use elsewhere. + _ptr = nullptr; + return; } - // clean up + // Clean up. + // First, invalidate our own reference. + // NOTE: It is required to do so immediately because it must not be observable outside of this + // function after refcount has already been reduced to 0. + // WARNING: It must be done before calling the destructors, because one of them may otherwise + // observe it through a reference to us. In this case, it may try to access the buffer, + // which is illegal after some of the elements in it have already been destructed, and + // may lead to a segmentation fault. + USize current_size = *_get_size(); + T *prev_ptr = _ptr; + _ptr = nullptr; if constexpr (!std::is_trivially_destructible_v) { - USize *count = _get_size(); - T *data = (T *)(count + 1); - - for (USize i = 0; i < *count; ++i) { - // call destructors - data[i].~T(); + for (USize i = 0; i < current_size; ++i) { + prev_ptr[i].~T(); } } // free mem - Memory::free_static(((uint8_t *)p_data) - DATA_OFFSET, false); + Memory::free_static((uint8_t *)prev_ptr - DATA_OFFSET, false); } template @@ -307,7 +335,7 @@ typename CowData::USize CowData::_copy_on_write() { } } - _unref(_ptr); + _unref(); _ptr = _data_ptr; rc = 1; @@ -327,14 +355,13 @@ Error CowData::resize(Size p_size) { } if (p_size == 0) { - // wants to clean up - _unref(_ptr); - _ptr = nullptr; + // Wants to clean up. + _unref(); // Resets _ptr to nullptr. return OK; } // possibly changing size, copy on write - USize rc = _copy_on_write(); + _copy_on_write(); USize current_alloc_size = _get_alloc_size(current_size); USize alloc_size; @@ -355,16 +382,12 @@ Error CowData::resize(Size p_size) { *(_size_ptr) = 0; //size, currently none _ptr = _data_ptr; - } else { - uint8_t *mem_new = (uint8_t *)Memory::realloc_static(((uint8_t *)_ptr) - DATA_OFFSET, alloc_size + DATA_OFFSET, false); - ERR_FAIL_NULL_V(mem_new, ERR_OUT_OF_MEMORY); - - SafeNumeric *_refc_ptr = _get_refcount_ptr(mem_new); - T *_data_ptr = _get_data_ptr(mem_new); - - new (_refc_ptr) SafeNumeric(rc); //refcount - _ptr = _data_ptr; + } else { + const Error error = _realloc(alloc_size); + if (error) { + return error; + } } } @@ -390,15 +413,10 @@ Error CowData::resize(Size p_size) { } if (alloc_size != current_alloc_size) { - uint8_t *mem_new = (uint8_t *)Memory::realloc_static(((uint8_t *)_ptr) - DATA_OFFSET, alloc_size + DATA_OFFSET, false); - ERR_FAIL_NULL_V(mem_new, ERR_OUT_OF_MEMORY); - - SafeNumeric *_refc_ptr = _get_refcount_ptr(mem_new); - T *_data_ptr = _get_data_ptr(mem_new); - - new (_refc_ptr) SafeNumeric(rc); //refcount - - _ptr = _data_ptr; + const Error error = _realloc(alloc_size); + if (error) { + return error; + } } *_get_size() = p_size; @@ -407,6 +425,21 @@ Error CowData::resize(Size p_size) { return OK; } +template +Error CowData::_realloc(Size p_alloc_size) { + uint8_t *mem_new = (uint8_t *)Memory::realloc_static(((uint8_t *)_ptr) - DATA_OFFSET, p_alloc_size + DATA_OFFSET, false); + ERR_FAIL_NULL_V(mem_new, ERR_OUT_OF_MEMORY); + + SafeNumeric *_refc_ptr = _get_refcount_ptr(mem_new); + T *_data_ptr = _get_data_ptr(mem_new); + + // If we realloc, we're guaranteed to be the only reference. + new (_refc_ptr) SafeNumeric(1); + _ptr = _data_ptr; + + return OK; +} + template typename CowData::Size CowData::find(const T &p_val, Size p_from) const { Size ret = -1; @@ -466,11 +499,10 @@ void CowData::_ref(const CowData &p_from) { return; // self assign, do nothing. } - _unref(_ptr); - _ptr = nullptr; + _unref(); // Resets _ptr to nullptr. if (!p_from._ptr) { - return; // nothing to do + return; //nothing to do } if (p_from._get_refcount()->conditional_increment() > 0) { // could reference @@ -479,8 +511,16 @@ void CowData::_ref(const CowData &p_from) { } template -CowData::~CowData() { - _unref(_ptr); +CowData::CowData(std::initializer_list p_init) { + Error err = resize(p_init.size()); + if (err != OK) { + return; + } + + Size i = 0; + for (const T &element : p_init) { + set(i++, element); + } } #if defined(__GNUC__) && !defined(__clang__) @@ -488,5 +528,3 @@ CowData::~CowData() { #endif } // namespace godot - -#endif // GODOT_COWDATA_HPP diff --git a/include/godot_cpp/templates/hash_map.hpp b/include/godot_cpp/templates/hash_map.hpp index 59cd8e0b0..a0a8cadab 100644 --- a/include/godot_cpp/templates/hash_map.hpp +++ b/include/godot_cpp/templates/hash_map.hpp @@ -28,8 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef GODOT_HASH_MAP_HPP -#define GODOT_HASH_MAP_HPP +#pragma once #include #include @@ -62,15 +61,17 @@ struct HashMapElement { data(p_key, p_value) {} }; +bool _hashmap_variant_less_than(const Variant &p_left, const Variant &p_right); + template , typename Allocator = DefaultTypedAllocator>> class HashMap { public: - const uint32_t MIN_CAPACITY_INDEX = 2; // Use a prime. - const float MAX_OCCUPANCY = 0.75; - const uint32_t EMPTY_HASH = 0; + static constexpr uint32_t MIN_CAPACITY_INDEX = 2; // Use a prime. + static constexpr float MAX_OCCUPANCY = 0.75; + static constexpr uint32_t EMPTY_HASH = 0; private: Allocator element_alloc; @@ -92,19 +93,20 @@ class HashMap { return hash; } - _FORCE_INLINE_ uint32_t _get_probe_length(uint32_t p_pos, uint32_t p_hash, uint32_t p_capacity) const { - uint32_t original_pos = p_hash % p_capacity; - return (p_pos - original_pos + p_capacity) % p_capacity; + static _FORCE_INLINE_ uint32_t _get_probe_length(const uint32_t p_pos, const uint32_t p_hash, const uint32_t p_capacity, const uint64_t p_capacity_inv) { + const uint32_t original_pos = fastmod(p_hash, p_capacity_inv, p_capacity); + return fastmod(p_pos - original_pos + p_capacity, p_capacity_inv, p_capacity); } bool _lookup_pos(const TKey &p_key, uint32_t &r_pos) const { - if (elements == nullptr) { + if (elements == nullptr || num_elements == 0) { return false; // Failed lookups, no elements } - uint32_t capacity = hash_table_size_primes[capacity_index]; + const uint32_t capacity = hash_table_size_primes[capacity_index]; + const uint64_t capacity_inv = hash_table_size_primes_inv[capacity_index]; uint32_t hash = _hash(p_key); - uint32_t pos = hash % capacity; + uint32_t pos = fastmod(hash, capacity_inv, capacity); uint32_t distance = 0; while (true) { @@ -112,7 +114,7 @@ class HashMap { return false; } - if (distance > _get_probe_length(pos, hashes[pos], capacity)) { + if (distance > _get_probe_length(pos, hashes[pos], capacity, capacity_inv)) { return false; } @@ -121,17 +123,18 @@ class HashMap { return true; } - pos = (pos + 1) % capacity; + pos = fastmod((pos + 1), capacity_inv, capacity); distance++; } } void _insert_with_hash(uint32_t p_hash, HashMapElement *p_value) { - uint32_t capacity = hash_table_size_primes[capacity_index]; + const uint32_t capacity = hash_table_size_primes[capacity_index]; + const uint64_t capacity_inv = hash_table_size_primes_inv[capacity_index]; uint32_t hash = p_hash; HashMapElement *value = p_value; uint32_t distance = 0; - uint32_t pos = hash % capacity; + uint32_t pos = fastmod(hash, capacity_inv, capacity); while (true) { if (hashes[pos] == EMPTY_HASH) { @@ -144,14 +147,14 @@ class HashMap { } // Not an empty slot, let's check the probing length of the existing one. - uint32_t existing_probe_len = _get_probe_length(pos, hashes[pos], capacity); + uint32_t existing_probe_len = _get_probe_length(pos, hashes[pos], capacity, capacity_inv); if (existing_probe_len < distance) { SWAP(hash, hashes[pos]); SWAP(value, elements[pos]); distance = existing_probe_len; } - pos = (pos + 1) % capacity; + pos = fastmod((pos + 1), capacity_inv, capacity); distance++; } } @@ -251,7 +254,7 @@ class HashMap { } void clear() { - if (elements == nullptr) { + if (elements == nullptr || num_elements == 0) { return; } uint32_t capacity = hash_table_size_primes[capacity_index]; @@ -270,6 +273,47 @@ class HashMap { num_elements = 0; } + void sort() { + if (elements == nullptr || num_elements < 2) { + return; // An empty or single element HashMap is already sorted. + } + // Use insertion sort because we want this operation to be fast for the + // common case where the input is already sorted or nearly sorted. + HashMapElement *inserting = head_element->next; + while (inserting != nullptr) { + HashMapElement *after = nullptr; + for (HashMapElement *current = inserting->prev; current != nullptr; current = current->prev) { + if (_hashmap_variant_less_than(inserting->data.key, current->data.key)) { + after = current; + } else { + break; + } + } + HashMapElement *next = inserting->next; + if (after != nullptr) { + // Modify the elements around `inserting` to remove it from its current position. + inserting->prev->next = next; + if (next == nullptr) { + tail_element = inserting->prev; + } else { + next->prev = inserting->prev; + } + // Modify `before` and `after` to insert `inserting` between them. + HashMapElement *before = after->prev; + if (before == nullptr) { + head_element = inserting; + } else { + before->next = inserting; + } + after->prev = inserting; + // Point `inserting` to its new surroundings. + inserting->prev = before; + inserting->next = after; + } + inserting = next; + } + } + TValue &get(const TKey &p_key) { uint32_t pos = 0; bool exists = _lookup_pos(p_key, pos); @@ -317,13 +361,14 @@ class HashMap { return false; } - uint32_t capacity = hash_table_size_primes[capacity_index]; - uint32_t next_pos = (pos + 1) % capacity; - while (hashes[next_pos] != EMPTY_HASH && _get_probe_length(next_pos, hashes[next_pos], capacity) != 0) { + const uint32_t capacity = hash_table_size_primes[capacity_index]; + const uint64_t capacity_inv = hash_table_size_primes_inv[capacity_index]; + uint32_t next_pos = fastmod((pos + 1), capacity_inv, capacity); + while (hashes[next_pos] != EMPTY_HASH && _get_probe_length(next_pos, hashes[next_pos], capacity, capacity_inv) != 0) { SWAP(hashes[next_pos], hashes[pos]); SWAP(elements[next_pos], elements[pos]); pos = next_pos; - next_pos = (pos + 1) % capacity; + next_pos = fastmod((pos + 1), capacity_inv, capacity); } hashes[pos] = EMPTY_HASH; @@ -351,6 +396,40 @@ class HashMap { return true; } + // Replace the key of an entry in-place, without invalidating iterators or changing the entries position during iteration. + // p_old_key must exist in the map and p_new_key must not, unless it is equal to p_old_key. + bool replace_key(const TKey &p_old_key, const TKey &p_new_key) { + if (p_old_key == p_new_key) { + return true; + } + uint32_t pos = 0; + ERR_FAIL_COND_V(_lookup_pos(p_new_key, pos), false); + ERR_FAIL_COND_V(!_lookup_pos(p_old_key, pos), false); + HashMapElement *element = elements[pos]; + + // Delete the old entries in hashes and elements. + const uint32_t capacity = hash_table_size_primes[capacity_index]; + const uint64_t capacity_inv = hash_table_size_primes_inv[capacity_index]; + uint32_t next_pos = fastmod((pos + 1), capacity_inv, capacity); + while (hashes[next_pos] != EMPTY_HASH && _get_probe_length(next_pos, hashes[next_pos], capacity, capacity_inv) != 0) { + SWAP(hashes[next_pos], hashes[pos]); + SWAP(elements[next_pos], elements[pos]); + pos = next_pos; + next_pos = fastmod((pos + 1), capacity_inv, capacity); + } + hashes[pos] = EMPTY_HASH; + elements[pos] = nullptr; + // _insert_with_hash will increment this again. + num_elements--; + + // Update the HashMapElement with the new key and reinsert it. + const_cast(element->data.key) = p_new_key; + uint32_t hash = _hash(p_new_key); + _insert_with_hash(hash, element); + + return true; + } + // Reserves space for a number of elements, useful to avoid many resizes and rehashes. // If adding a known (possibly large) number of elements at once, must be larger than old capacity. void reserve(uint32_t p_new_capacity) { @@ -561,6 +640,13 @@ class HashMap { capacity_index = MIN_CAPACITY_INDEX; } + HashMap(std::initializer_list> p_init) { + reserve(p_init.size()); + for (const KeyValue &E : p_init) { + insert(E.key, E.value); + } + } + uint32_t debug_get_hash(uint32_t p_index) { if (num_elements == 0) { return 0; @@ -587,5 +673,3 @@ class HashMap { }; } // namespace godot - -#endif // GODOT_HASH_MAP_HPP diff --git a/include/godot_cpp/templates/hash_set.hpp b/include/godot_cpp/templates/hash_set.hpp index 1845a1bb4..a4eb68546 100644 --- a/include/godot_cpp/templates/hash_set.hpp +++ b/include/godot_cpp/templates/hash_set.hpp @@ -28,8 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef GODOT_HASH_SET_HPP -#define GODOT_HASH_SET_HPP +#pragma once #include #include @@ -76,19 +75,20 @@ class HashSet { return hash; } - _FORCE_INLINE_ uint32_t _get_probe_length(uint32_t p_pos, uint32_t p_hash, uint32_t p_capacity) const { - uint32_t original_pos = p_hash % p_capacity; - return (p_pos - original_pos + p_capacity) % p_capacity; + static _FORCE_INLINE_ uint32_t _get_probe_length(const uint32_t p_pos, const uint32_t p_hash, const uint32_t p_capacity, const uint64_t p_capacity_inv) { + const uint32_t original_pos = fastmod(p_hash, p_capacity_inv, p_capacity); + return fastmod(p_pos - original_pos + p_capacity, p_capacity_inv, p_capacity); } bool _lookup_pos(const TKey &p_key, uint32_t &r_pos) const { - if (keys == nullptr) { + if (keys == nullptr || num_elements == 0) { return false; // Failed lookups, no elements } - uint32_t capacity = hash_table_size_primes[capacity_index]; + const uint32_t capacity = hash_table_size_primes[capacity_index]; + const uint64_t capacity_inv = hash_table_size_primes_inv[capacity_index]; uint32_t hash = _hash(p_key); - uint32_t pos = hash % capacity; + uint32_t pos = fastmod(hash, capacity_inv, capacity); uint32_t distance = 0; while (true) { @@ -96,7 +96,7 @@ class HashSet { return false; } - if (distance > _get_probe_length(pos, hashes[pos], capacity)) { + if (distance > _get_probe_length(pos, hashes[pos], capacity, capacity_inv)) { return false; } @@ -105,17 +105,18 @@ class HashSet { return true; } - pos = (pos + 1) % capacity; + pos = fastmod(pos + 1, capacity_inv, capacity); distance++; } } uint32_t _insert_with_hash(uint32_t p_hash, uint32_t p_index) { - uint32_t capacity = hash_table_size_primes[capacity_index]; + const uint32_t capacity = hash_table_size_primes[capacity_index]; + const uint64_t capacity_inv = hash_table_size_primes_inv[capacity_index]; uint32_t hash = p_hash; uint32_t index = p_index; uint32_t distance = 0; - uint32_t pos = hash % capacity; + uint32_t pos = fastmod(hash, capacity_inv, capacity); while (true) { if (hashes[pos] == EMPTY_HASH) { @@ -126,7 +127,7 @@ class HashSet { } // Not an empty slot, let's check the probing length of the existing one. - uint32_t existing_probe_len = _get_probe_length(pos, hashes[pos], capacity); + uint32_t existing_probe_len = _get_probe_length(pos, hashes[pos], capacity, capacity_inv); if (existing_probe_len < distance) { key_to_hash[index] = pos; SWAP(hash, hashes[pos]); @@ -134,7 +135,7 @@ class HashSet { distance = existing_probe_len; } - pos = (pos + 1) % capacity; + pos = fastmod(pos + 1, capacity_inv, capacity); distance++; } } @@ -237,7 +238,7 @@ class HashSet { } void clear() { - if (keys == nullptr) { + if (keys == nullptr || num_elements == 0) { return; } uint32_t capacity = hash_table_size_primes[capacity_index]; @@ -265,11 +266,12 @@ class HashSet { } uint32_t key_pos = pos; - pos = key_to_hash[pos]; // make hash pos + pos = key_to_hash[pos]; //make hash pos - uint32_t capacity = hash_table_size_primes[capacity_index]; - uint32_t next_pos = (pos + 1) % capacity; - while (hashes[next_pos] != EMPTY_HASH && _get_probe_length(next_pos, hashes[next_pos], capacity) != 0) { + const uint32_t capacity = hash_table_size_primes[capacity_index]; + const uint64_t capacity_inv = hash_table_size_primes_inv[capacity_index]; + uint32_t next_pos = fastmod(pos + 1, capacity_inv, capacity); + while (hashes[next_pos] != EMPTY_HASH && _get_probe_length(next_pos, hashes[next_pos], capacity, capacity_inv) != 0) { uint32_t kpos = hash_to_key[pos]; uint32_t kpos_next = hash_to_key[next_pos]; SWAP(key_to_hash[kpos], key_to_hash[kpos_next]); @@ -277,7 +279,7 @@ class HashSet { SWAP(hash_to_key[next_pos], hash_to_key[pos]); pos = next_pos; - next_pos = (pos + 1) % capacity; + next_pos = fastmod(pos + 1, capacity_inv, capacity); } hashes[pos] = EMPTY_HASH; @@ -444,6 +446,13 @@ class HashSet { capacity_index = MIN_CAPACITY_INDEX; } + HashSet(std::initializer_list p_init) { + reserve(p_init.size()); + for (const TKey &E : p_init) { + insert(E); + } + } + void reset() { clear(); @@ -473,5 +482,3 @@ class HashSet { }; } // namespace godot - -#endif // GODOT_HASH_SET_HPP diff --git a/include/godot_cpp/templates/hashfuncs.hpp b/include/godot_cpp/templates/hashfuncs.hpp index 40b10a9e2..566b8c71a 100644 --- a/include/godot_cpp/templates/hashfuncs.hpp +++ b/include/godot_cpp/templates/hashfuncs.hpp @@ -28,8 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef GODOT_HASHFUNCS_HPP -#define GODOT_HASHFUNCS_HPP +#pragma once // Needed for fastmod. #if defined(_MSC_VER) @@ -67,10 +66,11 @@ namespace godot { static _FORCE_INLINE_ uint32_t hash_djb2(const char *p_cstr) { const unsigned char *chr = (const unsigned char *)p_cstr; uint32_t hash = 5381; - uint32_t c; + uint32_t c = *chr++; - while ((c = *chr++)) { + while (c) { hash = ((hash << 5) + hash) ^ c; /* hash * 33 ^ c */ + c = *chr++; } return hash; @@ -108,6 +108,16 @@ static _FORCE_INLINE_ uint32_t hash_one_uint64(const uint64_t p_int) { return uint32_t(v); } +static _FORCE_INLINE_ uint64_t hash64_murmur3_64(uint64_t key, uint64_t seed) { + key ^= seed; + key ^= key >> 33; + key *= 0xff51afd7ed558ccd; + key ^= key >> 33; + key *= 0xc4ceb9fe1a85ec53; + key ^= key >> 33; + return key; +} + #define HASH_MURMUR3_SEED 0x7F07C65 // Murmurhash3 32-bit version. // All MurmurHash versions are public domain software, and the author disclaims all copyright to their code. @@ -228,7 +238,7 @@ static _FORCE_INLINE_ uint32_t hash_murmur3_buffer(const void *key, int length, k1 = hash_rotl32(k1, 15); k1 *= c2; h1 ^= k1; - } + }; // Finalize with additional bit mixing. h1 ^= length; @@ -311,40 +321,41 @@ struct HashMapHasherDefault { static _FORCE_INLINE_ uint32_t hash(const String &p_string) { return p_string.hash(); } static _FORCE_INLINE_ uint32_t hash(const char *p_cstr) { return hash_djb2(p_cstr); } - static _FORCE_INLINE_ uint32_t hash(const wchar_t p_wchar) { return hash_fmix32(p_wchar); } - static _FORCE_INLINE_ uint32_t hash(const char16_t p_uchar) { return hash_fmix32(p_uchar); } - static _FORCE_INLINE_ uint32_t hash(const char32_t p_uchar) { return hash_fmix32(p_uchar); } + static _FORCE_INLINE_ uint32_t hash(const wchar_t p_wchar) { return hash_fmix32(uint32_t(p_wchar)); } + static _FORCE_INLINE_ uint32_t hash(const char16_t p_uchar) { return hash_fmix32(uint32_t(p_uchar)); } + static _FORCE_INLINE_ uint32_t hash(const char32_t p_uchar) { return hash_fmix32(uint32_t(p_uchar)); } static _FORCE_INLINE_ uint32_t hash(const RID &p_rid) { return hash_one_uint64(p_rid.get_id()); } + static _FORCE_INLINE_ uint32_t hash(const CharString &p_char_string) { return hash_djb2(p_char_string.get_data()); } static _FORCE_INLINE_ uint32_t hash(const StringName &p_string_name) { return p_string_name.hash(); } static _FORCE_INLINE_ uint32_t hash(const NodePath &p_path) { return p_path.hash(); } static _FORCE_INLINE_ uint32_t hash(const ObjectID &p_id) { return hash_one_uint64(p_id); } static _FORCE_INLINE_ uint32_t hash(const uint64_t p_int) { return hash_one_uint64(p_int); } - static _FORCE_INLINE_ uint32_t hash(const int64_t p_int) { return hash_one_uint64(p_int); } + static _FORCE_INLINE_ uint32_t hash(const int64_t p_int) { return hash_one_uint64(uint64_t(p_int)); } static _FORCE_INLINE_ uint32_t hash(const float p_float) { return hash_murmur3_one_float(p_float); } static _FORCE_INLINE_ uint32_t hash(const double p_double) { return hash_murmur3_one_double(p_double); } static _FORCE_INLINE_ uint32_t hash(const uint32_t p_int) { return hash_fmix32(p_int); } - static _FORCE_INLINE_ uint32_t hash(const int32_t p_int) { return hash_fmix32(p_int); } - static _FORCE_INLINE_ uint32_t hash(const uint16_t p_int) { return hash_fmix32(p_int); } - static _FORCE_INLINE_ uint32_t hash(const int16_t p_int) { return hash_fmix32(p_int); } - static _FORCE_INLINE_ uint32_t hash(const uint8_t p_int) { return hash_fmix32(p_int); } - static _FORCE_INLINE_ uint32_t hash(const int8_t p_int) { return hash_fmix32(p_int); } + static _FORCE_INLINE_ uint32_t hash(const int32_t p_int) { return hash_fmix32(uint32_t(p_int)); } + static _FORCE_INLINE_ uint32_t hash(const uint16_t p_int) { return hash_fmix32(uint32_t(p_int)); } + static _FORCE_INLINE_ uint32_t hash(const int16_t p_int) { return hash_fmix32(uint32_t(p_int)); } + static _FORCE_INLINE_ uint32_t hash(const uint8_t p_int) { return hash_fmix32(uint32_t(p_int)); } + static _FORCE_INLINE_ uint32_t hash(const int8_t p_int) { return hash_fmix32(uint32_t(p_int)); } static _FORCE_INLINE_ uint32_t hash(const Vector2i &p_vec) { - uint32_t h = hash_murmur3_one_32(p_vec.x); - h = hash_murmur3_one_32(p_vec.y, h); + uint32_t h = hash_murmur3_one_32(uint32_t(p_vec.x)); + h = hash_murmur3_one_32(uint32_t(p_vec.y), h); return hash_fmix32(h); } static _FORCE_INLINE_ uint32_t hash(const Vector3i &p_vec) { - uint32_t h = hash_murmur3_one_32(p_vec.x); - h = hash_murmur3_one_32(p_vec.y, h); - h = hash_murmur3_one_32(p_vec.z, h); + uint32_t h = hash_murmur3_one_32(uint32_t(p_vec.x)); + h = hash_murmur3_one_32(uint32_t(p_vec.y), h); + h = hash_murmur3_one_32(uint32_t(p_vec.z), h); return hash_fmix32(h); } static _FORCE_INLINE_ uint32_t hash(const Vector4i &p_vec) { - uint32_t h = hash_murmur3_one_32(p_vec.x); - h = hash_murmur3_one_32(p_vec.y, h); - h = hash_murmur3_one_32(p_vec.z, h); - h = hash_murmur3_one_32(p_vec.w, h); + uint32_t h = hash_murmur3_one_32(uint32_t(p_vec.x)); + h = hash_murmur3_one_32(uint32_t(p_vec.y), h); + h = hash_murmur3_one_32(uint32_t(p_vec.z), h); + h = hash_murmur3_one_32(uint32_t(p_vec.w), h); return hash_fmix32(h); } static _FORCE_INLINE_ uint32_t hash(const Vector2 &p_vec) { @@ -366,10 +377,10 @@ struct HashMapHasherDefault { return hash_fmix32(h); } static _FORCE_INLINE_ uint32_t hash(const Rect2i &p_rect) { - uint32_t h = hash_murmur3_one_32(p_rect.position.x); - h = hash_murmur3_one_32(p_rect.position.y, h); - h = hash_murmur3_one_32(p_rect.size.x, h); - h = hash_murmur3_one_32(p_rect.size.y, h); + uint32_t h = hash_murmur3_one_32(uint32_t(p_rect.position.x)); + h = hash_murmur3_one_32(uint32_t(p_rect.position.y), h); + h = hash_murmur3_one_32(uint32_t(p_rect.size.x), h); + h = hash_murmur3_one_32(uint32_t(p_rect.size.y), h); return hash_fmix32(h); } static _FORCE_INLINE_ uint32_t hash(const Rect2 &p_rect) { @@ -390,6 +401,19 @@ struct HashMapHasherDefault { } }; +struct HashHasher { + static _FORCE_INLINE_ uint32_t hash(const int32_t hash) { return hash; } + static _FORCE_INLINE_ uint32_t hash(const uint32_t hash) { return hash; } + static _FORCE_INLINE_ uint64_t hash(const int64_t hash) { return hash; } + static _FORCE_INLINE_ uint64_t hash(const uint64_t hash) { return hash; } +}; + +// TODO: Fold this into HashMapHasherDefault once C++20 concepts are allowed +template +struct HashableHasher { + static _FORCE_INLINE_ uint32_t hash(const T &hashable) { return hashable.hash(); } +}; + template struct HashMapComparatorDefault { static bool compare(const T &p_lhs, const T &p_rhs) { @@ -411,6 +435,13 @@ struct HashMapComparatorDefault { } }; +template <> +struct HashMapComparatorDefault { + static bool compare(const Color &p_lhs, const Color &p_rhs) { + return ((p_lhs.r == p_rhs.r) || (Math::is_nan(p_lhs.r) && Math::is_nan(p_rhs.r))) && ((p_lhs.g == p_rhs.g) || (Math::is_nan(p_lhs.g) && Math::is_nan(p_rhs.g))) && ((p_lhs.b == p_rhs.b) || (Math::is_nan(p_lhs.b) && Math::is_nan(p_rhs.b))) && ((p_lhs.a == p_rhs.a) || (Math::is_nan(p_lhs.a) && Math::is_nan(p_rhs.a))); + } +}; + template <> struct HashMapComparatorDefault { static bool compare(const Vector2 &p_lhs, const Vector2 &p_rhs) { @@ -425,9 +456,90 @@ struct HashMapComparatorDefault { } }; +template <> +struct HashMapComparatorDefault { + static bool compare(const Vector4 &p_lhs, const Vector4 &p_rhs) { + return ((p_lhs.x == p_rhs.x) || (Math::is_nan(p_lhs.x) && Math::is_nan(p_rhs.x))) && ((p_lhs.y == p_rhs.y) || (Math::is_nan(p_lhs.y) && Math::is_nan(p_rhs.y))) && ((p_lhs.z == p_rhs.z) || (Math::is_nan(p_lhs.z) && Math::is_nan(p_rhs.z))) && ((p_lhs.w == p_rhs.w) || (Math::is_nan(p_lhs.w) && Math::is_nan(p_rhs.w))); + } +}; + +template <> +struct HashMapComparatorDefault { + static bool compare(const Rect2 &p_lhs, const Rect2 &p_rhs) { + return HashMapComparatorDefault().compare(p_lhs.position, p_rhs.position) && HashMapComparatorDefault().compare(p_lhs.size, p_rhs.size); + } +}; + +template <> +struct HashMapComparatorDefault { + static bool compare(const AABB &p_lhs, const AABB &p_rhs) { + return HashMapComparatorDefault().compare(p_lhs.position, p_rhs.position) && HashMapComparatorDefault().compare(p_lhs.size, p_rhs.size); + } +}; + +template <> +struct HashMapComparatorDefault { + static bool compare(const Plane &p_lhs, const Plane &p_rhs) { + return HashMapComparatorDefault().compare(p_lhs.normal, p_rhs.normal) && ((p_lhs.d == p_rhs.d) || (Math::is_nan(p_lhs.d) && Math::is_nan(p_rhs.d))); + } +}; + +template <> +struct HashMapComparatorDefault { + static bool compare(const Transform2D &p_lhs, const Transform2D &p_rhs) { + for (int i = 0; i < 3; ++i) { + if (!HashMapComparatorDefault().compare(p_lhs.columns[i], p_rhs.columns[i])) { + return false; + } + } + + return true; + } +}; + +template <> +struct HashMapComparatorDefault { + static bool compare(const Basis &p_lhs, const Basis &p_rhs) { + for (int i = 0; i < 3; ++i) { + if (!HashMapComparatorDefault().compare(p_lhs.rows[i], p_rhs.rows[i])) { + return false; + } + } + + return true; + } +}; + +template <> +struct HashMapComparatorDefault { + static bool compare(const Transform3D &p_lhs, const Transform3D &p_rhs) { + return HashMapComparatorDefault().compare(p_lhs.basis, p_rhs.basis) && HashMapComparatorDefault().compare(p_lhs.origin, p_rhs.origin); + } +}; + +template <> +struct HashMapComparatorDefault { + static bool compare(const Projection &p_lhs, const Projection &p_rhs) { + for (int i = 0; i < 4; ++i) { + if (!HashMapComparatorDefault().compare(p_lhs.columns[i], p_rhs.columns[i])) { + return false; + } + } + + return true; + } +}; + +template <> +struct HashMapComparatorDefault { + static bool compare(const Quaternion &p_lhs, const Quaternion &p_rhs) { + return ((p_lhs.x == p_rhs.x) || (Math::is_nan(p_lhs.x) && Math::is_nan(p_rhs.x))) && ((p_lhs.y == p_rhs.y) || (Math::is_nan(p_lhs.y) && Math::is_nan(p_rhs.y))) && ((p_lhs.z == p_rhs.z) || (Math::is_nan(p_lhs.z) && Math::is_nan(p_rhs.z))) && ((p_lhs.w == p_rhs.w) || (Math::is_nan(p_lhs.w) && Math::is_nan(p_rhs.w))); + } +}; + constexpr uint32_t HASH_TABLE_SIZE_MAX = 29; -const uint32_t hash_table_size_primes[HASH_TABLE_SIZE_MAX] = { +inline constexpr uint32_t hash_table_size_primes[HASH_TABLE_SIZE_MAX] = { 5, 13, 23, @@ -460,7 +572,7 @@ const uint32_t hash_table_size_primes[HASH_TABLE_SIZE_MAX] = { }; // Computed with elem_i = UINT64_C (0 x FFFFFFFF FFFFFFFF ) / d_i + 1, where d_i is the i-th element of the above array. -const uint64_t hash_table_size_primes_inv[HASH_TABLE_SIZE_MAX] = { +inline constexpr uint64_t hash_table_size_primes_inv[HASH_TABLE_SIZE_MAX] = { 3689348814741910324, 1418980313362273202, 802032351030850071, @@ -522,5 +634,3 @@ static _FORCE_INLINE_ uint32_t fastmod(const uint32_t n, const uint64_t c, const } } // namespace godot - -#endif // GODOT_HASHFUNCS_HPP diff --git a/include/godot_cpp/templates/list.hpp b/include/godot_cpp/templates/list.hpp index fa5960565..9291f5e40 100644 --- a/include/godot_cpp/templates/list.hpp +++ b/include/godot_cpp/templates/list.hpp @@ -28,13 +28,14 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef GODOT_LIST_HPP -#define GODOT_LIST_HPP +#pragma once #include #include #include +#include + /** * Generic Templatized Linked List Implementation. * The implementation differs from the STL one because @@ -134,6 +135,8 @@ class List { data->erase(this); } + void transfer_to_back(List *p_dst_list); + _FORCE_INLINE_ Element() {} }; @@ -224,7 +227,7 @@ class List { Element *last = nullptr; int size_cache = 0; - bool erase(const Element *p_I) { + bool erase(Element *p_I) { ERR_FAIL_NULL_V(p_I, false); ERR_FAIL_COND_V(p_I->data != this, false); @@ -244,7 +247,7 @@ class List { p_I->next_ptr->prev_ptr = p_I->prev_ptr; } - memdelete_allocator(const_cast(p_I)); + memdelete_allocator(p_I); size_cache--; return true; @@ -430,7 +433,7 @@ class List { /** * erase an element in the list, by iterator pointing to it. Return true if it was found/erased. */ - bool erase(const Element *p_I) { + bool erase(Element *p_I) { if (_data && p_I) { bool ret = _data->erase(p_I); @@ -522,10 +525,14 @@ class List { it = it->next(); } } + void operator=(List &&p_list) { + if (unlikely(this == &p_list)) { + return; + } - // Index operator, kept for compatibility. - _FORCE_INLINE_ T &operator[](int p_index) { - return get(p_index); + clear(); + _data = p_list._data; + p_list._data = nullptr; } // Random access to elements, use with care, @@ -543,11 +550,6 @@ class List { return I->get(); } - // Index operator, kept for compatibility. - _FORCE_INLINE_ const T &operator[](int p_index) const { - return get(p_index); - } - // Random access to elements, use with care, // do not use for iteration. const T &get(int p_index) const { @@ -721,8 +723,8 @@ class List { template void sort_custom() { - // this version uses auxiliary memory for speed. - // if you don't want to use auxiliary memory, use the in_place version + //this version uses auxiliary memory for speed. + //if you don't want to use auxiliary memory, use the in_place version int s = size(); if (s < 2) { @@ -770,9 +772,19 @@ class List { it = it->next(); } } + List(List &&p_list) { + _data = p_list._data; + p_list._data = nullptr; + } List() {} + List(std::initializer_list p_init) { + for (const T &E : p_init) { + push_back(E); + } + } + ~List() { clear(); if (_data) { @@ -782,6 +794,41 @@ class List { } }; -} // namespace godot +template +void List::Element::transfer_to_back(List *p_dst_list) { + // Detach from current. + + if (data->first == this) { + data->first = data->first->next_ptr; + } + if (data->last == this) { + data->last = data->last->prev_ptr; + } + if (prev_ptr) { + prev_ptr->next_ptr = next_ptr; + } + if (next_ptr) { + next_ptr->prev_ptr = prev_ptr; + } + data->size_cache--; -#endif // GODOT_LIST_HPP + // Attach to the back of the new one. + + if (!p_dst_list->_data) { + p_dst_list->_data = memnew_allocator(_Data, A); + p_dst_list->_data->first = this; + p_dst_list->_data->last = nullptr; + p_dst_list->_data->size_cache = 0; + prev_ptr = nullptr; + } else { + p_dst_list->_data->last->next_ptr = this; + prev_ptr = p_dst_list->_data->last; + } + p_dst_list->_data->last = this; + next_ptr = nullptr; + + data = p_dst_list->_data; + p_dst_list->_data->size_cache++; +} + +} // namespace godot diff --git a/include/godot_cpp/templates/local_vector.hpp b/include/godot_cpp/templates/local_vector.hpp index c5481e48a..0ef322fba 100644 --- a/include/godot_cpp/templates/local_vector.hpp +++ b/include/godot_cpp/templates/local_vector.hpp @@ -28,8 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef GODOT_LOCAL_VECTOR_HPP -#define GODOT_LOCAL_VECTOR_HPP +#pragma once #include #include @@ -59,21 +58,18 @@ class LocalVector { return data; } + // Must take a copy instead of a reference (see GH-31736). _FORCE_INLINE_ void push_back(T p_elem) { if (unlikely(count == capacity)) { - if (capacity == 0) { - capacity = 1; - } else { - capacity <<= 1; - } + capacity = tight ? (capacity + 1) : MAX((U)1, capacity << 1); data = (T *)memrealloc(data, capacity * sizeof(T)); CRASH_COND_MSG(!data, "Out of memory"); } - if constexpr (!std::is_trivially_constructible::value && !force_trivial) { + if constexpr (!std::is_trivially_constructible_v && !force_trivial) { memnew_placement(&data[count++], T(p_elem)); } else { - data[count++] = p_elem; + data[count++] = std::move(p_elem); } } @@ -81,31 +77,49 @@ class LocalVector { ERR_FAIL_UNSIGNED_INDEX(p_index, count); count--; for (U i = p_index; i < count; i++) { - data[i] = data[i + 1]; + data[i] = std::move(data[i + 1]); } - if constexpr (!std::is_trivially_destructible::value && !force_trivial) { + if constexpr (!std::is_trivially_destructible_v && !force_trivial) { data[count].~T(); } } /// Removes the item copying the last value into the position of the one to - /// remove. It's generally faster than `remove`. + /// remove. It's generally faster than `remove_at`. void remove_at_unordered(U p_index) { ERR_FAIL_INDEX(p_index, count); count--; if (count > p_index) { - data[p_index] = data[count]; + data[p_index] = std::move(data[count]); } - if constexpr (!std::is_trivially_destructible::value && !force_trivial) { + if constexpr (!std::is_trivially_destructible_v && !force_trivial) { data[count].~T(); } } - void erase(const T &p_val) { + _FORCE_INLINE_ bool erase(const T &p_val) { int64_t idx = find(p_val); if (idx >= 0) { remove_at(idx); + return true; + } + return false; + } + + U erase_multiple_unordered(const T &p_val) { + U from = 0; + U occurrences = 0; + while (true) { + int64_t idx = find(p_val, from); + + if (idx == -1) { + break; + } + remove_at_unordered(idx); + from = idx; + occurrences++; } + return occurrences; } void invert() { @@ -137,7 +151,7 @@ class LocalVector { _FORCE_INLINE_ U size() const { return count; } void resize(U p_size) { if (p_size < count) { - if constexpr (!std::is_trivially_destructible::value && !force_trivial) { + if constexpr (!std::is_trivially_destructible_v && !force_trivial) { for (U i = p_size; i < count; i++) { data[i].~T(); } @@ -145,16 +159,11 @@ class LocalVector { count = p_size; } else if (p_size > count) { if (unlikely(p_size > capacity)) { - if (capacity == 0) { - capacity = 1; - } - while (capacity < p_size) { - capacity <<= 1; - } + capacity = tight ? p_size : nearest_power_of_2_templated(p_size); data = (T *)memrealloc(data, capacity * sizeof(T)); CRASH_COND_MSG(!data, "Out of memory"); } - if constexpr (!std::is_trivially_constructible::value && !force_trivial) { + if constexpr (!std::is_trivially_constructible_v && !force_trivial) { for (U i = count; i < p_size; i++) { memnew_placement(&data[i], T); } @@ -238,13 +247,13 @@ class LocalVector { void insert(U p_pos, T p_val) { ERR_FAIL_UNSIGNED_INDEX(p_pos, count + 1); if (p_pos == count) { - push_back(p_val); + push_back(std::move(p_val)); } else { resize(count + 1); for (U i = count - 1; i > p_pos; i--) { - data[i] = data[i - 1]; + data[i] = std::move(data[i - 1]); } - data[p_pos] = p_val; + data[p_pos] = std::move(p_val); } } @@ -288,9 +297,17 @@ class LocalVector { operator Vector() const { Vector ret; - ret.resize(size()); + ret.resize(count); T *w = ret.ptrw(); - memcpy(w, data, sizeof(T) * count); + if (w) { + if constexpr (std::is_trivially_copyable_v) { + memcpy(w, data, sizeof(T) * count); + } else { + for (U i = 0; i < count; i++) { + w[i] = data[i]; + } + } + } return ret; } @@ -298,7 +315,9 @@ class LocalVector { Vector ret; ret.resize(count * sizeof(T)); uint8_t *w = ret.ptrw(); - memcpy(w, data, sizeof(T) * count); + if (w) { + memcpy(w, data, sizeof(T) * count); + } return ret; } @@ -315,6 +334,16 @@ class LocalVector { data[i] = p_from.data[i]; } } + _FORCE_INLINE_ LocalVector(LocalVector &&p_from) { + data = p_from.data; + count = p_from.count; + capacity = p_from.capacity; + + p_from.data = nullptr; + p_from.count = 0; + p_from.capacity = 0; + } + inline void operator=(const LocalVector &p_from) { resize(p_from.size()); for (U i = 0; i < p_from.count; i++) { @@ -327,6 +356,26 @@ class LocalVector { data[i] = p_from[i]; } } + inline void operator=(LocalVector &&p_from) { + if (unlikely(this == &p_from)) { + return; + } + reset(); + + data = p_from.data; + count = p_from.count; + capacity = p_from.capacity; + + p_from.data = nullptr; + p_from.count = 0; + p_from.capacity = 0; + } + inline void operator=(Vector &&p_from) { + resize(p_from.size()); + for (U i = 0; i < count; i++) { + data[i] = std::move(p_from[i]); + } + } _FORCE_INLINE_ ~LocalVector() { if (data) { @@ -339,5 +388,3 @@ template using TightLocalVector = LocalVector; } // namespace godot - -#endif // GODOT_LOCAL_VECTOR_HPP diff --git a/include/godot_cpp/templates/pair.hpp b/include/godot_cpp/templates/pair.hpp index f87541305..15c7c3567 100644 --- a/include/godot_cpp/templates/pair.hpp +++ b/include/godot_cpp/templates/pair.hpp @@ -28,8 +28,9 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef GODOT_PAIR_HPP -#define GODOT_PAIR_HPP +#pragma once + +#include namespace godot { @@ -69,6 +70,15 @@ struct PairSort { } }; +template +struct PairHash { + static uint32_t hash(const Pair &P) { + uint64_t h1 = HashMapHasherDefault::hash(P.first); + uint64_t h2 = HashMapHasherDefault::hash(P.second); + return hash_one_uint64((h1 << 32) | h2); + } +}; + template struct KeyValue { const K key; @@ -103,5 +113,3 @@ struct KeyValueSort { }; } // namespace godot - -#endif // GODOT_PAIR_HPP diff --git a/include/godot_cpp/templates/rb_map.hpp b/include/godot_cpp/templates/rb_map.hpp index 6ab71fd7e..c0dc4bf33 100644 --- a/include/godot_cpp/templates/rb_map.hpp +++ b/include/godot_cpp/templates/rb_map.hpp @@ -28,13 +28,14 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef GODOT_RB_MAP_HPP -#define GODOT_RB_MAP_HPP +#pragma once #include #include #include +#include + namespace godot { // based on the very nice implementation of rb-trees by: @@ -98,6 +99,8 @@ class RBMap { typedef KeyValue ValueType; struct Iterator { + friend class RBMap; + _FORCE_INLINE_ KeyValue &operator*() const { return E->key_value(); } @@ -111,11 +114,16 @@ class RBMap { return *this; } - _FORCE_INLINE_ bool operator==(const Iterator &b) const { return E == b.E; } - _FORCE_INLINE_ bool operator!=(const Iterator &b) const { return E != b.E; } + _FORCE_INLINE_ bool operator==(const Iterator &p_it) const { return E == p_it.E; } + _FORCE_INLINE_ bool operator!=(const Iterator &p_it) const { return E != p_it.E; } explicit operator bool() const { return E != nullptr; } + + Iterator &operator=(const Iterator &p_it) { + E = p_it.E; + return *this; + } Iterator(Element *p_E) { E = p_E; } Iterator() {} Iterator(const Iterator &p_it) { E = p_it.E; } @@ -138,11 +146,16 @@ class RBMap { return *this; } - _FORCE_INLINE_ bool operator==(const ConstIterator &b) const { return E == b.E; } - _FORCE_INLINE_ bool operator!=(const ConstIterator &b) const { return E != b.E; } + _FORCE_INLINE_ bool operator==(const ConstIterator &p_it) const { return E == p_it.E; } + _FORCE_INLINE_ bool operator!=(const ConstIterator &p_it) const { return E != p_it.E; } explicit operator bool() const { return E != nullptr; } + + ConstIterator &operator=(const ConstIterator &p_it) { + E = p_it.E; + return *this; + } ConstIterator(const Element *p_E) { E = p_E; } ConstIterator() {} ConstIterator(const ConstIterator &p_it) { E = p_it.E; } @@ -419,7 +432,7 @@ class RBMap { new_node->right = _data._nil; new_node->left = _data._nil; - // new_node->data=_data; + //new_node->data=_data; if (new_parent == _data._root || less(p_key, new_parent->_data.key)) { new_parent->left = new_node; @@ -753,6 +766,12 @@ class RBMap { _copy_from(p_map); } + RBMap(std::initializer_list> p_init) { + for (const KeyValue &E : p_init) { + insert(E.key, E.value); + } + } + _FORCE_INLINE_ RBMap() {} ~RBMap() { @@ -761,5 +780,3 @@ class RBMap { }; } // namespace godot - -#endif // GODOT_RB_MAP_HPP diff --git a/include/godot_cpp/templates/rb_set.hpp b/include/godot_cpp/templates/rb_set.hpp index 69aa8d7f9..612be9115 100644 --- a/include/godot_cpp/templates/rb_set.hpp +++ b/include/godot_cpp/templates/rb_set.hpp @@ -28,11 +28,12 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef GODOT_RB_SET_HPP -#define GODOT_RB_SET_HPP +#pragma once #include +#include + // based on the very nice implementation of rb-trees by: // https://web.archive.org/web/20120507164830/https://web.mit.edu/~emin/www/source_code/red_black_tree/index.html @@ -399,7 +400,7 @@ class RBSet { new_node->right = _data._nil; new_node->left = _data._nil; new_node->value = p_value; - // new_node->data=_data; + //new_node->data=_data; if (new_parent == _data._root || less(p_value, new_parent->value)) { new_parent->left = new_node; @@ -702,6 +703,12 @@ class RBSet { _copy_from(p_set); } + RBSet(std::initializer_list p_init) { + for (const T &E : p_init) { + insert(E); + } + } + _FORCE_INLINE_ RBSet() {} ~RBSet() { @@ -710,5 +717,3 @@ class RBSet { }; } // namespace godot - -#endif // GODOT_RB_SET_HPP diff --git a/include/godot_cpp/templates/rid_owner.hpp b/include/godot_cpp/templates/rid_owner.hpp index 1dd4a3933..6d27d4023 100644 --- a/include/godot_cpp/templates/rid_owner.hpp +++ b/include/godot_cpp/templates/rid_owner.hpp @@ -28,8 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef GODOT_RID_OWNER_HPP -#define GODOT_RID_OWNER_HPP +#pragma once #include #include @@ -461,5 +460,3 @@ class RID_Owner { }; } // namespace godot - -#endif // GODOT_RID_OWNER_HPP diff --git a/include/godot_cpp/templates/safe_refcount.hpp b/include/godot_cpp/templates/safe_refcount.hpp index 98cb04b20..42cdb2444 100644 --- a/include/godot_cpp/templates/safe_refcount.hpp +++ b/include/godot_cpp/templates/safe_refcount.hpp @@ -28,8 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef GODOT_SAFE_REFCOUNT_HPP -#define GODOT_SAFE_REFCOUNT_HPP +#pragma once #if !defined(NO_THREADS) @@ -52,7 +51,7 @@ namespace godot { #define SAFE_NUMERIC_TYPE_PUN_GUARANTEES(m_type) \ static_assert(sizeof(SafeNumeric) == sizeof(m_type)); \ static_assert(alignof(SafeNumeric) == alignof(m_type)); \ - static_assert(std::is_trivially_destructible>::value); + static_assert(std::is_trivially_destructible_v>); #define SAFE_FLAG_TYPE_PUN_GUARANTEES \ static_assert(sizeof(SafeFlag) == sizeof(bool)); \ static_assert(alignof(SafeFlag) == alignof(bool)); @@ -103,6 +102,17 @@ class SafeNumeric { return value.fetch_sub(p_value, std::memory_order_acq_rel) - p_value; } + _ALWAYS_INLINE_ T bit_or(T p_value) { + return value.fetch_or(p_value, std::memory_order_acq_rel); + } + _ALWAYS_INLINE_ T bit_and(T p_value) { + return value.fetch_and(p_value, std::memory_order_acq_rel); + } + + _ALWAYS_INLINE_ T bit_xor(T p_value) { + return value.fetch_xor(p_value, std::memory_order_acq_rel); + } + // Returns the original value instead of the new one _ALWAYS_INLINE_ T postsub(T p_value) { return value.fetch_sub(p_value, std::memory_order_acq_rel); @@ -114,7 +124,8 @@ class SafeNumeric { if (tmp >= p_value) { return tmp; // already greater, or equal } - if (value.compare_exchange_weak(tmp, p_value, std::memory_order_release)) { + + if (value.compare_exchange_weak(tmp, p_value, std::memory_order_acq_rel)) { return p_value; } } @@ -126,7 +137,7 @@ class SafeNumeric { if (c == 0) { return 0; } - if (value.compare_exchange_weak(c, c + 1, std::memory_order_release)) { + if (value.compare_exchange_weak(c, c + 1, std::memory_order_acq_rel)) { return c + 1; } } @@ -167,6 +178,16 @@ class SafeFlag { class SafeRefCount { SafeNumeric count; +#ifdef DEV_ENABLED + _ALWAYS_INLINE_ void _check_unref_safety() { + // This won't catch every misuse, but it's better than nothing. + CRASH_COND_MSG(count.get() == 0, + "Trying to unreference a SafeRefCount which is already zero is wrong and a symptom of it being misused.\n" + "Upon a SafeRefCount reaching zero any object whose lifetime is tied to it, as well as the ref count itself, must be destroyed.\n" + "Moreover, to guarantee that, no multiple threads should be racing to do the final unreferencing to zero."); + } +#endif + public: _ALWAYS_INLINE_ bool ref() { // true on success return count.conditional_increment() != 0; @@ -177,10 +198,16 @@ class SafeRefCount { } _ALWAYS_INLINE_ bool unref() { // true if must be disposed of +#ifdef DEV_ENABLED + _check_unref_safety(); +#endif return count.decrement() == 0; } _ALWAYS_INLINE_ uint32_t unrefval() { // 0 if must be disposed of +#ifdef DEV_ENABLED + _check_unref_safety(); +#endif return count.decrement(); } @@ -193,143 +220,6 @@ class SafeRefCount { } }; -#else - -template -class SafeNumeric { -protected: - T value; - -public: - _ALWAYS_INLINE_ void set(T p_value) { - value = p_value; - } - - _ALWAYS_INLINE_ T get() const { - return value; - } - - _ALWAYS_INLINE_ T increment() { - return ++value; - } - - _ALWAYS_INLINE_ T postincrement() { - return value++; - } - - _ALWAYS_INLINE_ T decrement() { - return --value; - } - - _ALWAYS_INLINE_ T postdecrement() { - return value--; - } - - _ALWAYS_INLINE_ T add(T p_value) { - return value += p_value; - } - - _ALWAYS_INLINE_ T postadd(T p_value) { - T old = value; - value += p_value; - return old; - } - - _ALWAYS_INLINE_ T sub(T p_value) { - return value -= p_value; - } - - _ALWAYS_INLINE_ T postsub(T p_value) { - T old = value; - value -= p_value; - return old; - } - - _ALWAYS_INLINE_ T exchange_if_greater(T p_value) { - if (value < p_value) { - value = p_value; - } - return value; - } - - _ALWAYS_INLINE_ T conditional_increment() { - if (value == 0) { - return 0; - } else { - return ++value; - } - } - - _ALWAYS_INLINE_ explicit SafeNumeric(T p_value = static_cast(0)) : - value(p_value) { - } -}; - -class SafeFlag { -protected: - bool flag; - -public: - _ALWAYS_INLINE_ bool is_set() const { - return flag; - } - - _ALWAYS_INLINE_ void set() { - flag = true; - } - - _ALWAYS_INLINE_ void clear() { - flag = false; - } - - _ALWAYS_INLINE_ void set_to(bool p_value) { - flag = p_value; - } - - _ALWAYS_INLINE_ explicit SafeFlag(bool p_value = false) : - flag(p_value) {} -}; - -class SafeRefCount { - uint32_t count = 0; - -public: - _ALWAYS_INLINE_ bool ref() { // true on success - if (count != 0) { - ++count; - return true; - } else { - return false; - } - } - - _ALWAYS_INLINE_ uint32_t refval() { // none-zero on success - if (count != 0) { - return ++count; - } else { - return 0; - } - } - - _ALWAYS_INLINE_ bool unref() { // true if must be disposed of - return --count == 0; - } - - _ALWAYS_INLINE_ uint32_t unrefval() { // 0 if must be disposed of - return --count; - } - - _ALWAYS_INLINE_ uint32_t get() const { - return count; - } - - _ALWAYS_INLINE_ void init(uint32_t p_value = 1) { - count = p_value; - } -}; - -#endif - } // namespace godot -#endif // GODOT_SAFE_REFCOUNT_HPP +#endif // !defined(NO_THREADS) diff --git a/include/godot_cpp/templates/search_array.hpp b/include/godot_cpp/templates/search_array.hpp index 11a9db525..27a5c9d07 100644 --- a/include/godot_cpp/templates/search_array.hpp +++ b/include/godot_cpp/templates/search_array.hpp @@ -28,8 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef GODOT_SEARCH_ARRAY_HPP -#define GODOT_SEARCH_ARRAY_HPP +#pragma once #include @@ -40,12 +39,12 @@ class SearchArray { public: Comparator compare; - inline int bisect(const T *p_array, int p_len, const T &p_value, bool p_before) const { - int lo = 0; - int hi = p_len; + inline int64_t bisect(const T *p_array, int64_t p_len, const T &p_value, bool p_before) const { + int64_t lo = 0; + int64_t hi = p_len; if (p_before) { while (lo < hi) { - const int mid = (lo + hi) / 2; + const int64_t mid = (lo + hi) / 2; if (compare(p_array[mid], p_value)) { lo = mid + 1; } else { @@ -54,7 +53,7 @@ class SearchArray { } } else { while (lo < hi) { - const int mid = (lo + hi) / 2; + const int64_t mid = (lo + hi) / 2; if (compare(p_value, p_array[mid])) { hi = mid; } else { @@ -67,5 +66,3 @@ class SearchArray { }; } // namespace godot - -#endif // GODOT_SEARCH_ARRAY_HPP diff --git a/include/godot_cpp/templates/self_list.hpp b/include/godot_cpp/templates/self_list.hpp index f7a65f689..4b4e3942d 100644 --- a/include/godot_cpp/templates/self_list.hpp +++ b/include/godot_cpp/templates/self_list.hpp @@ -28,8 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef GODOT_SELF_LIST_HPP -#define GODOT_SELF_LIST_HPP +#pragma once #include #include @@ -101,11 +100,74 @@ class SelfList { p_elem->_root = nullptr; } + void clear() { + while (_first) { + remove(_first); + } + } + + void sort() { + sort_custom>(); + } + + template + void sort_custom() { + if (_first == _last) { + return; + } + + SelfList *from = _first; + SelfList *current = from; + SelfList *to = from; + + while (current) { + SelfList *next = current->_next; + + if (from != current) { + current->_prev = nullptr; + current->_next = from; + + SelfList *find = from; + C less; + while (find && less(*find->_self, *current->_self)) { + current->_prev = find; + current->_next = find->_next; + find = find->_next; + } + + if (current->_prev) { + current->_prev->_next = current; + } else { + from = current; + } + + if (current->_next) { + current->_next->_prev = current; + } else { + to = current; + } + } else { + current->_prev = nullptr; + current->_next = nullptr; + } + + current = next; + } + _first = from; + _last = to; + } + _FORCE_INLINE_ SelfList *first() { return _first; } _FORCE_INLINE_ const SelfList *first() const { return _first; } + // Forbid copying, which has broken behavior. + void operator=(const List &) = delete; + _FORCE_INLINE_ List() {} - _FORCE_INLINE_ ~List() { ERR_FAIL_COND(_first != nullptr); } + _FORCE_INLINE_ ~List() { + // A self list must be empty on destruction. + DEV_ASSERT(_first == nullptr); + } }; private: @@ -127,6 +189,9 @@ class SelfList { _FORCE_INLINE_ const SelfList *prev() const { return _prev; } _FORCE_INLINE_ T *self() const { return _self; } + // Forbid copying, which has broken behavior. + void operator=(const SelfList &) = delete; + _FORCE_INLINE_ SelfList(T *p_self) { _self = p_self; } @@ -139,5 +204,3 @@ class SelfList { }; } // namespace godot - -#endif // GODOT_SELF_LIST_HPP diff --git a/include/godot_cpp/templates/sort_array.hpp b/include/godot_cpp/templates/sort_array.hpp index 7ce5c7842..fe1365858 100644 --- a/include/godot_cpp/templates/sort_array.hpp +++ b/include/godot_cpp/templates/sort_array.hpp @@ -28,8 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef GODOT_SORT_ARRAY_HPP -#define GODOT_SORT_ARRAY_HPP +#pragma once #include @@ -79,8 +78,8 @@ class SortArray { } } - inline int bitlog(int n) const { - int k; + inline int64_t bitlog(int64_t n) const { + int64_t k; for (k = 0; n != 1; n >>= 1) { ++k; } @@ -89,8 +88,8 @@ class SortArray { /* Heap / Heapsort functions */ - inline void push_heap(int p_first, int p_hole_idx, int p_top_index, T p_value, T *p_array) const { - int parent = (p_hole_idx - 1) / 2; + inline void push_heap(int64_t p_first, int64_t p_hole_idx, int64_t p_top_index, T p_value, T *p_array) const { + int64_t parent = (p_hole_idx - 1) / 2; while (p_hole_idx > p_top_index && compare(p_array[p_first + parent], p_value)) { p_array[p_first + p_hole_idx] = p_array[p_first + parent]; p_hole_idx = parent; @@ -99,17 +98,17 @@ class SortArray { p_array[p_first + p_hole_idx] = p_value; } - inline void pop_heap(int p_first, int p_last, int p_result, T p_value, T *p_array) const { + inline void pop_heap(int64_t p_first, int64_t p_last, int64_t p_result, T p_value, T *p_array) const { p_array[p_result] = p_array[p_first]; adjust_heap(p_first, 0, p_last - p_first, p_value, p_array); } - inline void pop_heap(int p_first, int p_last, T *p_array) const { + inline void pop_heap(int64_t p_first, int64_t p_last, T *p_array) const { pop_heap(p_first, p_last - 1, p_last - 1, p_array[p_last - 1], p_array); } - inline void adjust_heap(int p_first, int p_hole_idx, int p_len, T p_value, T *p_array) const { - int top_index = p_hole_idx; - int second_child = 2 * p_hole_idx + 2; + inline void adjust_heap(int64_t p_first, int64_t p_hole_idx, int64_t p_len, T p_value, T *p_array) const { + int64_t top_index = p_hole_idx; + int64_t second_child = 2 * p_hole_idx + 2; while (second_child < p_len) { if (compare(p_array[p_first + second_child], p_array[p_first + (second_child - 1)])) { @@ -128,18 +127,18 @@ class SortArray { push_heap(p_first, p_hole_idx, top_index, p_value, p_array); } - inline void sort_heap(int p_first, int p_last, T *p_array) const { + inline void sort_heap(int64_t p_first, int64_t p_last, T *p_array) const { while (p_last - p_first > 1) { pop_heap(p_first, p_last--, p_array); } } - inline void make_heap(int p_first, int p_last, T *p_array) const { + inline void make_heap(int64_t p_first, int64_t p_last, T *p_array) const { if (p_last - p_first < 2) { return; } - int len = p_last - p_first; - int parent = (len - 2) / 2; + int64_t len = p_last - p_first; + int64_t parent = (len - 2) / 2; while (true) { adjust_heap(p_first, parent, len, p_array[p_first + parent], p_array); @@ -150,9 +149,9 @@ class SortArray { } } - inline void partial_sort(int p_first, int p_last, int p_middle, T *p_array) const { + inline void partial_sort(int64_t p_first, int64_t p_last, int64_t p_middle, T *p_array) const { make_heap(p_first, p_middle, p_array); - for (int i = p_middle; i < p_last; i++) { + for (int64_t i = p_middle; i < p_last; i++) { if (compare(p_array[i], p_array[p_first])) { pop_heap(p_first, p_middle, i, p_array[i], p_array); } @@ -160,29 +159,29 @@ class SortArray { sort_heap(p_first, p_middle, p_array); } - inline void partial_select(int p_first, int p_last, int p_middle, T *p_array) const { + inline void partial_select(int64_t p_first, int64_t p_last, int64_t p_middle, T *p_array) const { make_heap(p_first, p_middle, p_array); - for (int i = p_middle; i < p_last; i++) { + for (int64_t i = p_middle; i < p_last; i++) { if (compare(p_array[i], p_array[p_first])) { pop_heap(p_first, p_middle, i, p_array[i], p_array); } } } - inline int partitioner(int p_first, int p_last, T p_pivot, T *p_array) const { - const int unmodified_first = p_first; - const int unmodified_last = p_last; + inline int64_t partitioner(int64_t p_first, int64_t p_last, T p_pivot, T *p_array) const { + const int64_t unmodified_first = p_first; + const int64_t unmodified_last = p_last; while (true) { while (compare(p_array[p_first], p_pivot)) { - if (Validate) { + if constexpr (Validate) { ERR_BAD_COMPARE(p_first == unmodified_last - 1); } p_first++; } p_last--; while (compare(p_pivot, p_array[p_last])) { - if (Validate) { + if constexpr (Validate) { ERR_BAD_COMPARE(p_last == unmodified_first); } p_last--; @@ -197,7 +196,7 @@ class SortArray { } } - inline void introsort(int p_first, int p_last, T *p_array, int p_max_depth) const { + inline void introsort(int64_t p_first, int64_t p_last, T *p_array, int64_t p_max_depth) const { while (p_last - p_first > INTROSORT_THRESHOLD) { if (p_max_depth == 0) { partial_sort(p_first, p_last, p_last, p_array); @@ -206,7 +205,7 @@ class SortArray { p_max_depth--; - int cut = partitioner( + int64_t cut = partitioner( p_first, p_last, median_of_3( @@ -220,7 +219,7 @@ class SortArray { } } - inline void introselect(int p_first, int p_nth, int p_last, T *p_array, int p_max_depth) const { + inline void introselect(int64_t p_first, int64_t p_nth, int64_t p_last, T *p_array, int64_t p_max_depth) const { while (p_last - p_first > 3) { if (p_max_depth == 0) { partial_select(p_first, p_nth + 1, p_last, p_array); @@ -230,7 +229,7 @@ class SortArray { p_max_depth--; - int cut = partitioner( + int64_t cut = partitioner( p_first, p_last, median_of_3( @@ -249,10 +248,10 @@ class SortArray { insertion_sort(p_first, p_last, p_array); } - inline void unguarded_linear_insert(int p_last, T p_value, T *p_array) const { - int next = p_last - 1; + inline void unguarded_linear_insert(int64_t p_last, T p_value, T *p_array) const { + int64_t next = p_last - 1; while (compare(p_value, p_array[next])) { - if (Validate) { + if constexpr (Validate) { ERR_BAD_COMPARE(next == 0); } p_array[p_last] = p_array[next]; @@ -262,10 +261,10 @@ class SortArray { p_array[p_last] = p_value; } - inline void linear_insert(int p_first, int p_last, T *p_array) const { + inline void linear_insert(int64_t p_first, int64_t p_last, T *p_array) const { T val = p_array[p_last]; if (compare(val, p_array[p_first])) { - for (int i = p_last; i > p_first; i--) { + for (int64_t i = p_last; i > p_first; i--) { p_array[i] = p_array[i - 1]; } @@ -275,22 +274,22 @@ class SortArray { } } - inline void insertion_sort(int p_first, int p_last, T *p_array) const { + inline void insertion_sort(int64_t p_first, int64_t p_last, T *p_array) const { if (p_first == p_last) { return; } - for (int i = p_first + 1; i != p_last; i++) { + for (int64_t i = p_first + 1; i != p_last; i++) { linear_insert(p_first, i, p_array); } } - inline void unguarded_insertion_sort(int p_first, int p_last, T *p_array) const { - for (int i = p_first; i != p_last; i++) { + inline void unguarded_insertion_sort(int64_t p_first, int64_t p_last, T *p_array) const { + for (int64_t i = p_first; i != p_last; i++) { unguarded_linear_insert(i, p_array[i], p_array); } } - inline void final_insertion_sort(int p_first, int p_last, T *p_array) const { + inline void final_insertion_sort(int64_t p_first, int64_t p_last, T *p_array) const { if (p_last - p_first > INTROSORT_THRESHOLD) { insertion_sort(p_first, p_first + INTROSORT_THRESHOLD, p_array); unguarded_insertion_sort(p_first + INTROSORT_THRESHOLD, p_last, p_array); @@ -299,18 +298,18 @@ class SortArray { } } - inline void sort_range(int p_first, int p_last, T *p_array) const { + inline void sort_range(int64_t p_first, int64_t p_last, T *p_array) const { if (p_first != p_last) { introsort(p_first, p_last, p_array, bitlog(p_last - p_first) * 2); final_insertion_sort(p_first, p_last, p_array); } } - inline void sort(T *p_array, int p_len) const { + inline void sort(T *p_array, int64_t p_len) const { sort_range(0, p_len, p_array); } - inline void nth_element(int p_first, int p_last, int p_nth, T *p_array) const { + inline void nth_element(int64_t p_first, int64_t p_last, int64_t p_nth, T *p_array) const { if (p_first == p_last || p_nth == p_last) { return; } @@ -319,5 +318,3 @@ class SortArray { }; } // namespace godot - -#endif // GODOT_SORT_ARRAY_HPP diff --git a/include/godot_cpp/templates/spin_lock.hpp b/include/godot_cpp/templates/spin_lock.hpp index 530d545e3..17c21bc5c 100644 --- a/include/godot_cpp/templates/spin_lock.hpp +++ b/include/godot_cpp/templates/spin_lock.hpp @@ -28,8 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef GODOT_SPIN_LOCK_HPP -#define GODOT_SPIN_LOCK_HPP +#pragma once #include @@ -50,5 +49,3 @@ class SpinLock { }; } // namespace godot - -#endif // GODOT_SPIN_LOCK_HPP diff --git a/include/godot_cpp/templates/thread_work_pool.hpp b/include/godot_cpp/templates/thread_work_pool.hpp index cb20c6e97..190c1e00e 100644 --- a/include/godot_cpp/templates/thread_work_pool.hpp +++ b/include/godot_cpp/templates/thread_work_pool.hpp @@ -28,8 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef GODOT_THREAD_WORK_POOL_HPP -#define GODOT_THREAD_WORK_POOL_HPP +#pragma once #include #include @@ -201,5 +200,3 @@ class ThreadWorkPool { }; } // namespace godot - -#endif // GODOT_THREAD_WORK_POOL_HPP diff --git a/include/godot_cpp/templates/vector.hpp b/include/godot_cpp/templates/vector.hpp index aaa84f338..51eb825d3 100644 --- a/include/godot_cpp/templates/vector.hpp +++ b/include/godot_cpp/templates/vector.hpp @@ -28,8 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef GODOT_VECTOR_HPP -#define GODOT_VECTOR_HPP +#pragma once /** * @class Vector @@ -69,6 +68,7 @@ class Vector { CowData _cowdata; public: + // Must take a copy instead of a reference (see GH-31736). bool push_back(T p_elem); _FORCE_INLINE_ bool append(const T &p_elem) { return push_back(p_elem); } //alias void fill(T p_elem); @@ -97,11 +97,13 @@ class Vector { Error resize(Size p_size) { return _cowdata.resize(p_size); } Error resize_zeroed(Size p_size) { return _cowdata.template resize(p_size); } _FORCE_INLINE_ const T &operator[](Size p_index) const { return _cowdata.get(p_index); } + // Must take a copy instead of a reference (see GH-31736). Error insert(Size p_pos, T p_val) { return _cowdata.insert(p_pos, p_val); } Size find(const T &p_val, Size p_from = 0) const { return _cowdata.find(p_val, p_from); } Size rfind(const T &p_val, Size p_from = -1) const { return _cowdata.rfind(p_val, p_from); } Size count(const T &p_val) const { return _cowdata.count(p_val); } + // Must take a copy instead of a reference (see GH-31736). void append_array(Vector p_other); _FORCE_INLINE_ bool has(const T &p_val) const { return find(p_val) != -1; } @@ -146,17 +148,19 @@ class Vector { insert(i, p_val); } - inline void operator=(const Vector &p_from) { - _cowdata._ref(p_from._cowdata); - } + void operator=(const Vector &p_from) { _cowdata._ref(p_from._cowdata); } + void operator=(Vector &&p_from) { _cowdata = std::move(p_from._cowdata); } Vector to_byte_array() const { Vector ret; if (is_empty()) { return ret; } - ret.resize(size() * sizeof(T)); - memcpy(ret.ptrw(), ptr(), sizeof(T) * size()); + size_t alloc_size = size() * sizeof(T); + ret.resize(alloc_size); + if (alloc_size) { + memcpy(ret.ptrw(), ptr(), alloc_size); + } return ret; } @@ -279,16 +283,11 @@ class Vector { } _FORCE_INLINE_ Vector() {} - _FORCE_INLINE_ Vector(std::initializer_list p_init) { - Error err = _cowdata.resize(p_init.size()); - ERR_FAIL_COND(err); - - Size i = 0; - for (const T &element : p_init) { - _cowdata.set(i++, element); - } - } + _FORCE_INLINE_ Vector(std::initializer_list p_init) : + _cowdata(p_init) {} _FORCE_INLINE_ Vector(const Vector &p_from) { _cowdata._ref(p_from._cowdata); } + _FORCE_INLINE_ Vector(Vector &&p_from) : + _cowdata(std::move(p_from._cowdata)) {} _FORCE_INLINE_ ~Vector() {} }; @@ -332,5 +331,3 @@ void Vector::fill(T p_elem) { } } // namespace godot - -#endif // GODOT_VECTOR_HPP diff --git a/include/godot_cpp/templates/vmap.hpp b/include/godot_cpp/templates/vmap.hpp index 926ccd390..ea043d9fc 100644 --- a/include/godot_cpp/templates/vmap.hpp +++ b/include/godot_cpp/templates/vmap.hpp @@ -28,8 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef GODOT_VMAP_HPP -#define GODOT_VMAP_HPP +#pragma once #include @@ -73,16 +72,16 @@ class VMap { middle = (low + high) / 2; if (p_val < a[middle].key) { - high = middle - 1; // search low end of array + high = middle - 1; //search low end of array } else if (a[middle].key < p_val) { - low = middle + 1; // search high end of array + low = middle + 1; //search high end of array } else { r_exact = true; return middle; } } - // return the position where this would be inserted + //return the position where this would be inserted if (a[middle].key < p_val) { middle++; } @@ -103,9 +102,9 @@ class VMap { middle = (low + high) / 2; if (p_val < a[middle].key) { - high = middle - 1; // search low end of array + high = middle - 1; //search low end of array } else if (a[middle].key < p_val) { - low = middle + 1; // search high end of array + low = middle + 1; //search high end of array } else { return middle; } @@ -143,6 +142,9 @@ class VMap { } int find_nearest(const T &p_val) const { + if (_cowdata.is_empty()) { + return -1; + } bool exact; return _find(p_val, exact); } @@ -192,6 +194,8 @@ class VMap { } _FORCE_INLINE_ VMap() {} + _FORCE_INLINE_ VMap(std::initializer_list p_init) : + _cowdata(p_init) {} _FORCE_INLINE_ VMap(const VMap &p_from) { _cowdata._ref(p_from._cowdata); } inline void operator=(const VMap &p_from) { @@ -200,5 +204,3 @@ class VMap { }; } // namespace godot - -#endif // GODOT_VMAP_HPP diff --git a/include/godot_cpp/templates/vset.hpp b/include/godot_cpp/templates/vset.hpp index ce21ba83f..13d6e996b 100644 --- a/include/godot_cpp/templates/vset.hpp +++ b/include/godot_cpp/templates/vset.hpp @@ -28,8 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef GODOT_VSET_HPP -#define GODOT_VSET_HPP +#pragma once #include @@ -60,16 +59,16 @@ class VSet { middle = (low + high) / 2; if (p_val < a[middle]) { - high = middle - 1; // search low end of array + high = middle - 1; //search low end of array } else if (a[middle] < p_val) { - low = middle + 1; // search high end of array + low = middle + 1; //search high end of array } else { r_exact = true; return middle; } } - // return the position where this would be inserted + //return the position where this would be inserted if (a[middle] < p_val) { middle++; } @@ -90,9 +89,9 @@ class VSet { middle = (low + high) / 2; if (p_val < a[middle]) { - high = middle - 1; // search low end of array + high = middle - 1; //search low end of array } else if (a[middle] < p_val) { - low = middle + 1; // search high end of array + low = middle + 1; //search high end of array } else { return middle; } @@ -138,8 +137,10 @@ class VSet { inline const T &operator[](int p_index) const { return _data[p_index]; } + + _FORCE_INLINE_ VSet() {} + _FORCE_INLINE_ VSet(std::initializer_list p_init) : + _data(p_init) {} }; } // namespace godot - -#endif // GODOT_VSET_HPP diff --git a/include/godot_cpp/variant/aabb.hpp b/include/godot_cpp/variant/aabb.hpp index b827112af..cac221964 100644 --- a/include/godot_cpp/variant/aabb.hpp +++ b/include/godot_cpp/variant/aabb.hpp @@ -28,8 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef GODOT_AABB_HPP -#define GODOT_AABB_HPP +#pragma once #include #include @@ -43,7 +42,7 @@ namespace godot { class Variant; -struct _NO_DISCARD_ AABB { +struct [[nodiscard]] AABB { Vector3 position; Vector3 size; @@ -73,16 +72,21 @@ struct _NO_DISCARD_ AABB { AABB merge(const AABB &p_with) const; void merge_with(const AABB &p_aabb); ///merge with another AABB AABB intersection(const AABB &p_aabb) const; ///get box where two intersect, empty if no intersection occurs - bool intersects_segment(const Vector3 &p_from, const Vector3 &p_to, Vector3 *r_clip = nullptr, Vector3 *r_normal = nullptr) const; - bool intersects_ray(const Vector3 &p_from, const Vector3 &p_dir, Vector3 *r_clip = nullptr, Vector3 *r_normal = nullptr) const; - _FORCE_INLINE_ bool smits_intersect_ray(const Vector3 &p_from, const Vector3 &p_dir, real_t t0, real_t t1) const; + _FORCE_INLINE_ bool smits_intersect_ray(const Vector3 &p_from, const Vector3 &p_dir, real_t p_t0, real_t p_t1) const; + + bool intersects_segment(const Vector3 &p_from, const Vector3 &p_to, Vector3 *r_intersection_point = nullptr, Vector3 *r_normal = nullptr) const; + bool intersects_ray(const Vector3 &p_from, const Vector3 &p_dir) const { + bool inside; + return find_intersects_ray(p_from, p_dir, inside); + } + bool find_intersects_ray(const Vector3 &p_from, const Vector3 &p_dir, bool &r_inside, Vector3 *r_intersection_point = nullptr, Vector3 *r_normal = nullptr) const; _FORCE_INLINE_ bool intersects_convex_shape(const Plane *p_planes, int p_plane_count, const Vector3 *p_points, int p_point_count) const; _FORCE_INLINE_ bool inside_convex_shape(const Plane *p_planes, int p_plane_count) const; bool intersects_plane(const Plane &p_plane) const; _FORCE_INLINE_ bool has_point(const Vector3 &p_point) const; - _FORCE_INLINE_ Vector3 get_support(const Vector3 &p_normal) const; + _FORCE_INLINE_ Vector3 get_support(const Vector3 &p_direction) const; Vector3 get_longest_axis() const; int get_longest_axis_index() const; @@ -209,15 +213,18 @@ inline bool AABB::encloses(const AABB &p_aabb) const { (src_max.z >= dst_max.z)); } -Vector3 AABB::get_support(const Vector3 &p_normal) const { - Vector3 half_extents = size * 0.5f; - Vector3 ofs = position + half_extents; - - return Vector3( - (p_normal.x > 0) ? half_extents.x : -half_extents.x, - (p_normal.y > 0) ? half_extents.y : -half_extents.y, - (p_normal.z > 0) ? half_extents.z : -half_extents.z) + - ofs; +Vector3 AABB::get_support(const Vector3 &p_direction) const { + Vector3 support = position; + if (p_direction.x > 0.0f) { + support.x += size.x; + } + if (p_direction.y > 0.0f) { + support.y += size.y; + } + if (p_direction.z > 0.0f) { + support.z += size.z; + } + return support; } Vector3 AABB::get_endpoint(int p_point) const { @@ -403,7 +410,7 @@ inline real_t AABB::get_shortest_axis_size() const { return max_size; } -bool AABB::smits_intersect_ray(const Vector3 &p_from, const Vector3 &p_dir, real_t t0, real_t t1) const { +bool AABB::smits_intersect_ray(const Vector3 &p_from, const Vector3 &p_dir, real_t p_t0, real_t p_t1) const { #ifdef MATH_CHECKS if (unlikely(size.x < 0 || size.y < 0 || size.z < 0)) { ERR_PRINT("AABB size is negative, this is not supported. Use AABB.abs() to get an AABB with a positive size."); @@ -454,7 +461,7 @@ bool AABB::smits_intersect_ray(const Vector3 &p_from, const Vector3 &p_dir, real if (tzmax < tmax) { tmax = tzmax; } - return ((tmin < t1) && (tmax > t0)); + return ((tmin < p_t1) && (tmax > p_t0)); } void AABB::grow_by(real_t p_amount) { @@ -491,5 +498,3 @@ AABB AABB::quantized(real_t p_unit) const { } } // namespace godot - -#endif // GODOT_AABB_HPP diff --git a/include/godot_cpp/variant/array_helpers.hpp b/include/godot_cpp/variant/array_helpers.hpp index 3d948aab5..f408aa720 100644 --- a/include/godot_cpp/variant/array_helpers.hpp +++ b/include/godot_cpp/variant/array_helpers.hpp @@ -28,8 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef GODOT_ARRAY_HELPERS_HPP -#define GODOT_ARRAY_HELPERS_HPP +#pragma once namespace godot { namespace helpers { @@ -51,5 +50,3 @@ T append_all(T appendable) { } } // namespace helpers } // namespace godot - -#endif // GODOT_ARRAY_HELPERS_HPP diff --git a/include/godot_cpp/variant/basis.hpp b/include/godot_cpp/variant/basis.hpp index f3ebe15fe..efe21cf6d 100644 --- a/include/godot_cpp/variant/basis.hpp +++ b/include/godot_cpp/variant/basis.hpp @@ -28,8 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef GODOT_BASIS_HPP -#define GODOT_BASIS_HPP +#pragma once #include #include @@ -37,18 +36,18 @@ namespace godot { -struct _NO_DISCARD_ Basis { +struct [[nodiscard]] Basis { Vector3 rows[3] = { Vector3(1, 0, 0), Vector3(0, 1, 0), Vector3(0, 0, 1) }; - _FORCE_INLINE_ const Vector3 &operator[](int axis) const { - return rows[axis]; + _FORCE_INLINE_ const Vector3 &operator[](int p_row) const { + return rows[p_row]; } - _FORCE_INLINE_ Vector3 &operator[](int axis) { - return rows[axis]; + _FORCE_INLINE_ Vector3 &operator[](int p_row) { + return rows[p_row]; } void invert(); @@ -59,21 +58,19 @@ struct _NO_DISCARD_ Basis { _FORCE_INLINE_ real_t determinant() const; - void from_z(const Vector3 &p_z); - void rotate(const Vector3 &p_axis, real_t p_angle); Basis rotated(const Vector3 &p_axis, real_t p_angle) const; void rotate_local(const Vector3 &p_axis, real_t p_angle); Basis rotated_local(const Vector3 &p_axis, real_t p_angle) const; - void rotate(const Vector3 &p_euler, EulerOrder p_order = EULER_ORDER_YXZ); - Basis rotated(const Vector3 &p_euler, EulerOrder p_order = EULER_ORDER_YXZ) const; + void rotate(const Vector3 &p_euler, EulerOrder p_order = EulerOrder::EULER_ORDER_YXZ); + Basis rotated(const Vector3 &p_euler, EulerOrder p_order = EulerOrder::EULER_ORDER_YXZ) const; void rotate(const Quaternion &p_quaternion); Basis rotated(const Quaternion &p_quaternion) const; - Vector3 get_euler_normalized(EulerOrder p_order = EULER_ORDER_YXZ) const; + Vector3 get_euler_normalized(EulerOrder p_order = EulerOrder::EULER_ORDER_YXZ) const; void get_rotation_axis_angle(Vector3 &p_axis, real_t &p_angle) const; void get_rotation_axis_angle_local(Vector3 &p_axis, real_t &p_angle) const; Quaternion get_rotation_quaternion() const; @@ -82,9 +79,9 @@ struct _NO_DISCARD_ Basis { Vector3 rotref_posscale_decomposition(Basis &rotref) const; - Vector3 get_euler(EulerOrder p_order = EULER_ORDER_YXZ) const; - void set_euler(const Vector3 &p_euler, EulerOrder p_order = EULER_ORDER_YXZ); - static Basis from_euler(const Vector3 &p_euler, EulerOrder p_order = EULER_ORDER_YXZ) { + Vector3 get_euler(EulerOrder p_order = EulerOrder::EULER_ORDER_YXZ) const; + void set_euler(const Vector3 &p_euler, EulerOrder p_order = EulerOrder::EULER_ORDER_YXZ); + static Basis from_euler(const Vector3 &p_euler, EulerOrder p_order = EulerOrder::EULER_ORDER_YXZ) { Basis b; b.set_euler(p_euler, p_order); return b; @@ -104,27 +101,25 @@ struct _NO_DISCARD_ Basis { void scale_orthogonal(const Vector3 &p_scale); Basis scaled_orthogonal(const Vector3 &p_scale) const; - - void make_scale_uniform(); - float get_uniform_scale() const; + real_t get_uniform_scale() const; Vector3 get_scale() const; Vector3 get_scale_abs() const; - Vector3 get_scale_local() const; + Vector3 get_scale_global() const; void set_axis_angle_scale(const Vector3 &p_axis, real_t p_angle, const Vector3 &p_scale); - void set_euler_scale(const Vector3 &p_euler, const Vector3 &p_scale, EulerOrder p_order = EULER_ORDER_YXZ); + void set_euler_scale(const Vector3 &p_euler, const Vector3 &p_scale, EulerOrder p_order = EulerOrder::EULER_ORDER_YXZ); void set_quaternion_scale(const Quaternion &p_quaternion, const Vector3 &p_scale); // transposed dot products - _FORCE_INLINE_ real_t tdotx(const Vector3 &v) const { - return rows[0][0] * v[0] + rows[1][0] * v[1] + rows[2][0] * v[2]; + _FORCE_INLINE_ real_t tdotx(const Vector3 &p_v) const { + return rows[0][0] * p_v[0] + rows[1][0] * p_v[1] + rows[2][0] * p_v[2]; } - _FORCE_INLINE_ real_t tdoty(const Vector3 &v) const { - return rows[0][1] * v[0] + rows[1][1] * v[1] + rows[2][1] * v[2]; + _FORCE_INLINE_ real_t tdoty(const Vector3 &p_v) const { + return rows[0][1] * p_v[0] + rows[1][1] * p_v[1] + rows[2][1] * p_v[2]; } - _FORCE_INLINE_ real_t tdotz(const Vector3 &v) const { - return rows[0][2] * v[0] + rows[1][2] * v[1] + rows[2][2] * v[2]; + _FORCE_INLINE_ real_t tdotz(const Vector3 &p_v) const { + return rows[0][2] * p_v[0] + rows[1][2] * p_v[1] + rows[2][2] * p_v[2]; } bool is_equal_approx(const Basis &p_basis) const; @@ -141,31 +136,35 @@ struct _NO_DISCARD_ Basis { _FORCE_INLINE_ Basis operator+(const Basis &p_matrix) const; _FORCE_INLINE_ void operator-=(const Basis &p_matrix); _FORCE_INLINE_ Basis operator-(const Basis &p_matrix) const; - _FORCE_INLINE_ void operator*=(const real_t p_val); - _FORCE_INLINE_ Basis operator*(const real_t p_val) const; + _FORCE_INLINE_ void operator*=(real_t p_val); + _FORCE_INLINE_ Basis operator*(real_t p_val) const; + _FORCE_INLINE_ void operator/=(real_t p_val); + _FORCE_INLINE_ Basis operator/(real_t p_val) const; bool is_orthogonal() const; + bool is_orthonormal() const; + bool is_conformal() const; bool is_diagonal() const; bool is_rotation() const; - Basis lerp(const Basis &p_to, const real_t &p_weight) const; - Basis slerp(const Basis &p_to, const real_t &p_weight) const; + Basis lerp(const Basis &p_to, real_t p_weight) const; + Basis slerp(const Basis &p_to, real_t p_weight) const; void rotate_sh(real_t *p_values); operator String() const; /* create / set */ - _FORCE_INLINE_ void set(real_t xx, real_t xy, real_t xz, real_t yx, real_t yy, real_t yz, real_t zx, real_t zy, real_t zz) { - rows[0][0] = xx; - rows[0][1] = xy; - rows[0][2] = xz; - rows[1][0] = yx; - rows[1][1] = yy; - rows[1][2] = yz; - rows[2][0] = zx; - rows[2][1] = zy; - rows[2][2] = zz; + _FORCE_INLINE_ void set(real_t p_xx, real_t p_xy, real_t p_xz, real_t p_yx, real_t p_yy, real_t p_yz, real_t p_zx, real_t p_zy, real_t p_zz) { + rows[0][0] = p_xx; + rows[0][1] = p_xy; + rows[0][2] = p_xz; + rows[1][0] = p_yx; + rows[1][1] = p_yy; + rows[1][2] = p_yz; + rows[2][0] = p_zx; + rows[2][1] = p_zy; + rows[2][2] = p_zz; } _FORCE_INLINE_ void set_columns(const Vector3 &p_x, const Vector3 &p_y, const Vector3 &p_z) { set_column(0, p_x); @@ -195,20 +194,20 @@ struct _NO_DISCARD_ Basis { rows[2].zero(); } - _FORCE_INLINE_ Basis transpose_xform(const Basis &m) const { + _FORCE_INLINE_ Basis transpose_xform(const Basis &p_m) const { return Basis( - rows[0].x * m[0].x + rows[1].x * m[1].x + rows[2].x * m[2].x, - rows[0].x * m[0].y + rows[1].x * m[1].y + rows[2].x * m[2].y, - rows[0].x * m[0].z + rows[1].x * m[1].z + rows[2].x * m[2].z, - rows[0].y * m[0].x + rows[1].y * m[1].x + rows[2].y * m[2].x, - rows[0].y * m[0].y + rows[1].y * m[1].y + rows[2].y * m[2].y, - rows[0].y * m[0].z + rows[1].y * m[1].z + rows[2].y * m[2].z, - rows[0].z * m[0].x + rows[1].z * m[1].x + rows[2].z * m[2].x, - rows[0].z * m[0].y + rows[1].z * m[1].y + rows[2].z * m[2].y, - rows[0].z * m[0].z + rows[1].z * m[1].z + rows[2].z * m[2].z); + rows[0].x * p_m[0].x + rows[1].x * p_m[1].x + rows[2].x * p_m[2].x, + rows[0].x * p_m[0].y + rows[1].x * p_m[1].y + rows[2].x * p_m[2].y, + rows[0].x * p_m[0].z + rows[1].x * p_m[1].z + rows[2].x * p_m[2].z, + rows[0].y * p_m[0].x + rows[1].y * p_m[1].x + rows[2].y * p_m[2].x, + rows[0].y * p_m[0].y + rows[1].y * p_m[1].y + rows[2].y * p_m[2].y, + rows[0].y * p_m[0].z + rows[1].y * p_m[1].z + rows[2].y * p_m[2].z, + rows[0].z * p_m[0].x + rows[1].z * p_m[1].x + rows[2].z * p_m[2].x, + rows[0].z * p_m[0].y + rows[1].z * p_m[1].y + rows[2].z * p_m[2].y, + rows[0].z * p_m[0].z + rows[1].z * p_m[1].z + rows[2].z * p_m[2].z); } - Basis(real_t xx, real_t xy, real_t xz, real_t yx, real_t yy, real_t yz, real_t zx, real_t zy, real_t zz) { - set(xx, xy, xz, yx, yy, yz, zx, zy, zz); + Basis(real_t p_xx, real_t p_xy, real_t p_xz, real_t p_yx, real_t p_yy, real_t p_yz, real_t p_zx, real_t p_zy, real_t p_zz) { + set(p_xx, p_xy, p_xz, p_yx, p_yy, p_yz, p_zx, p_zy, p_zz); } void orthonormalize(); @@ -282,18 +281,30 @@ _FORCE_INLINE_ Basis Basis::operator-(const Basis &p_matrix) const { return ret; } -_FORCE_INLINE_ void Basis::operator*=(const real_t p_val) { +_FORCE_INLINE_ void Basis::operator*=(real_t p_val) { rows[0] *= p_val; rows[1] *= p_val; rows[2] *= p_val; } -_FORCE_INLINE_ Basis Basis::operator*(const real_t p_val) const { +_FORCE_INLINE_ Basis Basis::operator*(real_t p_val) const { Basis ret(*this); ret *= p_val; return ret; } +_FORCE_INLINE_ void Basis::operator/=(real_t p_val) { + rows[0] /= p_val; + rows[1] /= p_val; + rows[2] /= p_val; +} + +_FORCE_INLINE_ Basis Basis::operator/(real_t p_val) const { + Basis ret(*this); + ret /= p_val; + return ret; +} + Vector3 Basis::xform(const Vector3 &p_vector) const { return Vector3( rows[0].dot(p_vector), @@ -315,5 +326,3 @@ real_t Basis::determinant() const { } } // namespace godot - -#endif // GODOT_BASIS_HPP diff --git a/include/godot_cpp/variant/callable_custom.hpp b/include/godot_cpp/variant/callable_custom.hpp index 48a814221..1ab18bd3d 100644 --- a/include/godot_cpp/variant/callable_custom.hpp +++ b/include/godot_cpp/variant/callable_custom.hpp @@ -28,8 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef GODOT_CALLABLE_CUSTOM_HPP -#define GODOT_CALLABLE_CUSTOM_HPP +#pragma once #include #include @@ -61,5 +60,3 @@ class CallableCustom : public CallableCustomBase { }; } // namespace godot - -#endif // GODOT_CALLABLE_CUSTOM_HPP diff --git a/include/godot_cpp/variant/callable_method_pointer.hpp b/include/godot_cpp/variant/callable_method_pointer.hpp index f3d688b45..e9aea09bc 100644 --- a/include/godot_cpp/variant/callable_method_pointer.hpp +++ b/include/godot_cpp/variant/callable_method_pointer.hpp @@ -28,8 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef GODOT_CALLABLE_METHOD_POINTER_HPP -#define GODOT_CALLABLE_METHOD_POINTER_HPP +#pragma once #include #include @@ -269,5 +268,3 @@ Callable create_custom_callable_static_function_pointer(R (*p_method)(P...)) { #define callable_mp_static(M) ::godot::create_custom_callable_static_function_pointer(M) } // namespace godot - -#endif // GODOT_CALLABLE_METHOD_POINTER_HPP diff --git a/include/godot_cpp/variant/char_range.inc.hpp b/include/godot_cpp/variant/char_range.inc.hpp new file mode 100644 index 000000000..f31e761f0 --- /dev/null +++ b/include/godot_cpp/variant/char_range.inc.hpp @@ -0,0 +1,3631 @@ +/**************************************************************************/ +/* char_range.inc.hpp */ +/**************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* https://godotengine.org */ +/**************************************************************************/ +/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */ +/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* */ +/* Permission is hereby granted, free of charge, to any person obtaining */ +/* a copy of this software and associated documentation files (the */ +/* "Software"), to deal in the Software without restriction, including */ +/* without limitation the rights to use, copy, modify, merge, publish, */ +/* distribute, sublicense, and/or sell copies of the Software, and to */ +/* permit persons to whom the Software is furnished to do so, subject to */ +/* the following conditions: */ +/* */ +/* The above copyright notice and this permission notice shall be */ +/* included in all copies or substantial portions of the Software. */ +/* */ +/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ +/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ +/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */ +/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ +/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ +/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ +/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +/**************************************************************************/ + +#pragma once + +// Unicode Derived Core Properties +// Source: https://www.unicode.org/Public/16.0.0/ucd/DerivedCoreProperties.txt + +namespace godot { + +struct CharRange { + char32_t start; + char32_t end; +}; + +constexpr inline CharRange xid_start[] = { + { 0x41, 0x5a }, + { 0x5f, 0x5f }, // Underscore technically isn't in XID_Start, but for our purposes it's included. + { 0x61, 0x7a }, + { 0xaa, 0xaa }, + { 0xb5, 0xb5 }, + { 0xba, 0xba }, + { 0xc0, 0xd6 }, + { 0xd8, 0xf6 }, + { 0xf8, 0x2c1 }, + { 0x2c6, 0x2d1 }, + { 0x2e0, 0x2e4 }, + { 0x2ec, 0x2ec }, + { 0x2ee, 0x2ee }, + { 0x370, 0x374 }, + { 0x376, 0x377 }, + { 0x37b, 0x37d }, + { 0x37f, 0x37f }, + { 0x386, 0x386 }, + { 0x388, 0x38a }, + { 0x38c, 0x38c }, + { 0x38e, 0x3a1 }, + { 0x3a3, 0x3f5 }, + { 0x3f7, 0x481 }, + { 0x48a, 0x52f }, + { 0x531, 0x556 }, + { 0x559, 0x559 }, + { 0x560, 0x588 }, + { 0x5d0, 0x5ea }, + { 0x5ef, 0x5f2 }, + { 0x620, 0x64a }, + { 0x66e, 0x66f }, + { 0x671, 0x6d3 }, + { 0x6d5, 0x6d5 }, + { 0x6e5, 0x6e6 }, + { 0x6ee, 0x6ef }, + { 0x6fa, 0x6fc }, + { 0x6ff, 0x6ff }, + { 0x710, 0x710 }, + { 0x712, 0x72f }, + { 0x74d, 0x7a5 }, + { 0x7b1, 0x7b1 }, + { 0x7ca, 0x7ea }, + { 0x7f4, 0x7f5 }, + { 0x7fa, 0x7fa }, + { 0x800, 0x815 }, + { 0x81a, 0x81a }, + { 0x824, 0x824 }, + { 0x828, 0x828 }, + { 0x840, 0x858 }, + { 0x860, 0x86a }, + { 0x870, 0x887 }, + { 0x889, 0x88e }, + { 0x8a0, 0x8c9 }, + { 0x904, 0x939 }, + { 0x93d, 0x93d }, + { 0x950, 0x950 }, + { 0x958, 0x961 }, + { 0x971, 0x980 }, + { 0x985, 0x98c }, + { 0x98f, 0x990 }, + { 0x993, 0x9a8 }, + { 0x9aa, 0x9b0 }, + { 0x9b2, 0x9b2 }, + { 0x9b6, 0x9b9 }, + { 0x9bd, 0x9bd }, + { 0x9ce, 0x9ce }, + { 0x9dc, 0x9dd }, + { 0x9df, 0x9e1 }, + { 0x9f0, 0x9f1 }, + { 0x9fc, 0x9fc }, + { 0xa05, 0xa0a }, + { 0xa0f, 0xa10 }, + { 0xa13, 0xa28 }, + { 0xa2a, 0xa30 }, + { 0xa32, 0xa33 }, + { 0xa35, 0xa36 }, + { 0xa38, 0xa39 }, + { 0xa59, 0xa5c }, + { 0xa5e, 0xa5e }, + { 0xa72, 0xa74 }, + { 0xa85, 0xa8d }, + { 0xa8f, 0xa91 }, + { 0xa93, 0xaa8 }, + { 0xaaa, 0xab0 }, + { 0xab2, 0xab3 }, + { 0xab5, 0xab9 }, + { 0xabd, 0xabd }, + { 0xad0, 0xad0 }, + { 0xae0, 0xae1 }, + { 0xaf9, 0xaf9 }, + { 0xb05, 0xb0c }, + { 0xb0f, 0xb10 }, + { 0xb13, 0xb28 }, + { 0xb2a, 0xb30 }, + { 0xb32, 0xb33 }, + { 0xb35, 0xb39 }, + { 0xb3d, 0xb3d }, + { 0xb5c, 0xb5d }, + { 0xb5f, 0xb61 }, + { 0xb71, 0xb71 }, + { 0xb83, 0xb83 }, + { 0xb85, 0xb8a }, + { 0xb8e, 0xb90 }, + { 0xb92, 0xb95 }, + { 0xb99, 0xb9a }, + { 0xb9c, 0xb9c }, + { 0xb9e, 0xb9f }, + { 0xba3, 0xba4 }, + { 0xba8, 0xbaa }, + { 0xbae, 0xbb9 }, + { 0xbd0, 0xbd0 }, + { 0xc05, 0xc0c }, + { 0xc0e, 0xc10 }, + { 0xc12, 0xc28 }, + { 0xc2a, 0xc39 }, + { 0xc3d, 0xc3d }, + { 0xc58, 0xc5a }, + { 0xc5d, 0xc5d }, + { 0xc60, 0xc61 }, + { 0xc80, 0xc80 }, + { 0xc85, 0xc8c }, + { 0xc8e, 0xc90 }, + { 0xc92, 0xca8 }, + { 0xcaa, 0xcb3 }, + { 0xcb5, 0xcb9 }, + { 0xcbd, 0xcbd }, + { 0xcdd, 0xcde }, + { 0xce0, 0xce1 }, + { 0xcf1, 0xcf2 }, + { 0xd04, 0xd0c }, + { 0xd0e, 0xd10 }, + { 0xd12, 0xd3a }, + { 0xd3d, 0xd3d }, + { 0xd4e, 0xd4e }, + { 0xd54, 0xd56 }, + { 0xd5f, 0xd61 }, + { 0xd7a, 0xd7f }, + { 0xd85, 0xd96 }, + { 0xd9a, 0xdb1 }, + { 0xdb3, 0xdbb }, + { 0xdbd, 0xdbd }, + { 0xdc0, 0xdc6 }, + { 0xe01, 0xe30 }, + { 0xe32, 0xe32 }, + { 0xe40, 0xe46 }, + { 0xe81, 0xe82 }, + { 0xe84, 0xe84 }, + { 0xe86, 0xe8a }, + { 0xe8c, 0xea3 }, + { 0xea5, 0xea5 }, + { 0xea7, 0xeb0 }, + { 0xeb2, 0xeb2 }, + { 0xebd, 0xebd }, + { 0xec0, 0xec4 }, + { 0xec6, 0xec6 }, + { 0xedc, 0xedf }, + { 0xf00, 0xf00 }, + { 0xf40, 0xf47 }, + { 0xf49, 0xf6c }, + { 0xf88, 0xf8c }, + { 0x1000, 0x102a }, + { 0x103f, 0x103f }, + { 0x1050, 0x1055 }, + { 0x105a, 0x105d }, + { 0x1061, 0x1061 }, + { 0x1065, 0x1066 }, + { 0x106e, 0x1070 }, + { 0x1075, 0x1081 }, + { 0x108e, 0x108e }, + { 0x10a0, 0x10c5 }, + { 0x10c7, 0x10c7 }, + { 0x10cd, 0x10cd }, + { 0x10d0, 0x10fa }, + { 0x10fc, 0x1248 }, + { 0x124a, 0x124d }, + { 0x1250, 0x1256 }, + { 0x1258, 0x1258 }, + { 0x125a, 0x125d }, + { 0x1260, 0x1288 }, + { 0x128a, 0x128d }, + { 0x1290, 0x12b0 }, + { 0x12b2, 0x12b5 }, + { 0x12b8, 0x12be }, + { 0x12c0, 0x12c0 }, + { 0x12c2, 0x12c5 }, + { 0x12c8, 0x12d6 }, + { 0x12d8, 0x1310 }, + { 0x1312, 0x1315 }, + { 0x1318, 0x135a }, + { 0x1380, 0x138f }, + { 0x13a0, 0x13f5 }, + { 0x13f8, 0x13fd }, + { 0x1401, 0x166c }, + { 0x166f, 0x167f }, + { 0x1681, 0x169a }, + { 0x16a0, 0x16ea }, + { 0x16ee, 0x16f8 }, + { 0x1700, 0x1711 }, + { 0x171f, 0x1731 }, + { 0x1740, 0x1751 }, + { 0x1760, 0x176c }, + { 0x176e, 0x1770 }, + { 0x1780, 0x17b3 }, + { 0x17d7, 0x17d7 }, + { 0x17dc, 0x17dc }, + { 0x1820, 0x1878 }, + { 0x1880, 0x18a8 }, + { 0x18aa, 0x18aa }, + { 0x18b0, 0x18f5 }, + { 0x1900, 0x191e }, + { 0x1950, 0x196d }, + { 0x1970, 0x1974 }, + { 0x1980, 0x19ab }, + { 0x19b0, 0x19c9 }, + { 0x1a00, 0x1a16 }, + { 0x1a20, 0x1a54 }, + { 0x1aa7, 0x1aa7 }, + { 0x1b05, 0x1b33 }, + { 0x1b45, 0x1b4c }, + { 0x1b83, 0x1ba0 }, + { 0x1bae, 0x1baf }, + { 0x1bba, 0x1be5 }, + { 0x1c00, 0x1c23 }, + { 0x1c4d, 0x1c4f }, + { 0x1c5a, 0x1c7d }, + { 0x1c80, 0x1c8a }, + { 0x1c90, 0x1cba }, + { 0x1cbd, 0x1cbf }, + { 0x1ce9, 0x1cec }, + { 0x1cee, 0x1cf3 }, + { 0x1cf5, 0x1cf6 }, + { 0x1cfa, 0x1cfa }, + { 0x1d00, 0x1dbf }, + { 0x1e00, 0x1f15 }, + { 0x1f18, 0x1f1d }, + { 0x1f20, 0x1f45 }, + { 0x1f48, 0x1f4d }, + { 0x1f50, 0x1f57 }, + { 0x1f59, 0x1f59 }, + { 0x1f5b, 0x1f5b }, + { 0x1f5d, 0x1f5d }, + { 0x1f5f, 0x1f7d }, + { 0x1f80, 0x1fb4 }, + { 0x1fb6, 0x1fbc }, + { 0x1fbe, 0x1fbe }, + { 0x1fc2, 0x1fc4 }, + { 0x1fc6, 0x1fcc }, + { 0x1fd0, 0x1fd3 }, + { 0x1fd6, 0x1fdb }, + { 0x1fe0, 0x1fec }, + { 0x1ff2, 0x1ff4 }, + { 0x1ff6, 0x1ffc }, + { 0x2071, 0x2071 }, + { 0x207f, 0x207f }, + { 0x2090, 0x209c }, + { 0x2102, 0x2102 }, + { 0x2107, 0x2107 }, + { 0x210a, 0x2113 }, + { 0x2115, 0x2115 }, + { 0x2118, 0x211d }, + { 0x2124, 0x2124 }, + { 0x2126, 0x2126 }, + { 0x2128, 0x2128 }, + { 0x212a, 0x2139 }, + { 0x213c, 0x213f }, + { 0x2145, 0x2149 }, + { 0x214e, 0x214e }, + { 0x2160, 0x2188 }, + { 0x2c00, 0x2ce4 }, + { 0x2ceb, 0x2cee }, + { 0x2cf2, 0x2cf3 }, + { 0x2d00, 0x2d25 }, + { 0x2d27, 0x2d27 }, + { 0x2d2d, 0x2d2d }, + { 0x2d30, 0x2d67 }, + { 0x2d6f, 0x2d6f }, + { 0x2d80, 0x2d96 }, + { 0x2da0, 0x2da6 }, + { 0x2da8, 0x2dae }, + { 0x2db0, 0x2db6 }, + { 0x2db8, 0x2dbe }, + { 0x2dc0, 0x2dc6 }, + { 0x2dc8, 0x2dce }, + { 0x2dd0, 0x2dd6 }, + { 0x2dd8, 0x2dde }, + { 0x3005, 0x3007 }, + { 0x3021, 0x3029 }, + { 0x3031, 0x3035 }, + { 0x3038, 0x303c }, + { 0x3041, 0x3096 }, + { 0x309d, 0x309f }, + { 0x30a1, 0x30fa }, + { 0x30fc, 0x30ff }, + { 0x3105, 0x312f }, + { 0x3131, 0x318e }, + { 0x31a0, 0x31bf }, + { 0x31f0, 0x31ff }, + { 0x3400, 0x4dbf }, + { 0x4e00, 0xa48c }, + { 0xa4d0, 0xa4fd }, + { 0xa500, 0xa60c }, + { 0xa610, 0xa61f }, + { 0xa62a, 0xa62b }, + { 0xa640, 0xa66e }, + { 0xa67f, 0xa69d }, + { 0xa6a0, 0xa6ef }, + { 0xa717, 0xa71f }, + { 0xa722, 0xa788 }, + { 0xa78b, 0xa7cd }, + { 0xa7d0, 0xa7d1 }, + { 0xa7d3, 0xa7d3 }, + { 0xa7d5, 0xa7dc }, + { 0xa7f2, 0xa801 }, + { 0xa803, 0xa805 }, + { 0xa807, 0xa80a }, + { 0xa80c, 0xa822 }, + { 0xa840, 0xa873 }, + { 0xa882, 0xa8b3 }, + { 0xa8f2, 0xa8f7 }, + { 0xa8fb, 0xa8fb }, + { 0xa8fd, 0xa8fe }, + { 0xa90a, 0xa925 }, + { 0xa930, 0xa946 }, + { 0xa960, 0xa97c }, + { 0xa984, 0xa9b2 }, + { 0xa9cf, 0xa9cf }, + { 0xa9e0, 0xa9e4 }, + { 0xa9e6, 0xa9ef }, + { 0xa9fa, 0xa9fe }, + { 0xaa00, 0xaa28 }, + { 0xaa40, 0xaa42 }, + { 0xaa44, 0xaa4b }, + { 0xaa60, 0xaa76 }, + { 0xaa7a, 0xaa7a }, + { 0xaa7e, 0xaaaf }, + { 0xaab1, 0xaab1 }, + { 0xaab5, 0xaab6 }, + { 0xaab9, 0xaabd }, + { 0xaac0, 0xaac0 }, + { 0xaac2, 0xaac2 }, + { 0xaadb, 0xaadd }, + { 0xaae0, 0xaaea }, + { 0xaaf2, 0xaaf4 }, + { 0xab01, 0xab06 }, + { 0xab09, 0xab0e }, + { 0xab11, 0xab16 }, + { 0xab20, 0xab26 }, + { 0xab28, 0xab2e }, + { 0xab30, 0xab5a }, + { 0xab5c, 0xab69 }, + { 0xab70, 0xabe2 }, + { 0xac00, 0xd7a3 }, + { 0xd7b0, 0xd7c6 }, + { 0xd7cb, 0xd7fb }, + { 0xf900, 0xfa6d }, + { 0xfa70, 0xfad9 }, + { 0xfb00, 0xfb06 }, + { 0xfb13, 0xfb17 }, + { 0xfb1d, 0xfb1d }, + { 0xfb1f, 0xfb28 }, + { 0xfb2a, 0xfb36 }, + { 0xfb38, 0xfb3c }, + { 0xfb3e, 0xfb3e }, + { 0xfb40, 0xfb41 }, + { 0xfb43, 0xfb44 }, + { 0xfb46, 0xfbb1 }, + { 0xfbd3, 0xfc5d }, + { 0xfc64, 0xfd3d }, + { 0xfd50, 0xfd8f }, + { 0xfd92, 0xfdc7 }, + { 0xfdf0, 0xfdf9 }, + { 0xfe71, 0xfe71 }, + { 0xfe73, 0xfe73 }, + { 0xfe77, 0xfe77 }, + { 0xfe79, 0xfe79 }, + { 0xfe7b, 0xfe7b }, + { 0xfe7d, 0xfe7d }, + { 0xfe7f, 0xfefc }, + { 0xff21, 0xff3a }, + { 0xff41, 0xff5a }, + { 0xff66, 0xff9d }, + { 0xffa0, 0xffbe }, + { 0xffc2, 0xffc7 }, + { 0xffca, 0xffcf }, + { 0xffd2, 0xffd7 }, + { 0xffda, 0xffdc }, + { 0x10000, 0x1000b }, + { 0x1000d, 0x10026 }, + { 0x10028, 0x1003a }, + { 0x1003c, 0x1003d }, + { 0x1003f, 0x1004d }, + { 0x10050, 0x1005d }, + { 0x10080, 0x100fa }, + { 0x10140, 0x10174 }, + { 0x10280, 0x1029c }, + { 0x102a0, 0x102d0 }, + { 0x10300, 0x1031f }, + { 0x1032d, 0x1034a }, + { 0x10350, 0x10375 }, + { 0x10380, 0x1039d }, + { 0x103a0, 0x103c3 }, + { 0x103c8, 0x103cf }, + { 0x103d1, 0x103d5 }, + { 0x10400, 0x1049d }, + { 0x104b0, 0x104d3 }, + { 0x104d8, 0x104fb }, + { 0x10500, 0x10527 }, + { 0x10530, 0x10563 }, + { 0x10570, 0x1057a }, + { 0x1057c, 0x1058a }, + { 0x1058c, 0x10592 }, + { 0x10594, 0x10595 }, + { 0x10597, 0x105a1 }, + { 0x105a3, 0x105b1 }, + { 0x105b3, 0x105b9 }, + { 0x105bb, 0x105bc }, + { 0x105c0, 0x105f3 }, + { 0x10600, 0x10736 }, + { 0x10740, 0x10755 }, + { 0x10760, 0x10767 }, + { 0x10780, 0x10785 }, + { 0x10787, 0x107b0 }, + { 0x107b2, 0x107ba }, + { 0x10800, 0x10805 }, + { 0x10808, 0x10808 }, + { 0x1080a, 0x10835 }, + { 0x10837, 0x10838 }, + { 0x1083c, 0x1083c }, + { 0x1083f, 0x10855 }, + { 0x10860, 0x10876 }, + { 0x10880, 0x1089e }, + { 0x108e0, 0x108f2 }, + { 0x108f4, 0x108f5 }, + { 0x10900, 0x10915 }, + { 0x10920, 0x10939 }, + { 0x10980, 0x109b7 }, + { 0x109be, 0x109bf }, + { 0x10a00, 0x10a00 }, + { 0x10a10, 0x10a13 }, + { 0x10a15, 0x10a17 }, + { 0x10a19, 0x10a35 }, + { 0x10a60, 0x10a7c }, + { 0x10a80, 0x10a9c }, + { 0x10ac0, 0x10ac7 }, + { 0x10ac9, 0x10ae4 }, + { 0x10b00, 0x10b35 }, + { 0x10b40, 0x10b55 }, + { 0x10b60, 0x10b72 }, + { 0x10b80, 0x10b91 }, + { 0x10c00, 0x10c48 }, + { 0x10c80, 0x10cb2 }, + { 0x10cc0, 0x10cf2 }, + { 0x10d00, 0x10d23 }, + { 0x10d4a, 0x10d65 }, + { 0x10d6f, 0x10d85 }, + { 0x10e80, 0x10ea9 }, + { 0x10eb0, 0x10eb1 }, + { 0x10ec2, 0x10ec4 }, + { 0x10f00, 0x10f1c }, + { 0x10f27, 0x10f27 }, + { 0x10f30, 0x10f45 }, + { 0x10f70, 0x10f81 }, + { 0x10fb0, 0x10fc4 }, + { 0x10fe0, 0x10ff6 }, + { 0x11003, 0x11037 }, + { 0x11071, 0x11072 }, + { 0x11075, 0x11075 }, + { 0x11083, 0x110af }, + { 0x110d0, 0x110e8 }, + { 0x11103, 0x11126 }, + { 0x11144, 0x11144 }, + { 0x11147, 0x11147 }, + { 0x11150, 0x11172 }, + { 0x11176, 0x11176 }, + { 0x11183, 0x111b2 }, + { 0x111c1, 0x111c4 }, + { 0x111da, 0x111da }, + { 0x111dc, 0x111dc }, + { 0x11200, 0x11211 }, + { 0x11213, 0x1122b }, + { 0x1123f, 0x11240 }, + { 0x11280, 0x11286 }, + { 0x11288, 0x11288 }, + { 0x1128a, 0x1128d }, + { 0x1128f, 0x1129d }, + { 0x1129f, 0x112a8 }, + { 0x112b0, 0x112de }, + { 0x11305, 0x1130c }, + { 0x1130f, 0x11310 }, + { 0x11313, 0x11328 }, + { 0x1132a, 0x11330 }, + { 0x11332, 0x11333 }, + { 0x11335, 0x11339 }, + { 0x1133d, 0x1133d }, + { 0x11350, 0x11350 }, + { 0x1135d, 0x11361 }, + { 0x11380, 0x11389 }, + { 0x1138b, 0x1138b }, + { 0x1138e, 0x1138e }, + { 0x11390, 0x113b5 }, + { 0x113b7, 0x113b7 }, + { 0x113d1, 0x113d1 }, + { 0x113d3, 0x113d3 }, + { 0x11400, 0x11434 }, + { 0x11447, 0x1144a }, + { 0x1145f, 0x11461 }, + { 0x11480, 0x114af }, + { 0x114c4, 0x114c5 }, + { 0x114c7, 0x114c7 }, + { 0x11580, 0x115ae }, + { 0x115d8, 0x115db }, + { 0x11600, 0x1162f }, + { 0x11644, 0x11644 }, + { 0x11680, 0x116aa }, + { 0x116b8, 0x116b8 }, + { 0x11700, 0x1171a }, + { 0x11740, 0x11746 }, + { 0x11800, 0x1182b }, + { 0x118a0, 0x118df }, + { 0x118ff, 0x11906 }, + { 0x11909, 0x11909 }, + { 0x1190c, 0x11913 }, + { 0x11915, 0x11916 }, + { 0x11918, 0x1192f }, + { 0x1193f, 0x1193f }, + { 0x11941, 0x11941 }, + { 0x119a0, 0x119a7 }, + { 0x119aa, 0x119d0 }, + { 0x119e1, 0x119e1 }, + { 0x119e3, 0x119e3 }, + { 0x11a00, 0x11a00 }, + { 0x11a0b, 0x11a32 }, + { 0x11a3a, 0x11a3a }, + { 0x11a50, 0x11a50 }, + { 0x11a5c, 0x11a89 }, + { 0x11a9d, 0x11a9d }, + { 0x11ab0, 0x11af8 }, + { 0x11bc0, 0x11be0 }, + { 0x11c00, 0x11c08 }, + { 0x11c0a, 0x11c2e }, + { 0x11c40, 0x11c40 }, + { 0x11c72, 0x11c8f }, + { 0x11d00, 0x11d06 }, + { 0x11d08, 0x11d09 }, + { 0x11d0b, 0x11d30 }, + { 0x11d46, 0x11d46 }, + { 0x11d60, 0x11d65 }, + { 0x11d67, 0x11d68 }, + { 0x11d6a, 0x11d89 }, + { 0x11d98, 0x11d98 }, + { 0x11ee0, 0x11ef2 }, + { 0x11f02, 0x11f02 }, + { 0x11f04, 0x11f10 }, + { 0x11f12, 0x11f33 }, + { 0x11fb0, 0x11fb0 }, + { 0x12000, 0x12399 }, + { 0x12400, 0x1246e }, + { 0x12480, 0x12543 }, + { 0x12f90, 0x12ff0 }, + { 0x13000, 0x1342f }, + { 0x13441, 0x13446 }, + { 0x13460, 0x143fa }, + { 0x14400, 0x14646 }, + { 0x16100, 0x1611d }, + { 0x16800, 0x16a38 }, + { 0x16a40, 0x16a5e }, + { 0x16a70, 0x16abe }, + { 0x16ad0, 0x16aed }, + { 0x16b00, 0x16b2f }, + { 0x16b40, 0x16b43 }, + { 0x16b63, 0x16b77 }, + { 0x16b7d, 0x16b8f }, + { 0x16d40, 0x16d6c }, + { 0x16e40, 0x16e7f }, + { 0x16f00, 0x16f4a }, + { 0x16f50, 0x16f50 }, + { 0x16f93, 0x16f9f }, + { 0x16fe0, 0x16fe1 }, + { 0x16fe3, 0x16fe3 }, + { 0x17000, 0x187f7 }, + { 0x18800, 0x18cd5 }, + { 0x18cff, 0x18d08 }, + { 0x1aff0, 0x1aff3 }, + { 0x1aff5, 0x1affb }, + { 0x1affd, 0x1affe }, + { 0x1b000, 0x1b122 }, + { 0x1b132, 0x1b132 }, + { 0x1b150, 0x1b152 }, + { 0x1b155, 0x1b155 }, + { 0x1b164, 0x1b167 }, + { 0x1b170, 0x1b2fb }, + { 0x1bc00, 0x1bc6a }, + { 0x1bc70, 0x1bc7c }, + { 0x1bc80, 0x1bc88 }, + { 0x1bc90, 0x1bc99 }, + { 0x1d400, 0x1d454 }, + { 0x1d456, 0x1d49c }, + { 0x1d49e, 0x1d49f }, + { 0x1d4a2, 0x1d4a2 }, + { 0x1d4a5, 0x1d4a6 }, + { 0x1d4a9, 0x1d4ac }, + { 0x1d4ae, 0x1d4b9 }, + { 0x1d4bb, 0x1d4bb }, + { 0x1d4bd, 0x1d4c3 }, + { 0x1d4c5, 0x1d505 }, + { 0x1d507, 0x1d50a }, + { 0x1d50d, 0x1d514 }, + { 0x1d516, 0x1d51c }, + { 0x1d51e, 0x1d539 }, + { 0x1d53b, 0x1d53e }, + { 0x1d540, 0x1d544 }, + { 0x1d546, 0x1d546 }, + { 0x1d54a, 0x1d550 }, + { 0x1d552, 0x1d6a5 }, + { 0x1d6a8, 0x1d6c0 }, + { 0x1d6c2, 0x1d6da }, + { 0x1d6dc, 0x1d6fa }, + { 0x1d6fc, 0x1d714 }, + { 0x1d716, 0x1d734 }, + { 0x1d736, 0x1d74e }, + { 0x1d750, 0x1d76e }, + { 0x1d770, 0x1d788 }, + { 0x1d78a, 0x1d7a8 }, + { 0x1d7aa, 0x1d7c2 }, + { 0x1d7c4, 0x1d7cb }, + { 0x1df00, 0x1df1e }, + { 0x1df25, 0x1df2a }, + { 0x1e030, 0x1e06d }, + { 0x1e100, 0x1e12c }, + { 0x1e137, 0x1e13d }, + { 0x1e14e, 0x1e14e }, + { 0x1e290, 0x1e2ad }, + { 0x1e2c0, 0x1e2eb }, + { 0x1e4d0, 0x1e4eb }, + { 0x1e5d0, 0x1e5ed }, + { 0x1e5f0, 0x1e5f0 }, + { 0x1e7e0, 0x1e7e6 }, + { 0x1e7e8, 0x1e7eb }, + { 0x1e7ed, 0x1e7ee }, + { 0x1e7f0, 0x1e7fe }, + { 0x1e800, 0x1e8c4 }, + { 0x1e900, 0x1e943 }, + { 0x1e94b, 0x1e94b }, + { 0x1ee00, 0x1ee03 }, + { 0x1ee05, 0x1ee1f }, + { 0x1ee21, 0x1ee22 }, + { 0x1ee24, 0x1ee24 }, + { 0x1ee27, 0x1ee27 }, + { 0x1ee29, 0x1ee32 }, + { 0x1ee34, 0x1ee37 }, + { 0x1ee39, 0x1ee39 }, + { 0x1ee3b, 0x1ee3b }, + { 0x1ee42, 0x1ee42 }, + { 0x1ee47, 0x1ee47 }, + { 0x1ee49, 0x1ee49 }, + { 0x1ee4b, 0x1ee4b }, + { 0x1ee4d, 0x1ee4f }, + { 0x1ee51, 0x1ee52 }, + { 0x1ee54, 0x1ee54 }, + { 0x1ee57, 0x1ee57 }, + { 0x1ee59, 0x1ee59 }, + { 0x1ee5b, 0x1ee5b }, + { 0x1ee5d, 0x1ee5d }, + { 0x1ee5f, 0x1ee5f }, + { 0x1ee61, 0x1ee62 }, + { 0x1ee64, 0x1ee64 }, + { 0x1ee67, 0x1ee6a }, + { 0x1ee6c, 0x1ee72 }, + { 0x1ee74, 0x1ee77 }, + { 0x1ee79, 0x1ee7c }, + { 0x1ee7e, 0x1ee7e }, + { 0x1ee80, 0x1ee89 }, + { 0x1ee8b, 0x1ee9b }, + { 0x1eea1, 0x1eea3 }, + { 0x1eea5, 0x1eea9 }, + { 0x1eeab, 0x1eebb }, + { 0x20000, 0x2a6df }, + { 0x2a700, 0x2b739 }, + { 0x2b740, 0x2b81d }, + { 0x2b820, 0x2cea1 }, + { 0x2ceb0, 0x2ebe0 }, + { 0x2ebf0, 0x2ee5d }, + { 0x2f800, 0x2fa1d }, + { 0x30000, 0x3134a }, + { 0x31350, 0x323af }, +}; + +constexpr inline CharRange xid_continue[] = { + { 0x30, 0x39 }, + { 0x41, 0x5a }, + { 0x5f, 0x5f }, + { 0x61, 0x7a }, + { 0xaa, 0xaa }, + { 0xb5, 0xb5 }, + { 0xb7, 0xb7 }, + { 0xba, 0xba }, + { 0xc0, 0xd6 }, + { 0xd8, 0xf6 }, + { 0xf8, 0x2c1 }, + { 0x2c6, 0x2d1 }, + { 0x2e0, 0x2e4 }, + { 0x2ec, 0x2ec }, + { 0x2ee, 0x2ee }, + { 0x300, 0x374 }, + { 0x376, 0x377 }, + { 0x37b, 0x37d }, + { 0x37f, 0x37f }, + { 0x386, 0x38a }, + { 0x38c, 0x38c }, + { 0x38e, 0x3a1 }, + { 0x3a3, 0x3f5 }, + { 0x3f7, 0x481 }, + { 0x483, 0x487 }, + { 0x48a, 0x52f }, + { 0x531, 0x556 }, + { 0x559, 0x559 }, + { 0x560, 0x588 }, + { 0x591, 0x5bd }, + { 0x5bf, 0x5bf }, + { 0x5c1, 0x5c2 }, + { 0x5c4, 0x5c5 }, + { 0x5c7, 0x5c7 }, + { 0x5d0, 0x5ea }, + { 0x5ef, 0x5f2 }, + { 0x610, 0x61a }, + { 0x620, 0x669 }, + { 0x66e, 0x6d3 }, + { 0x6d5, 0x6dc }, + { 0x6df, 0x6e8 }, + { 0x6ea, 0x6fc }, + { 0x6ff, 0x6ff }, + { 0x710, 0x74a }, + { 0x74d, 0x7b1 }, + { 0x7c0, 0x7f5 }, + { 0x7fa, 0x7fa }, + { 0x7fd, 0x7fd }, + { 0x800, 0x82d }, + { 0x840, 0x85b }, + { 0x860, 0x86a }, + { 0x870, 0x887 }, + { 0x889, 0x88e }, + { 0x897, 0x8e1 }, + { 0x8e3, 0x963 }, + { 0x966, 0x96f }, + { 0x971, 0x983 }, + { 0x985, 0x98c }, + { 0x98f, 0x990 }, + { 0x993, 0x9a8 }, + { 0x9aa, 0x9b0 }, + { 0x9b2, 0x9b2 }, + { 0x9b6, 0x9b9 }, + { 0x9bc, 0x9c4 }, + { 0x9c7, 0x9c8 }, + { 0x9cb, 0x9ce }, + { 0x9d7, 0x9d7 }, + { 0x9dc, 0x9dd }, + { 0x9df, 0x9e3 }, + { 0x9e6, 0x9f1 }, + { 0x9fc, 0x9fc }, + { 0x9fe, 0x9fe }, + { 0xa01, 0xa03 }, + { 0xa05, 0xa0a }, + { 0xa0f, 0xa10 }, + { 0xa13, 0xa28 }, + { 0xa2a, 0xa30 }, + { 0xa32, 0xa33 }, + { 0xa35, 0xa36 }, + { 0xa38, 0xa39 }, + { 0xa3c, 0xa3c }, + { 0xa3e, 0xa42 }, + { 0xa47, 0xa48 }, + { 0xa4b, 0xa4d }, + { 0xa51, 0xa51 }, + { 0xa59, 0xa5c }, + { 0xa5e, 0xa5e }, + { 0xa66, 0xa75 }, + { 0xa81, 0xa83 }, + { 0xa85, 0xa8d }, + { 0xa8f, 0xa91 }, + { 0xa93, 0xaa8 }, + { 0xaaa, 0xab0 }, + { 0xab2, 0xab3 }, + { 0xab5, 0xab9 }, + { 0xabc, 0xac5 }, + { 0xac7, 0xac9 }, + { 0xacb, 0xacd }, + { 0xad0, 0xad0 }, + { 0xae0, 0xae3 }, + { 0xae6, 0xaef }, + { 0xaf9, 0xaff }, + { 0xb01, 0xb03 }, + { 0xb05, 0xb0c }, + { 0xb0f, 0xb10 }, + { 0xb13, 0xb28 }, + { 0xb2a, 0xb30 }, + { 0xb32, 0xb33 }, + { 0xb35, 0xb39 }, + { 0xb3c, 0xb44 }, + { 0xb47, 0xb48 }, + { 0xb4b, 0xb4d }, + { 0xb55, 0xb57 }, + { 0xb5c, 0xb5d }, + { 0xb5f, 0xb63 }, + { 0xb66, 0xb6f }, + { 0xb71, 0xb71 }, + { 0xb82, 0xb83 }, + { 0xb85, 0xb8a }, + { 0xb8e, 0xb90 }, + { 0xb92, 0xb95 }, + { 0xb99, 0xb9a }, + { 0xb9c, 0xb9c }, + { 0xb9e, 0xb9f }, + { 0xba3, 0xba4 }, + { 0xba8, 0xbaa }, + { 0xbae, 0xbb9 }, + { 0xbbe, 0xbc2 }, + { 0xbc6, 0xbc8 }, + { 0xbca, 0xbcd }, + { 0xbd0, 0xbd0 }, + { 0xbd7, 0xbd7 }, + { 0xbe6, 0xbef }, + { 0xc00, 0xc0c }, + { 0xc0e, 0xc10 }, + { 0xc12, 0xc28 }, + { 0xc2a, 0xc39 }, + { 0xc3c, 0xc44 }, + { 0xc46, 0xc48 }, + { 0xc4a, 0xc4d }, + { 0xc55, 0xc56 }, + { 0xc58, 0xc5a }, + { 0xc5d, 0xc5d }, + { 0xc60, 0xc63 }, + { 0xc66, 0xc6f }, + { 0xc80, 0xc83 }, + { 0xc85, 0xc8c }, + { 0xc8e, 0xc90 }, + { 0xc92, 0xca8 }, + { 0xcaa, 0xcb3 }, + { 0xcb5, 0xcb9 }, + { 0xcbc, 0xcc4 }, + { 0xcc6, 0xcc8 }, + { 0xcca, 0xccd }, + { 0xcd5, 0xcd6 }, + { 0xcdd, 0xcde }, + { 0xce0, 0xce3 }, + { 0xce6, 0xcef }, + { 0xcf1, 0xcf3 }, + { 0xd00, 0xd0c }, + { 0xd0e, 0xd10 }, + { 0xd12, 0xd44 }, + { 0xd46, 0xd48 }, + { 0xd4a, 0xd4e }, + { 0xd54, 0xd57 }, + { 0xd5f, 0xd63 }, + { 0xd66, 0xd6f }, + { 0xd7a, 0xd7f }, + { 0xd81, 0xd83 }, + { 0xd85, 0xd96 }, + { 0xd9a, 0xdb1 }, + { 0xdb3, 0xdbb }, + { 0xdbd, 0xdbd }, + { 0xdc0, 0xdc6 }, + { 0xdca, 0xdca }, + { 0xdcf, 0xdd4 }, + { 0xdd6, 0xdd6 }, + { 0xdd8, 0xddf }, + { 0xde6, 0xdef }, + { 0xdf2, 0xdf3 }, + { 0xe01, 0xe3a }, + { 0xe40, 0xe4e }, + { 0xe50, 0xe59 }, + { 0xe81, 0xe82 }, + { 0xe84, 0xe84 }, + { 0xe86, 0xe8a }, + { 0xe8c, 0xea3 }, + { 0xea5, 0xea5 }, + { 0xea7, 0xebd }, + { 0xec0, 0xec4 }, + { 0xec6, 0xec6 }, + { 0xec8, 0xece }, + { 0xed0, 0xed9 }, + { 0xedc, 0xedf }, + { 0xf00, 0xf00 }, + { 0xf18, 0xf19 }, + { 0xf20, 0xf29 }, + { 0xf35, 0xf35 }, + { 0xf37, 0xf37 }, + { 0xf39, 0xf39 }, + { 0xf3e, 0xf47 }, + { 0xf49, 0xf6c }, + { 0xf71, 0xf84 }, + { 0xf86, 0xf97 }, + { 0xf99, 0xfbc }, + { 0xfc6, 0xfc6 }, + { 0x1000, 0x1049 }, + { 0x1050, 0x109d }, + { 0x10a0, 0x10c5 }, + { 0x10c7, 0x10c7 }, + { 0x10cd, 0x10cd }, + { 0x10d0, 0x10fa }, + { 0x10fc, 0x1248 }, + { 0x124a, 0x124d }, + { 0x1250, 0x1256 }, + { 0x1258, 0x1258 }, + { 0x125a, 0x125d }, + { 0x1260, 0x1288 }, + { 0x128a, 0x128d }, + { 0x1290, 0x12b0 }, + { 0x12b2, 0x12b5 }, + { 0x12b8, 0x12be }, + { 0x12c0, 0x12c0 }, + { 0x12c2, 0x12c5 }, + { 0x12c8, 0x12d6 }, + { 0x12d8, 0x1310 }, + { 0x1312, 0x1315 }, + { 0x1318, 0x135a }, + { 0x135d, 0x135f }, + { 0x1369, 0x1371 }, + { 0x1380, 0x138f }, + { 0x13a0, 0x13f5 }, + { 0x13f8, 0x13fd }, + { 0x1401, 0x166c }, + { 0x166f, 0x167f }, + { 0x1681, 0x169a }, + { 0x16a0, 0x16ea }, + { 0x16ee, 0x16f8 }, + { 0x1700, 0x1715 }, + { 0x171f, 0x1734 }, + { 0x1740, 0x1753 }, + { 0x1760, 0x176c }, + { 0x176e, 0x1770 }, + { 0x1772, 0x1773 }, + { 0x1780, 0x17d3 }, + { 0x17d7, 0x17d7 }, + { 0x17dc, 0x17dd }, + { 0x17e0, 0x17e9 }, + { 0x180b, 0x180d }, + { 0x180f, 0x1819 }, + { 0x1820, 0x1878 }, + { 0x1880, 0x18aa }, + { 0x18b0, 0x18f5 }, + { 0x1900, 0x191e }, + { 0x1920, 0x192b }, + { 0x1930, 0x193b }, + { 0x1946, 0x196d }, + { 0x1970, 0x1974 }, + { 0x1980, 0x19ab }, + { 0x19b0, 0x19c9 }, + { 0x19d0, 0x19da }, + { 0x1a00, 0x1a1b }, + { 0x1a20, 0x1a5e }, + { 0x1a60, 0x1a7c }, + { 0x1a7f, 0x1a89 }, + { 0x1a90, 0x1a99 }, + { 0x1aa7, 0x1aa7 }, + { 0x1ab0, 0x1abd }, + { 0x1abf, 0x1ace }, + { 0x1b00, 0x1b4c }, + { 0x1b50, 0x1b59 }, + { 0x1b6b, 0x1b73 }, + { 0x1b80, 0x1bf3 }, + { 0x1c00, 0x1c37 }, + { 0x1c40, 0x1c49 }, + { 0x1c4d, 0x1c7d }, + { 0x1c80, 0x1c8a }, + { 0x1c90, 0x1cba }, + { 0x1cbd, 0x1cbf }, + { 0x1cd0, 0x1cd2 }, + { 0x1cd4, 0x1cfa }, + { 0x1d00, 0x1f15 }, + { 0x1f18, 0x1f1d }, + { 0x1f20, 0x1f45 }, + { 0x1f48, 0x1f4d }, + { 0x1f50, 0x1f57 }, + { 0x1f59, 0x1f59 }, + { 0x1f5b, 0x1f5b }, + { 0x1f5d, 0x1f5d }, + { 0x1f5f, 0x1f7d }, + { 0x1f80, 0x1fb4 }, + { 0x1fb6, 0x1fbc }, + { 0x1fbe, 0x1fbe }, + { 0x1fc2, 0x1fc4 }, + { 0x1fc6, 0x1fcc }, + { 0x1fd0, 0x1fd3 }, + { 0x1fd6, 0x1fdb }, + { 0x1fe0, 0x1fec }, + { 0x1ff2, 0x1ff4 }, + { 0x1ff6, 0x1ffc }, + { 0x200c, 0x200d }, + { 0x203f, 0x2040 }, + { 0x2054, 0x2054 }, + { 0x2071, 0x2071 }, + { 0x207f, 0x207f }, + { 0x2090, 0x209c }, + { 0x20d0, 0x20dc }, + { 0x20e1, 0x20e1 }, + { 0x20e5, 0x20f0 }, + { 0x2102, 0x2102 }, + { 0x2107, 0x2107 }, + { 0x210a, 0x2113 }, + { 0x2115, 0x2115 }, + { 0x2118, 0x211d }, + { 0x2124, 0x2124 }, + { 0x2126, 0x2126 }, + { 0x2128, 0x2128 }, + { 0x212a, 0x2139 }, + { 0x213c, 0x213f }, + { 0x2145, 0x2149 }, + { 0x214e, 0x214e }, + { 0x2160, 0x2188 }, + { 0x2c00, 0x2ce4 }, + { 0x2ceb, 0x2cf3 }, + { 0x2d00, 0x2d25 }, + { 0x2d27, 0x2d27 }, + { 0x2d2d, 0x2d2d }, + { 0x2d30, 0x2d67 }, + { 0x2d6f, 0x2d6f }, + { 0x2d7f, 0x2d96 }, + { 0x2da0, 0x2da6 }, + { 0x2da8, 0x2dae }, + { 0x2db0, 0x2db6 }, + { 0x2db8, 0x2dbe }, + { 0x2dc0, 0x2dc6 }, + { 0x2dc8, 0x2dce }, + { 0x2dd0, 0x2dd6 }, + { 0x2dd8, 0x2dde }, + { 0x2de0, 0x2dff }, + { 0x3005, 0x3007 }, + { 0x3021, 0x302f }, + { 0x3031, 0x3035 }, + { 0x3038, 0x303c }, + { 0x3041, 0x3096 }, + { 0x3099, 0x309a }, + { 0x309d, 0x309f }, + { 0x30a1, 0x30ff }, + { 0x3105, 0x312f }, + { 0x3131, 0x318e }, + { 0x31a0, 0x31bf }, + { 0x31f0, 0x31ff }, + { 0x3400, 0x4dbf }, + { 0x4e00, 0xa48c }, + { 0xa4d0, 0xa4fd }, + { 0xa500, 0xa60c }, + { 0xa610, 0xa62b }, + { 0xa640, 0xa66f }, + { 0xa674, 0xa67d }, + { 0xa67f, 0xa6f1 }, + { 0xa717, 0xa71f }, + { 0xa722, 0xa788 }, + { 0xa78b, 0xa7cd }, + { 0xa7d0, 0xa7d1 }, + { 0xa7d3, 0xa7d3 }, + { 0xa7d5, 0xa7dc }, + { 0xa7f2, 0xa827 }, + { 0xa82c, 0xa82c }, + { 0xa840, 0xa873 }, + { 0xa880, 0xa8c5 }, + { 0xa8d0, 0xa8d9 }, + { 0xa8e0, 0xa8f7 }, + { 0xa8fb, 0xa8fb }, + { 0xa8fd, 0xa92d }, + { 0xa930, 0xa953 }, + { 0xa960, 0xa97c }, + { 0xa980, 0xa9c0 }, + { 0xa9cf, 0xa9d9 }, + { 0xa9e0, 0xa9fe }, + { 0xaa00, 0xaa36 }, + { 0xaa40, 0xaa4d }, + { 0xaa50, 0xaa59 }, + { 0xaa60, 0xaa76 }, + { 0xaa7a, 0xaac2 }, + { 0xaadb, 0xaadd }, + { 0xaae0, 0xaaef }, + { 0xaaf2, 0xaaf6 }, + { 0xab01, 0xab06 }, + { 0xab09, 0xab0e }, + { 0xab11, 0xab16 }, + { 0xab20, 0xab26 }, + { 0xab28, 0xab2e }, + { 0xab30, 0xab5a }, + { 0xab5c, 0xab69 }, + { 0xab70, 0xabea }, + { 0xabec, 0xabed }, + { 0xabf0, 0xabf9 }, + { 0xac00, 0xd7a3 }, + { 0xd7b0, 0xd7c6 }, + { 0xd7cb, 0xd7fb }, + { 0xf900, 0xfa6d }, + { 0xfa70, 0xfad9 }, + { 0xfb00, 0xfb06 }, + { 0xfb13, 0xfb17 }, + { 0xfb1d, 0xfb28 }, + { 0xfb2a, 0xfb36 }, + { 0xfb38, 0xfb3c }, + { 0xfb3e, 0xfb3e }, + { 0xfb40, 0xfb41 }, + { 0xfb43, 0xfb44 }, + { 0xfb46, 0xfbb1 }, + { 0xfbd3, 0xfc5d }, + { 0xfc64, 0xfd3d }, + { 0xfd50, 0xfd8f }, + { 0xfd92, 0xfdc7 }, + { 0xfdf0, 0xfdf9 }, + { 0xfe00, 0xfe0f }, + { 0xfe20, 0xfe2f }, + { 0xfe33, 0xfe34 }, + { 0xfe4d, 0xfe4f }, + { 0xfe71, 0xfe71 }, + { 0xfe73, 0xfe73 }, + { 0xfe77, 0xfe77 }, + { 0xfe79, 0xfe79 }, + { 0xfe7b, 0xfe7b }, + { 0xfe7d, 0xfe7d }, + { 0xfe7f, 0xfefc }, + { 0xff10, 0xff19 }, + { 0xff21, 0xff3a }, + { 0xff3f, 0xff3f }, + { 0xff41, 0xff5a }, + { 0xff65, 0xffbe }, + { 0xffc2, 0xffc7 }, + { 0xffca, 0xffcf }, + { 0xffd2, 0xffd7 }, + { 0xffda, 0xffdc }, + { 0x10000, 0x1000b }, + { 0x1000d, 0x10026 }, + { 0x10028, 0x1003a }, + { 0x1003c, 0x1003d }, + { 0x1003f, 0x1004d }, + { 0x10050, 0x1005d }, + { 0x10080, 0x100fa }, + { 0x10140, 0x10174 }, + { 0x101fd, 0x101fd }, + { 0x10280, 0x1029c }, + { 0x102a0, 0x102d0 }, + { 0x102e0, 0x102e0 }, + { 0x10300, 0x1031f }, + { 0x1032d, 0x1034a }, + { 0x10350, 0x1037a }, + { 0x10380, 0x1039d }, + { 0x103a0, 0x103c3 }, + { 0x103c8, 0x103cf }, + { 0x103d1, 0x103d5 }, + { 0x10400, 0x1049d }, + { 0x104a0, 0x104a9 }, + { 0x104b0, 0x104d3 }, + { 0x104d8, 0x104fb }, + { 0x10500, 0x10527 }, + { 0x10530, 0x10563 }, + { 0x10570, 0x1057a }, + { 0x1057c, 0x1058a }, + { 0x1058c, 0x10592 }, + { 0x10594, 0x10595 }, + { 0x10597, 0x105a1 }, + { 0x105a3, 0x105b1 }, + { 0x105b3, 0x105b9 }, + { 0x105bb, 0x105bc }, + { 0x105c0, 0x105f3 }, + { 0x10600, 0x10736 }, + { 0x10740, 0x10755 }, + { 0x10760, 0x10767 }, + { 0x10780, 0x10785 }, + { 0x10787, 0x107b0 }, + { 0x107b2, 0x107ba }, + { 0x10800, 0x10805 }, + { 0x10808, 0x10808 }, + { 0x1080a, 0x10835 }, + { 0x10837, 0x10838 }, + { 0x1083c, 0x1083c }, + { 0x1083f, 0x10855 }, + { 0x10860, 0x10876 }, + { 0x10880, 0x1089e }, + { 0x108e0, 0x108f2 }, + { 0x108f4, 0x108f5 }, + { 0x10900, 0x10915 }, + { 0x10920, 0x10939 }, + { 0x10980, 0x109b7 }, + { 0x109be, 0x109bf }, + { 0x10a00, 0x10a03 }, + { 0x10a05, 0x10a06 }, + { 0x10a0c, 0x10a13 }, + { 0x10a15, 0x10a17 }, + { 0x10a19, 0x10a35 }, + { 0x10a38, 0x10a3a }, + { 0x10a3f, 0x10a3f }, + { 0x10a60, 0x10a7c }, + { 0x10a80, 0x10a9c }, + { 0x10ac0, 0x10ac7 }, + { 0x10ac9, 0x10ae6 }, + { 0x10b00, 0x10b35 }, + { 0x10b40, 0x10b55 }, + { 0x10b60, 0x10b72 }, + { 0x10b80, 0x10b91 }, + { 0x10c00, 0x10c48 }, + { 0x10c80, 0x10cb2 }, + { 0x10cc0, 0x10cf2 }, + { 0x10d00, 0x10d27 }, + { 0x10d30, 0x10d39 }, + { 0x10d40, 0x10d65 }, + { 0x10d69, 0x10d6d }, + { 0x10d6f, 0x10d85 }, + { 0x10e80, 0x10ea9 }, + { 0x10eab, 0x10eac }, + { 0x10eb0, 0x10eb1 }, + { 0x10ec2, 0x10ec4 }, + { 0x10efc, 0x10f1c }, + { 0x10f27, 0x10f27 }, + { 0x10f30, 0x10f50 }, + { 0x10f70, 0x10f85 }, + { 0x10fb0, 0x10fc4 }, + { 0x10fe0, 0x10ff6 }, + { 0x11000, 0x11046 }, + { 0x11066, 0x11075 }, + { 0x1107f, 0x110ba }, + { 0x110c2, 0x110c2 }, + { 0x110d0, 0x110e8 }, + { 0x110f0, 0x110f9 }, + { 0x11100, 0x11134 }, + { 0x11136, 0x1113f }, + { 0x11144, 0x11147 }, + { 0x11150, 0x11173 }, + { 0x11176, 0x11176 }, + { 0x11180, 0x111c4 }, + { 0x111c9, 0x111cc }, + { 0x111ce, 0x111da }, + { 0x111dc, 0x111dc }, + { 0x11200, 0x11211 }, + { 0x11213, 0x11237 }, + { 0x1123e, 0x11241 }, + { 0x11280, 0x11286 }, + { 0x11288, 0x11288 }, + { 0x1128a, 0x1128d }, + { 0x1128f, 0x1129d }, + { 0x1129f, 0x112a8 }, + { 0x112b0, 0x112ea }, + { 0x112f0, 0x112f9 }, + { 0x11300, 0x11303 }, + { 0x11305, 0x1130c }, + { 0x1130f, 0x11310 }, + { 0x11313, 0x11328 }, + { 0x1132a, 0x11330 }, + { 0x11332, 0x11333 }, + { 0x11335, 0x11339 }, + { 0x1133b, 0x11344 }, + { 0x11347, 0x11348 }, + { 0x1134b, 0x1134d }, + { 0x11350, 0x11350 }, + { 0x11357, 0x11357 }, + { 0x1135d, 0x11363 }, + { 0x11366, 0x1136c }, + { 0x11370, 0x11374 }, + { 0x11380, 0x11389 }, + { 0x1138b, 0x1138b }, + { 0x1138e, 0x1138e }, + { 0x11390, 0x113b5 }, + { 0x113b7, 0x113c0 }, + { 0x113c2, 0x113c2 }, + { 0x113c5, 0x113c5 }, + { 0x113c7, 0x113ca }, + { 0x113cc, 0x113d3 }, + { 0x113e1, 0x113e2 }, + { 0x11400, 0x1144a }, + { 0x11450, 0x11459 }, + { 0x1145e, 0x11461 }, + { 0x11480, 0x114c5 }, + { 0x114c7, 0x114c7 }, + { 0x114d0, 0x114d9 }, + { 0x11580, 0x115b5 }, + { 0x115b8, 0x115c0 }, + { 0x115d8, 0x115dd }, + { 0x11600, 0x11640 }, + { 0x11644, 0x11644 }, + { 0x11650, 0x11659 }, + { 0x11680, 0x116b8 }, + { 0x116c0, 0x116c9 }, + { 0x116d0, 0x116e3 }, + { 0x11700, 0x1171a }, + { 0x1171d, 0x1172b }, + { 0x11730, 0x11739 }, + { 0x11740, 0x11746 }, + { 0x11800, 0x1183a }, + { 0x118a0, 0x118e9 }, + { 0x118ff, 0x11906 }, + { 0x11909, 0x11909 }, + { 0x1190c, 0x11913 }, + { 0x11915, 0x11916 }, + { 0x11918, 0x11935 }, + { 0x11937, 0x11938 }, + { 0x1193b, 0x11943 }, + { 0x11950, 0x11959 }, + { 0x119a0, 0x119a7 }, + { 0x119aa, 0x119d7 }, + { 0x119da, 0x119e1 }, + { 0x119e3, 0x119e4 }, + { 0x11a00, 0x11a3e }, + { 0x11a47, 0x11a47 }, + { 0x11a50, 0x11a99 }, + { 0x11a9d, 0x11a9d }, + { 0x11ab0, 0x11af8 }, + { 0x11bc0, 0x11be0 }, + { 0x11bf0, 0x11bf9 }, + { 0x11c00, 0x11c08 }, + { 0x11c0a, 0x11c36 }, + { 0x11c38, 0x11c40 }, + { 0x11c50, 0x11c59 }, + { 0x11c72, 0x11c8f }, + { 0x11c92, 0x11ca7 }, + { 0x11ca9, 0x11cb6 }, + { 0x11d00, 0x11d06 }, + { 0x11d08, 0x11d09 }, + { 0x11d0b, 0x11d36 }, + { 0x11d3a, 0x11d3a }, + { 0x11d3c, 0x11d3d }, + { 0x11d3f, 0x11d47 }, + { 0x11d50, 0x11d59 }, + { 0x11d60, 0x11d65 }, + { 0x11d67, 0x11d68 }, + { 0x11d6a, 0x11d8e }, + { 0x11d90, 0x11d91 }, + { 0x11d93, 0x11d98 }, + { 0x11da0, 0x11da9 }, + { 0x11ee0, 0x11ef6 }, + { 0x11f00, 0x11f10 }, + { 0x11f12, 0x11f3a }, + { 0x11f3e, 0x11f42 }, + { 0x11f50, 0x11f5a }, + { 0x11fb0, 0x11fb0 }, + { 0x12000, 0x12399 }, + { 0x12400, 0x1246e }, + { 0x12480, 0x12543 }, + { 0x12f90, 0x12ff0 }, + { 0x13000, 0x1342f }, + { 0x13440, 0x13455 }, + { 0x13460, 0x143fa }, + { 0x14400, 0x14646 }, + { 0x16100, 0x16139 }, + { 0x16800, 0x16a38 }, + { 0x16a40, 0x16a5e }, + { 0x16a60, 0x16a69 }, + { 0x16a70, 0x16abe }, + { 0x16ac0, 0x16ac9 }, + { 0x16ad0, 0x16aed }, + { 0x16af0, 0x16af4 }, + { 0x16b00, 0x16b36 }, + { 0x16b40, 0x16b43 }, + { 0x16b50, 0x16b59 }, + { 0x16b63, 0x16b77 }, + { 0x16b7d, 0x16b8f }, + { 0x16d40, 0x16d6c }, + { 0x16d70, 0x16d79 }, + { 0x16e40, 0x16e7f }, + { 0x16f00, 0x16f4a }, + { 0x16f4f, 0x16f87 }, + { 0x16f8f, 0x16f9f }, + { 0x16fe0, 0x16fe1 }, + { 0x16fe3, 0x16fe4 }, + { 0x16ff0, 0x16ff1 }, + { 0x17000, 0x187f7 }, + { 0x18800, 0x18cd5 }, + { 0x18cff, 0x18d08 }, + { 0x1aff0, 0x1aff3 }, + { 0x1aff5, 0x1affb }, + { 0x1affd, 0x1affe }, + { 0x1b000, 0x1b122 }, + { 0x1b132, 0x1b132 }, + { 0x1b150, 0x1b152 }, + { 0x1b155, 0x1b155 }, + { 0x1b164, 0x1b167 }, + { 0x1b170, 0x1b2fb }, + { 0x1bc00, 0x1bc6a }, + { 0x1bc70, 0x1bc7c }, + { 0x1bc80, 0x1bc88 }, + { 0x1bc90, 0x1bc99 }, + { 0x1bc9d, 0x1bc9e }, + { 0x1ccf0, 0x1ccf9 }, + { 0x1cf00, 0x1cf2d }, + { 0x1cf30, 0x1cf46 }, + { 0x1d165, 0x1d169 }, + { 0x1d16d, 0x1d172 }, + { 0x1d17b, 0x1d182 }, + { 0x1d185, 0x1d18b }, + { 0x1d1aa, 0x1d1ad }, + { 0x1d242, 0x1d244 }, + { 0x1d400, 0x1d454 }, + { 0x1d456, 0x1d49c }, + { 0x1d49e, 0x1d49f }, + { 0x1d4a2, 0x1d4a2 }, + { 0x1d4a5, 0x1d4a6 }, + { 0x1d4a9, 0x1d4ac }, + { 0x1d4ae, 0x1d4b9 }, + { 0x1d4bb, 0x1d4bb }, + { 0x1d4bd, 0x1d4c3 }, + { 0x1d4c5, 0x1d505 }, + { 0x1d507, 0x1d50a }, + { 0x1d50d, 0x1d514 }, + { 0x1d516, 0x1d51c }, + { 0x1d51e, 0x1d539 }, + { 0x1d53b, 0x1d53e }, + { 0x1d540, 0x1d544 }, + { 0x1d546, 0x1d546 }, + { 0x1d54a, 0x1d550 }, + { 0x1d552, 0x1d6a5 }, + { 0x1d6a8, 0x1d6c0 }, + { 0x1d6c2, 0x1d6da }, + { 0x1d6dc, 0x1d6fa }, + { 0x1d6fc, 0x1d714 }, + { 0x1d716, 0x1d734 }, + { 0x1d736, 0x1d74e }, + { 0x1d750, 0x1d76e }, + { 0x1d770, 0x1d788 }, + { 0x1d78a, 0x1d7a8 }, + { 0x1d7aa, 0x1d7c2 }, + { 0x1d7c4, 0x1d7cb }, + { 0x1d7ce, 0x1d7ff }, + { 0x1da00, 0x1da36 }, + { 0x1da3b, 0x1da6c }, + { 0x1da75, 0x1da75 }, + { 0x1da84, 0x1da84 }, + { 0x1da9b, 0x1da9f }, + { 0x1daa1, 0x1daaf }, + { 0x1df00, 0x1df1e }, + { 0x1df25, 0x1df2a }, + { 0x1e000, 0x1e006 }, + { 0x1e008, 0x1e018 }, + { 0x1e01b, 0x1e021 }, + { 0x1e023, 0x1e024 }, + { 0x1e026, 0x1e02a }, + { 0x1e030, 0x1e06d }, + { 0x1e08f, 0x1e08f }, + { 0x1e100, 0x1e12c }, + { 0x1e130, 0x1e13d }, + { 0x1e140, 0x1e149 }, + { 0x1e14e, 0x1e14e }, + { 0x1e290, 0x1e2ae }, + { 0x1e2c0, 0x1e2f9 }, + { 0x1e4d0, 0x1e4f9 }, + { 0x1e5d0, 0x1e5fa }, + { 0x1e7e0, 0x1e7e6 }, + { 0x1e7e8, 0x1e7eb }, + { 0x1e7ed, 0x1e7ee }, + { 0x1e7f0, 0x1e7fe }, + { 0x1e800, 0x1e8c4 }, + { 0x1e8d0, 0x1e8d6 }, + { 0x1e900, 0x1e94b }, + { 0x1e950, 0x1e959 }, + { 0x1ee00, 0x1ee03 }, + { 0x1ee05, 0x1ee1f }, + { 0x1ee21, 0x1ee22 }, + { 0x1ee24, 0x1ee24 }, + { 0x1ee27, 0x1ee27 }, + { 0x1ee29, 0x1ee32 }, + { 0x1ee34, 0x1ee37 }, + { 0x1ee39, 0x1ee39 }, + { 0x1ee3b, 0x1ee3b }, + { 0x1ee42, 0x1ee42 }, + { 0x1ee47, 0x1ee47 }, + { 0x1ee49, 0x1ee49 }, + { 0x1ee4b, 0x1ee4b }, + { 0x1ee4d, 0x1ee4f }, + { 0x1ee51, 0x1ee52 }, + { 0x1ee54, 0x1ee54 }, + { 0x1ee57, 0x1ee57 }, + { 0x1ee59, 0x1ee59 }, + { 0x1ee5b, 0x1ee5b }, + { 0x1ee5d, 0x1ee5d }, + { 0x1ee5f, 0x1ee5f }, + { 0x1ee61, 0x1ee62 }, + { 0x1ee64, 0x1ee64 }, + { 0x1ee67, 0x1ee6a }, + { 0x1ee6c, 0x1ee72 }, + { 0x1ee74, 0x1ee77 }, + { 0x1ee79, 0x1ee7c }, + { 0x1ee7e, 0x1ee7e }, + { 0x1ee80, 0x1ee89 }, + { 0x1ee8b, 0x1ee9b }, + { 0x1eea1, 0x1eea3 }, + { 0x1eea5, 0x1eea9 }, + { 0x1eeab, 0x1eebb }, + { 0x1fbf0, 0x1fbf9 }, + { 0x20000, 0x2a6df }, + { 0x2a700, 0x2b739 }, + { 0x2b740, 0x2b81d }, + { 0x2b820, 0x2cea1 }, + { 0x2ceb0, 0x2ebe0 }, + { 0x2ebf0, 0x2ee5d }, + { 0x2f800, 0x2fa1d }, + { 0x30000, 0x3134a }, + { 0x31350, 0x323af }, + { 0xe0100, 0xe01ef }, +}; + +constexpr inline CharRange uppercase_letter[] = { + { 0x41, 0x5a }, + { 0xc0, 0xd6 }, + { 0xd8, 0xde }, + { 0x100, 0x100 }, + { 0x102, 0x102 }, + { 0x104, 0x104 }, + { 0x106, 0x106 }, + { 0x108, 0x108 }, + { 0x10a, 0x10a }, + { 0x10c, 0x10c }, + { 0x10e, 0x10e }, + { 0x110, 0x110 }, + { 0x112, 0x112 }, + { 0x114, 0x114 }, + { 0x116, 0x116 }, + { 0x118, 0x118 }, + { 0x11a, 0x11a }, + { 0x11c, 0x11c }, + { 0x11e, 0x11e }, + { 0x120, 0x120 }, + { 0x122, 0x122 }, + { 0x124, 0x124 }, + { 0x126, 0x126 }, + { 0x128, 0x128 }, + { 0x12a, 0x12a }, + { 0x12c, 0x12c }, + { 0x12e, 0x12e }, + { 0x130, 0x130 }, + { 0x132, 0x132 }, + { 0x134, 0x134 }, + { 0x136, 0x136 }, + { 0x139, 0x139 }, + { 0x13b, 0x13b }, + { 0x13d, 0x13d }, + { 0x13f, 0x13f }, + { 0x141, 0x141 }, + { 0x143, 0x143 }, + { 0x145, 0x145 }, + { 0x147, 0x147 }, + { 0x14a, 0x14a }, + { 0x14c, 0x14c }, + { 0x14e, 0x14e }, + { 0x150, 0x150 }, + { 0x152, 0x152 }, + { 0x154, 0x154 }, + { 0x156, 0x156 }, + { 0x158, 0x158 }, + { 0x15a, 0x15a }, + { 0x15c, 0x15c }, + { 0x15e, 0x15e }, + { 0x160, 0x160 }, + { 0x162, 0x162 }, + { 0x164, 0x164 }, + { 0x166, 0x166 }, + { 0x168, 0x168 }, + { 0x16a, 0x16a }, + { 0x16c, 0x16c }, + { 0x16e, 0x16e }, + { 0x170, 0x170 }, + { 0x172, 0x172 }, + { 0x174, 0x174 }, + { 0x176, 0x176 }, + { 0x178, 0x179 }, + { 0x17b, 0x17b }, + { 0x17d, 0x17d }, + { 0x181, 0x182 }, + { 0x184, 0x184 }, + { 0x186, 0x187 }, + { 0x189, 0x18b }, + { 0x18e, 0x191 }, + { 0x193, 0x194 }, + { 0x196, 0x198 }, + { 0x19c, 0x19d }, + { 0x19f, 0x1a0 }, + { 0x1a2, 0x1a2 }, + { 0x1a4, 0x1a4 }, + { 0x1a6, 0x1a7 }, + { 0x1a9, 0x1a9 }, + { 0x1ac, 0x1ac }, + { 0x1ae, 0x1af }, + { 0x1b1, 0x1b3 }, + { 0x1b5, 0x1b5 }, + { 0x1b7, 0x1b8 }, + { 0x1bc, 0x1bc }, + { 0x1c4, 0x1c4 }, + { 0x1c7, 0x1c7 }, + { 0x1ca, 0x1ca }, + { 0x1cd, 0x1cd }, + { 0x1cf, 0x1cf }, + { 0x1d1, 0x1d1 }, + { 0x1d3, 0x1d3 }, + { 0x1d5, 0x1d5 }, + { 0x1d7, 0x1d7 }, + { 0x1d9, 0x1d9 }, + { 0x1db, 0x1db }, + { 0x1de, 0x1de }, + { 0x1e0, 0x1e0 }, + { 0x1e2, 0x1e2 }, + { 0x1e4, 0x1e4 }, + { 0x1e6, 0x1e6 }, + { 0x1e8, 0x1e8 }, + { 0x1ea, 0x1ea }, + { 0x1ec, 0x1ec }, + { 0x1ee, 0x1ee }, + { 0x1f1, 0x1f1 }, + { 0x1f4, 0x1f4 }, + { 0x1f6, 0x1f8 }, + { 0x1fa, 0x1fa }, + { 0x1fc, 0x1fc }, + { 0x1fe, 0x1fe }, + { 0x200, 0x200 }, + { 0x202, 0x202 }, + { 0x204, 0x204 }, + { 0x206, 0x206 }, + { 0x208, 0x208 }, + { 0x20a, 0x20a }, + { 0x20c, 0x20c }, + { 0x20e, 0x20e }, + { 0x210, 0x210 }, + { 0x212, 0x212 }, + { 0x214, 0x214 }, + { 0x216, 0x216 }, + { 0x218, 0x218 }, + { 0x21a, 0x21a }, + { 0x21c, 0x21c }, + { 0x21e, 0x21e }, + { 0x220, 0x220 }, + { 0x222, 0x222 }, + { 0x224, 0x224 }, + { 0x226, 0x226 }, + { 0x228, 0x228 }, + { 0x22a, 0x22a }, + { 0x22c, 0x22c }, + { 0x22e, 0x22e }, + { 0x230, 0x230 }, + { 0x232, 0x232 }, + { 0x23a, 0x23b }, + { 0x23d, 0x23e }, + { 0x241, 0x241 }, + { 0x243, 0x246 }, + { 0x248, 0x248 }, + { 0x24a, 0x24a }, + { 0x24c, 0x24c }, + { 0x24e, 0x24e }, + { 0x370, 0x370 }, + { 0x372, 0x372 }, + { 0x376, 0x376 }, + { 0x37f, 0x37f }, + { 0x386, 0x386 }, + { 0x388, 0x38a }, + { 0x38c, 0x38c }, + { 0x38e, 0x38f }, + { 0x391, 0x3a1 }, + { 0x3a3, 0x3ab }, + { 0x3cf, 0x3cf }, + { 0x3d2, 0x3d4 }, + { 0x3d8, 0x3d8 }, + { 0x3da, 0x3da }, + { 0x3dc, 0x3dc }, + { 0x3de, 0x3de }, + { 0x3e0, 0x3e0 }, + { 0x3e2, 0x3e2 }, + { 0x3e4, 0x3e4 }, + { 0x3e6, 0x3e6 }, + { 0x3e8, 0x3e8 }, + { 0x3ea, 0x3ea }, + { 0x3ec, 0x3ec }, + { 0x3ee, 0x3ee }, + { 0x3f4, 0x3f4 }, + { 0x3f7, 0x3f7 }, + { 0x3f9, 0x3fa }, + { 0x3fd, 0x42f }, + { 0x460, 0x460 }, + { 0x462, 0x462 }, + { 0x464, 0x464 }, + { 0x466, 0x466 }, + { 0x468, 0x468 }, + { 0x46a, 0x46a }, + { 0x46c, 0x46c }, + { 0x46e, 0x46e }, + { 0x470, 0x470 }, + { 0x472, 0x472 }, + { 0x474, 0x474 }, + { 0x476, 0x476 }, + { 0x478, 0x478 }, + { 0x47a, 0x47a }, + { 0x47c, 0x47c }, + { 0x47e, 0x47e }, + { 0x480, 0x480 }, + { 0x48a, 0x48a }, + { 0x48c, 0x48c }, + { 0x48e, 0x48e }, + { 0x490, 0x490 }, + { 0x492, 0x492 }, + { 0x494, 0x494 }, + { 0x496, 0x496 }, + { 0x498, 0x498 }, + { 0x49a, 0x49a }, + { 0x49c, 0x49c }, + { 0x49e, 0x49e }, + { 0x4a0, 0x4a0 }, + { 0x4a2, 0x4a2 }, + { 0x4a4, 0x4a4 }, + { 0x4a6, 0x4a6 }, + { 0x4a8, 0x4a8 }, + { 0x4aa, 0x4aa }, + { 0x4ac, 0x4ac }, + { 0x4ae, 0x4ae }, + { 0x4b0, 0x4b0 }, + { 0x4b2, 0x4b2 }, + { 0x4b4, 0x4b4 }, + { 0x4b6, 0x4b6 }, + { 0x4b8, 0x4b8 }, + { 0x4ba, 0x4ba }, + { 0x4bc, 0x4bc }, + { 0x4be, 0x4be }, + { 0x4c0, 0x4c1 }, + { 0x4c3, 0x4c3 }, + { 0x4c5, 0x4c5 }, + { 0x4c7, 0x4c7 }, + { 0x4c9, 0x4c9 }, + { 0x4cb, 0x4cb }, + { 0x4cd, 0x4cd }, + { 0x4d0, 0x4d0 }, + { 0x4d2, 0x4d2 }, + { 0x4d4, 0x4d4 }, + { 0x4d6, 0x4d6 }, + { 0x4d8, 0x4d8 }, + { 0x4da, 0x4da }, + { 0x4dc, 0x4dc }, + { 0x4de, 0x4de }, + { 0x4e0, 0x4e0 }, + { 0x4e2, 0x4e2 }, + { 0x4e4, 0x4e4 }, + { 0x4e6, 0x4e6 }, + { 0x4e8, 0x4e8 }, + { 0x4ea, 0x4ea }, + { 0x4ec, 0x4ec }, + { 0x4ee, 0x4ee }, + { 0x4f0, 0x4f0 }, + { 0x4f2, 0x4f2 }, + { 0x4f4, 0x4f4 }, + { 0x4f6, 0x4f6 }, + { 0x4f8, 0x4f8 }, + { 0x4fa, 0x4fa }, + { 0x4fc, 0x4fc }, + { 0x4fe, 0x4fe }, + { 0x500, 0x500 }, + { 0x502, 0x502 }, + { 0x504, 0x504 }, + { 0x506, 0x506 }, + { 0x508, 0x508 }, + { 0x50a, 0x50a }, + { 0x50c, 0x50c }, + { 0x50e, 0x50e }, + { 0x510, 0x510 }, + { 0x512, 0x512 }, + { 0x514, 0x514 }, + { 0x516, 0x516 }, + { 0x518, 0x518 }, + { 0x51a, 0x51a }, + { 0x51c, 0x51c }, + { 0x51e, 0x51e }, + { 0x520, 0x520 }, + { 0x522, 0x522 }, + { 0x524, 0x524 }, + { 0x526, 0x526 }, + { 0x528, 0x528 }, + { 0x52a, 0x52a }, + { 0x52c, 0x52c }, + { 0x52e, 0x52e }, + { 0x531, 0x556 }, + { 0x10a0, 0x10c5 }, + { 0x10c7, 0x10c7 }, + { 0x10cd, 0x10cd }, + { 0x13a0, 0x13f5 }, + { 0x1c89, 0x1c89 }, + { 0x1c90, 0x1cba }, + { 0x1cbd, 0x1cbf }, + { 0x1e00, 0x1e00 }, + { 0x1e02, 0x1e02 }, + { 0x1e04, 0x1e04 }, + { 0x1e06, 0x1e06 }, + { 0x1e08, 0x1e08 }, + { 0x1e0a, 0x1e0a }, + { 0x1e0c, 0x1e0c }, + { 0x1e0e, 0x1e0e }, + { 0x1e10, 0x1e10 }, + { 0x1e12, 0x1e12 }, + { 0x1e14, 0x1e14 }, + { 0x1e16, 0x1e16 }, + { 0x1e18, 0x1e18 }, + { 0x1e1a, 0x1e1a }, + { 0x1e1c, 0x1e1c }, + { 0x1e1e, 0x1e1e }, + { 0x1e20, 0x1e20 }, + { 0x1e22, 0x1e22 }, + { 0x1e24, 0x1e24 }, + { 0x1e26, 0x1e26 }, + { 0x1e28, 0x1e28 }, + { 0x1e2a, 0x1e2a }, + { 0x1e2c, 0x1e2c }, + { 0x1e2e, 0x1e2e }, + { 0x1e30, 0x1e30 }, + { 0x1e32, 0x1e32 }, + { 0x1e34, 0x1e34 }, + { 0x1e36, 0x1e36 }, + { 0x1e38, 0x1e38 }, + { 0x1e3a, 0x1e3a }, + { 0x1e3c, 0x1e3c }, + { 0x1e3e, 0x1e3e }, + { 0x1e40, 0x1e40 }, + { 0x1e42, 0x1e42 }, + { 0x1e44, 0x1e44 }, + { 0x1e46, 0x1e46 }, + { 0x1e48, 0x1e48 }, + { 0x1e4a, 0x1e4a }, + { 0x1e4c, 0x1e4c }, + { 0x1e4e, 0x1e4e }, + { 0x1e50, 0x1e50 }, + { 0x1e52, 0x1e52 }, + { 0x1e54, 0x1e54 }, + { 0x1e56, 0x1e56 }, + { 0x1e58, 0x1e58 }, + { 0x1e5a, 0x1e5a }, + { 0x1e5c, 0x1e5c }, + { 0x1e5e, 0x1e5e }, + { 0x1e60, 0x1e60 }, + { 0x1e62, 0x1e62 }, + { 0x1e64, 0x1e64 }, + { 0x1e66, 0x1e66 }, + { 0x1e68, 0x1e68 }, + { 0x1e6a, 0x1e6a }, + { 0x1e6c, 0x1e6c }, + { 0x1e6e, 0x1e6e }, + { 0x1e70, 0x1e70 }, + { 0x1e72, 0x1e72 }, + { 0x1e74, 0x1e74 }, + { 0x1e76, 0x1e76 }, + { 0x1e78, 0x1e78 }, + { 0x1e7a, 0x1e7a }, + { 0x1e7c, 0x1e7c }, + { 0x1e7e, 0x1e7e }, + { 0x1e80, 0x1e80 }, + { 0x1e82, 0x1e82 }, + { 0x1e84, 0x1e84 }, + { 0x1e86, 0x1e86 }, + { 0x1e88, 0x1e88 }, + { 0x1e8a, 0x1e8a }, + { 0x1e8c, 0x1e8c }, + { 0x1e8e, 0x1e8e }, + { 0x1e90, 0x1e90 }, + { 0x1e92, 0x1e92 }, + { 0x1e94, 0x1e94 }, + { 0x1e9e, 0x1e9e }, + { 0x1ea0, 0x1ea0 }, + { 0x1ea2, 0x1ea2 }, + { 0x1ea4, 0x1ea4 }, + { 0x1ea6, 0x1ea6 }, + { 0x1ea8, 0x1ea8 }, + { 0x1eaa, 0x1eaa }, + { 0x1eac, 0x1eac }, + { 0x1eae, 0x1eae }, + { 0x1eb0, 0x1eb0 }, + { 0x1eb2, 0x1eb2 }, + { 0x1eb4, 0x1eb4 }, + { 0x1eb6, 0x1eb6 }, + { 0x1eb8, 0x1eb8 }, + { 0x1eba, 0x1eba }, + { 0x1ebc, 0x1ebc }, + { 0x1ebe, 0x1ebe }, + { 0x1ec0, 0x1ec0 }, + { 0x1ec2, 0x1ec2 }, + { 0x1ec4, 0x1ec4 }, + { 0x1ec6, 0x1ec6 }, + { 0x1ec8, 0x1ec8 }, + { 0x1eca, 0x1eca }, + { 0x1ecc, 0x1ecc }, + { 0x1ece, 0x1ece }, + { 0x1ed0, 0x1ed0 }, + { 0x1ed2, 0x1ed2 }, + { 0x1ed4, 0x1ed4 }, + { 0x1ed6, 0x1ed6 }, + { 0x1ed8, 0x1ed8 }, + { 0x1eda, 0x1eda }, + { 0x1edc, 0x1edc }, + { 0x1ede, 0x1ede }, + { 0x1ee0, 0x1ee0 }, + { 0x1ee2, 0x1ee2 }, + { 0x1ee4, 0x1ee4 }, + { 0x1ee6, 0x1ee6 }, + { 0x1ee8, 0x1ee8 }, + { 0x1eea, 0x1eea }, + { 0x1eec, 0x1eec }, + { 0x1eee, 0x1eee }, + { 0x1ef0, 0x1ef0 }, + { 0x1ef2, 0x1ef2 }, + { 0x1ef4, 0x1ef4 }, + { 0x1ef6, 0x1ef6 }, + { 0x1ef8, 0x1ef8 }, + { 0x1efa, 0x1efa }, + { 0x1efc, 0x1efc }, + { 0x1efe, 0x1efe }, + { 0x1f08, 0x1f0f }, + { 0x1f18, 0x1f1d }, + { 0x1f28, 0x1f2f }, + { 0x1f38, 0x1f3f }, + { 0x1f48, 0x1f4d }, + { 0x1f59, 0x1f59 }, + { 0x1f5b, 0x1f5b }, + { 0x1f5d, 0x1f5d }, + { 0x1f5f, 0x1f5f }, + { 0x1f68, 0x1f6f }, + { 0x1fb8, 0x1fbb }, + { 0x1fc8, 0x1fcb }, + { 0x1fd8, 0x1fdb }, + { 0x1fe8, 0x1fec }, + { 0x1ff8, 0x1ffb }, + { 0x2102, 0x2102 }, + { 0x2107, 0x2107 }, + { 0x210b, 0x210d }, + { 0x2110, 0x2112 }, + { 0x2115, 0x2115 }, + { 0x2119, 0x211d }, + { 0x2124, 0x2124 }, + { 0x2126, 0x2126 }, + { 0x2128, 0x2128 }, + { 0x212a, 0x212d }, + { 0x2130, 0x2133 }, + { 0x213e, 0x213f }, + { 0x2145, 0x2145 }, + { 0x2160, 0x216f }, + { 0x2183, 0x2183 }, + { 0x24b6, 0x24cf }, + { 0x2c00, 0x2c2f }, + { 0x2c60, 0x2c60 }, + { 0x2c62, 0x2c64 }, + { 0x2c67, 0x2c67 }, + { 0x2c69, 0x2c69 }, + { 0x2c6b, 0x2c6b }, + { 0x2c6d, 0x2c70 }, + { 0x2c72, 0x2c72 }, + { 0x2c75, 0x2c75 }, + { 0x2c7e, 0x2c80 }, + { 0x2c82, 0x2c82 }, + { 0x2c84, 0x2c84 }, + { 0x2c86, 0x2c86 }, + { 0x2c88, 0x2c88 }, + { 0x2c8a, 0x2c8a }, + { 0x2c8c, 0x2c8c }, + { 0x2c8e, 0x2c8e }, + { 0x2c90, 0x2c90 }, + { 0x2c92, 0x2c92 }, + { 0x2c94, 0x2c94 }, + { 0x2c96, 0x2c96 }, + { 0x2c98, 0x2c98 }, + { 0x2c9a, 0x2c9a }, + { 0x2c9c, 0x2c9c }, + { 0x2c9e, 0x2c9e }, + { 0x2ca0, 0x2ca0 }, + { 0x2ca2, 0x2ca2 }, + { 0x2ca4, 0x2ca4 }, + { 0x2ca6, 0x2ca6 }, + { 0x2ca8, 0x2ca8 }, + { 0x2caa, 0x2caa }, + { 0x2cac, 0x2cac }, + { 0x2cae, 0x2cae }, + { 0x2cb0, 0x2cb0 }, + { 0x2cb2, 0x2cb2 }, + { 0x2cb4, 0x2cb4 }, + { 0x2cb6, 0x2cb6 }, + { 0x2cb8, 0x2cb8 }, + { 0x2cba, 0x2cba }, + { 0x2cbc, 0x2cbc }, + { 0x2cbe, 0x2cbe }, + { 0x2cc0, 0x2cc0 }, + { 0x2cc2, 0x2cc2 }, + { 0x2cc4, 0x2cc4 }, + { 0x2cc6, 0x2cc6 }, + { 0x2cc8, 0x2cc8 }, + { 0x2cca, 0x2cca }, + { 0x2ccc, 0x2ccc }, + { 0x2cce, 0x2cce }, + { 0x2cd0, 0x2cd0 }, + { 0x2cd2, 0x2cd2 }, + { 0x2cd4, 0x2cd4 }, + { 0x2cd6, 0x2cd6 }, + { 0x2cd8, 0x2cd8 }, + { 0x2cda, 0x2cda }, + { 0x2cdc, 0x2cdc }, + { 0x2cde, 0x2cde }, + { 0x2ce0, 0x2ce0 }, + { 0x2ce2, 0x2ce2 }, + { 0x2ceb, 0x2ceb }, + { 0x2ced, 0x2ced }, + { 0x2cf2, 0x2cf2 }, + { 0xa640, 0xa640 }, + { 0xa642, 0xa642 }, + { 0xa644, 0xa644 }, + { 0xa646, 0xa646 }, + { 0xa648, 0xa648 }, + { 0xa64a, 0xa64a }, + { 0xa64c, 0xa64c }, + { 0xa64e, 0xa64e }, + { 0xa650, 0xa650 }, + { 0xa652, 0xa652 }, + { 0xa654, 0xa654 }, + { 0xa656, 0xa656 }, + { 0xa658, 0xa658 }, + { 0xa65a, 0xa65a }, + { 0xa65c, 0xa65c }, + { 0xa65e, 0xa65e }, + { 0xa660, 0xa660 }, + { 0xa662, 0xa662 }, + { 0xa664, 0xa664 }, + { 0xa666, 0xa666 }, + { 0xa668, 0xa668 }, + { 0xa66a, 0xa66a }, + { 0xa66c, 0xa66c }, + { 0xa680, 0xa680 }, + { 0xa682, 0xa682 }, + { 0xa684, 0xa684 }, + { 0xa686, 0xa686 }, + { 0xa688, 0xa688 }, + { 0xa68a, 0xa68a }, + { 0xa68c, 0xa68c }, + { 0xa68e, 0xa68e }, + { 0xa690, 0xa690 }, + { 0xa692, 0xa692 }, + { 0xa694, 0xa694 }, + { 0xa696, 0xa696 }, + { 0xa698, 0xa698 }, + { 0xa69a, 0xa69a }, + { 0xa722, 0xa722 }, + { 0xa724, 0xa724 }, + { 0xa726, 0xa726 }, + { 0xa728, 0xa728 }, + { 0xa72a, 0xa72a }, + { 0xa72c, 0xa72c }, + { 0xa72e, 0xa72e }, + { 0xa732, 0xa732 }, + { 0xa734, 0xa734 }, + { 0xa736, 0xa736 }, + { 0xa738, 0xa738 }, + { 0xa73a, 0xa73a }, + { 0xa73c, 0xa73c }, + { 0xa73e, 0xa73e }, + { 0xa740, 0xa740 }, + { 0xa742, 0xa742 }, + { 0xa744, 0xa744 }, + { 0xa746, 0xa746 }, + { 0xa748, 0xa748 }, + { 0xa74a, 0xa74a }, + { 0xa74c, 0xa74c }, + { 0xa74e, 0xa74e }, + { 0xa750, 0xa750 }, + { 0xa752, 0xa752 }, + { 0xa754, 0xa754 }, + { 0xa756, 0xa756 }, + { 0xa758, 0xa758 }, + { 0xa75a, 0xa75a }, + { 0xa75c, 0xa75c }, + { 0xa75e, 0xa75e }, + { 0xa760, 0xa760 }, + { 0xa762, 0xa762 }, + { 0xa764, 0xa764 }, + { 0xa766, 0xa766 }, + { 0xa768, 0xa768 }, + { 0xa76a, 0xa76a }, + { 0xa76c, 0xa76c }, + { 0xa76e, 0xa76e }, + { 0xa779, 0xa779 }, + { 0xa77b, 0xa77b }, + { 0xa77d, 0xa77e }, + { 0xa780, 0xa780 }, + { 0xa782, 0xa782 }, + { 0xa784, 0xa784 }, + { 0xa786, 0xa786 }, + { 0xa78b, 0xa78b }, + { 0xa78d, 0xa78d }, + { 0xa790, 0xa790 }, + { 0xa792, 0xa792 }, + { 0xa796, 0xa796 }, + { 0xa798, 0xa798 }, + { 0xa79a, 0xa79a }, + { 0xa79c, 0xa79c }, + { 0xa79e, 0xa79e }, + { 0xa7a0, 0xa7a0 }, + { 0xa7a2, 0xa7a2 }, + { 0xa7a4, 0xa7a4 }, + { 0xa7a6, 0xa7a6 }, + { 0xa7a8, 0xa7a8 }, + { 0xa7aa, 0xa7ae }, + { 0xa7b0, 0xa7b4 }, + { 0xa7b6, 0xa7b6 }, + { 0xa7b8, 0xa7b8 }, + { 0xa7ba, 0xa7ba }, + { 0xa7bc, 0xa7bc }, + { 0xa7be, 0xa7be }, + { 0xa7c0, 0xa7c0 }, + { 0xa7c2, 0xa7c2 }, + { 0xa7c4, 0xa7c7 }, + { 0xa7c9, 0xa7c9 }, + { 0xa7cb, 0xa7cc }, + { 0xa7d0, 0xa7d0 }, + { 0xa7d6, 0xa7d6 }, + { 0xa7d8, 0xa7d8 }, + { 0xa7da, 0xa7da }, + { 0xa7dc, 0xa7dc }, + { 0xa7f5, 0xa7f5 }, + { 0xff21, 0xff3a }, + { 0x10400, 0x10427 }, + { 0x104b0, 0x104d3 }, + { 0x10570, 0x1057a }, + { 0x1057c, 0x1058a }, + { 0x1058c, 0x10592 }, + { 0x10594, 0x10595 }, + { 0x10c80, 0x10cb2 }, + { 0x10d50, 0x10d65 }, + { 0x118a0, 0x118bf }, + { 0x16e40, 0x16e5f }, + { 0x1d400, 0x1d419 }, + { 0x1d434, 0x1d44d }, + { 0x1d468, 0x1d481 }, + { 0x1d49c, 0x1d49c }, + { 0x1d49e, 0x1d49f }, + { 0x1d4a2, 0x1d4a2 }, + { 0x1d4a5, 0x1d4a6 }, + { 0x1d4a9, 0x1d4ac }, + { 0x1d4ae, 0x1d4b5 }, + { 0x1d4d0, 0x1d4e9 }, + { 0x1d504, 0x1d505 }, + { 0x1d507, 0x1d50a }, + { 0x1d50d, 0x1d514 }, + { 0x1d516, 0x1d51c }, + { 0x1d538, 0x1d539 }, + { 0x1d53b, 0x1d53e }, + { 0x1d540, 0x1d544 }, + { 0x1d546, 0x1d546 }, + { 0x1d54a, 0x1d550 }, + { 0x1d56c, 0x1d585 }, + { 0x1d5a0, 0x1d5b9 }, + { 0x1d5d4, 0x1d5ed }, + { 0x1d608, 0x1d621 }, + { 0x1d63c, 0x1d655 }, + { 0x1d670, 0x1d689 }, + { 0x1d6a8, 0x1d6c0 }, + { 0x1d6e2, 0x1d6fa }, + { 0x1d71c, 0x1d734 }, + { 0x1d756, 0x1d76e }, + { 0x1d790, 0x1d7a8 }, + { 0x1d7ca, 0x1d7ca }, + { 0x1e900, 0x1e921 }, + { 0x1f130, 0x1f149 }, + { 0x1f150, 0x1f169 }, + { 0x1f170, 0x1f189 }, +}; + +constexpr inline CharRange lowercase_letter[] = { + { 0x61, 0x7a }, + { 0xaa, 0xaa }, + { 0xb5, 0xb5 }, + { 0xba, 0xba }, + { 0xdf, 0xf6 }, + { 0xf8, 0xff }, + { 0x101, 0x101 }, + { 0x103, 0x103 }, + { 0x105, 0x105 }, + { 0x107, 0x107 }, + { 0x109, 0x109 }, + { 0x10b, 0x10b }, + { 0x10d, 0x10d }, + { 0x10f, 0x10f }, + { 0x111, 0x111 }, + { 0x113, 0x113 }, + { 0x115, 0x115 }, + { 0x117, 0x117 }, + { 0x119, 0x119 }, + { 0x11b, 0x11b }, + { 0x11d, 0x11d }, + { 0x11f, 0x11f }, + { 0x121, 0x121 }, + { 0x123, 0x123 }, + { 0x125, 0x125 }, + { 0x127, 0x127 }, + { 0x129, 0x129 }, + { 0x12b, 0x12b }, + { 0x12d, 0x12d }, + { 0x12f, 0x12f }, + { 0x131, 0x131 }, + { 0x133, 0x133 }, + { 0x135, 0x135 }, + { 0x137, 0x138 }, + { 0x13a, 0x13a }, + { 0x13c, 0x13c }, + { 0x13e, 0x13e }, + { 0x140, 0x140 }, + { 0x142, 0x142 }, + { 0x144, 0x144 }, + { 0x146, 0x146 }, + { 0x148, 0x149 }, + { 0x14b, 0x14b }, + { 0x14d, 0x14d }, + { 0x14f, 0x14f }, + { 0x151, 0x151 }, + { 0x153, 0x153 }, + { 0x155, 0x155 }, + { 0x157, 0x157 }, + { 0x159, 0x159 }, + { 0x15b, 0x15b }, + { 0x15d, 0x15d }, + { 0x15f, 0x15f }, + { 0x161, 0x161 }, + { 0x163, 0x163 }, + { 0x165, 0x165 }, + { 0x167, 0x167 }, + { 0x169, 0x169 }, + { 0x16b, 0x16b }, + { 0x16d, 0x16d }, + { 0x16f, 0x16f }, + { 0x171, 0x171 }, + { 0x173, 0x173 }, + { 0x175, 0x175 }, + { 0x177, 0x177 }, + { 0x17a, 0x17a }, + { 0x17c, 0x17c }, + { 0x17e, 0x180 }, + { 0x183, 0x183 }, + { 0x185, 0x185 }, + { 0x188, 0x188 }, + { 0x18c, 0x18d }, + { 0x192, 0x192 }, + { 0x195, 0x195 }, + { 0x199, 0x19b }, + { 0x19e, 0x19e }, + { 0x1a1, 0x1a1 }, + { 0x1a3, 0x1a3 }, + { 0x1a5, 0x1a5 }, + { 0x1a8, 0x1a8 }, + { 0x1aa, 0x1ab }, + { 0x1ad, 0x1ad }, + { 0x1b0, 0x1b0 }, + { 0x1b4, 0x1b4 }, + { 0x1b6, 0x1b6 }, + { 0x1b9, 0x1ba }, + { 0x1bd, 0x1bf }, + { 0x1c6, 0x1c6 }, + { 0x1c9, 0x1c9 }, + { 0x1cc, 0x1cc }, + { 0x1ce, 0x1ce }, + { 0x1d0, 0x1d0 }, + { 0x1d2, 0x1d2 }, + { 0x1d4, 0x1d4 }, + { 0x1d6, 0x1d6 }, + { 0x1d8, 0x1d8 }, + { 0x1da, 0x1da }, + { 0x1dc, 0x1dd }, + { 0x1df, 0x1df }, + { 0x1e1, 0x1e1 }, + { 0x1e3, 0x1e3 }, + { 0x1e5, 0x1e5 }, + { 0x1e7, 0x1e7 }, + { 0x1e9, 0x1e9 }, + { 0x1eb, 0x1eb }, + { 0x1ed, 0x1ed }, + { 0x1ef, 0x1f0 }, + { 0x1f3, 0x1f3 }, + { 0x1f5, 0x1f5 }, + { 0x1f9, 0x1f9 }, + { 0x1fb, 0x1fb }, + { 0x1fd, 0x1fd }, + { 0x1ff, 0x1ff }, + { 0x201, 0x201 }, + { 0x203, 0x203 }, + { 0x205, 0x205 }, + { 0x207, 0x207 }, + { 0x209, 0x209 }, + { 0x20b, 0x20b }, + { 0x20d, 0x20d }, + { 0x20f, 0x20f }, + { 0x211, 0x211 }, + { 0x213, 0x213 }, + { 0x215, 0x215 }, + { 0x217, 0x217 }, + { 0x219, 0x219 }, + { 0x21b, 0x21b }, + { 0x21d, 0x21d }, + { 0x21f, 0x21f }, + { 0x221, 0x221 }, + { 0x223, 0x223 }, + { 0x225, 0x225 }, + { 0x227, 0x227 }, + { 0x229, 0x229 }, + { 0x22b, 0x22b }, + { 0x22d, 0x22d }, + { 0x22f, 0x22f }, + { 0x231, 0x231 }, + { 0x233, 0x239 }, + { 0x23c, 0x23c }, + { 0x23f, 0x240 }, + { 0x242, 0x242 }, + { 0x247, 0x247 }, + { 0x249, 0x249 }, + { 0x24b, 0x24b }, + { 0x24d, 0x24d }, + { 0x24f, 0x293 }, + { 0x295, 0x2b8 }, + { 0x2c0, 0x2c1 }, + { 0x2e0, 0x2e4 }, + { 0x345, 0x345 }, + { 0x371, 0x371 }, + { 0x373, 0x373 }, + { 0x377, 0x377 }, + { 0x37a, 0x37d }, + { 0x390, 0x390 }, + { 0x3ac, 0x3ce }, + { 0x3d0, 0x3d1 }, + { 0x3d5, 0x3d7 }, + { 0x3d9, 0x3d9 }, + { 0x3db, 0x3db }, + { 0x3dd, 0x3dd }, + { 0x3df, 0x3df }, + { 0x3e1, 0x3e1 }, + { 0x3e3, 0x3e3 }, + { 0x3e5, 0x3e5 }, + { 0x3e7, 0x3e7 }, + { 0x3e9, 0x3e9 }, + { 0x3eb, 0x3eb }, + { 0x3ed, 0x3ed }, + { 0x3ef, 0x3f3 }, + { 0x3f5, 0x3f5 }, + { 0x3f8, 0x3f8 }, + { 0x3fb, 0x3fc }, + { 0x430, 0x45f }, + { 0x461, 0x461 }, + { 0x463, 0x463 }, + { 0x465, 0x465 }, + { 0x467, 0x467 }, + { 0x469, 0x469 }, + { 0x46b, 0x46b }, + { 0x46d, 0x46d }, + { 0x46f, 0x46f }, + { 0x471, 0x471 }, + { 0x473, 0x473 }, + { 0x475, 0x475 }, + { 0x477, 0x477 }, + { 0x479, 0x479 }, + { 0x47b, 0x47b }, + { 0x47d, 0x47d }, + { 0x47f, 0x47f }, + { 0x481, 0x481 }, + { 0x48b, 0x48b }, + { 0x48d, 0x48d }, + { 0x48f, 0x48f }, + { 0x491, 0x491 }, + { 0x493, 0x493 }, + { 0x495, 0x495 }, + { 0x497, 0x497 }, + { 0x499, 0x499 }, + { 0x49b, 0x49b }, + { 0x49d, 0x49d }, + { 0x49f, 0x49f }, + { 0x4a1, 0x4a1 }, + { 0x4a3, 0x4a3 }, + { 0x4a5, 0x4a5 }, + { 0x4a7, 0x4a7 }, + { 0x4a9, 0x4a9 }, + { 0x4ab, 0x4ab }, + { 0x4ad, 0x4ad }, + { 0x4af, 0x4af }, + { 0x4b1, 0x4b1 }, + { 0x4b3, 0x4b3 }, + { 0x4b5, 0x4b5 }, + { 0x4b7, 0x4b7 }, + { 0x4b9, 0x4b9 }, + { 0x4bb, 0x4bb }, + { 0x4bd, 0x4bd }, + { 0x4bf, 0x4bf }, + { 0x4c2, 0x4c2 }, + { 0x4c4, 0x4c4 }, + { 0x4c6, 0x4c6 }, + { 0x4c8, 0x4c8 }, + { 0x4ca, 0x4ca }, + { 0x4cc, 0x4cc }, + { 0x4ce, 0x4cf }, + { 0x4d1, 0x4d1 }, + { 0x4d3, 0x4d3 }, + { 0x4d5, 0x4d5 }, + { 0x4d7, 0x4d7 }, + { 0x4d9, 0x4d9 }, + { 0x4db, 0x4db }, + { 0x4dd, 0x4dd }, + { 0x4df, 0x4df }, + { 0x4e1, 0x4e1 }, + { 0x4e3, 0x4e3 }, + { 0x4e5, 0x4e5 }, + { 0x4e7, 0x4e7 }, + { 0x4e9, 0x4e9 }, + { 0x4eb, 0x4eb }, + { 0x4ed, 0x4ed }, + { 0x4ef, 0x4ef }, + { 0x4f1, 0x4f1 }, + { 0x4f3, 0x4f3 }, + { 0x4f5, 0x4f5 }, + { 0x4f7, 0x4f7 }, + { 0x4f9, 0x4f9 }, + { 0x4fb, 0x4fb }, + { 0x4fd, 0x4fd }, + { 0x4ff, 0x4ff }, + { 0x501, 0x501 }, + { 0x503, 0x503 }, + { 0x505, 0x505 }, + { 0x507, 0x507 }, + { 0x509, 0x509 }, + { 0x50b, 0x50b }, + { 0x50d, 0x50d }, + { 0x50f, 0x50f }, + { 0x511, 0x511 }, + { 0x513, 0x513 }, + { 0x515, 0x515 }, + { 0x517, 0x517 }, + { 0x519, 0x519 }, + { 0x51b, 0x51b }, + { 0x51d, 0x51d }, + { 0x51f, 0x51f }, + { 0x521, 0x521 }, + { 0x523, 0x523 }, + { 0x525, 0x525 }, + { 0x527, 0x527 }, + { 0x529, 0x529 }, + { 0x52b, 0x52b }, + { 0x52d, 0x52d }, + { 0x52f, 0x52f }, + { 0x560, 0x588 }, + { 0x10d0, 0x10fa }, + { 0x10fc, 0x10ff }, + { 0x13f8, 0x13fd }, + { 0x1c80, 0x1c88 }, + { 0x1c8a, 0x1c8a }, + { 0x1d00, 0x1dbf }, + { 0x1e01, 0x1e01 }, + { 0x1e03, 0x1e03 }, + { 0x1e05, 0x1e05 }, + { 0x1e07, 0x1e07 }, + { 0x1e09, 0x1e09 }, + { 0x1e0b, 0x1e0b }, + { 0x1e0d, 0x1e0d }, + { 0x1e0f, 0x1e0f }, + { 0x1e11, 0x1e11 }, + { 0x1e13, 0x1e13 }, + { 0x1e15, 0x1e15 }, + { 0x1e17, 0x1e17 }, + { 0x1e19, 0x1e19 }, + { 0x1e1b, 0x1e1b }, + { 0x1e1d, 0x1e1d }, + { 0x1e1f, 0x1e1f }, + { 0x1e21, 0x1e21 }, + { 0x1e23, 0x1e23 }, + { 0x1e25, 0x1e25 }, + { 0x1e27, 0x1e27 }, + { 0x1e29, 0x1e29 }, + { 0x1e2b, 0x1e2b }, + { 0x1e2d, 0x1e2d }, + { 0x1e2f, 0x1e2f }, + { 0x1e31, 0x1e31 }, + { 0x1e33, 0x1e33 }, + { 0x1e35, 0x1e35 }, + { 0x1e37, 0x1e37 }, + { 0x1e39, 0x1e39 }, + { 0x1e3b, 0x1e3b }, + { 0x1e3d, 0x1e3d }, + { 0x1e3f, 0x1e3f }, + { 0x1e41, 0x1e41 }, + { 0x1e43, 0x1e43 }, + { 0x1e45, 0x1e45 }, + { 0x1e47, 0x1e47 }, + { 0x1e49, 0x1e49 }, + { 0x1e4b, 0x1e4b }, + { 0x1e4d, 0x1e4d }, + { 0x1e4f, 0x1e4f }, + { 0x1e51, 0x1e51 }, + { 0x1e53, 0x1e53 }, + { 0x1e55, 0x1e55 }, + { 0x1e57, 0x1e57 }, + { 0x1e59, 0x1e59 }, + { 0x1e5b, 0x1e5b }, + { 0x1e5d, 0x1e5d }, + { 0x1e5f, 0x1e5f }, + { 0x1e61, 0x1e61 }, + { 0x1e63, 0x1e63 }, + { 0x1e65, 0x1e65 }, + { 0x1e67, 0x1e67 }, + { 0x1e69, 0x1e69 }, + { 0x1e6b, 0x1e6b }, + { 0x1e6d, 0x1e6d }, + { 0x1e6f, 0x1e6f }, + { 0x1e71, 0x1e71 }, + { 0x1e73, 0x1e73 }, + { 0x1e75, 0x1e75 }, + { 0x1e77, 0x1e77 }, + { 0x1e79, 0x1e79 }, + { 0x1e7b, 0x1e7b }, + { 0x1e7d, 0x1e7d }, + { 0x1e7f, 0x1e7f }, + { 0x1e81, 0x1e81 }, + { 0x1e83, 0x1e83 }, + { 0x1e85, 0x1e85 }, + { 0x1e87, 0x1e87 }, + { 0x1e89, 0x1e89 }, + { 0x1e8b, 0x1e8b }, + { 0x1e8d, 0x1e8d }, + { 0x1e8f, 0x1e8f }, + { 0x1e91, 0x1e91 }, + { 0x1e93, 0x1e93 }, + { 0x1e95, 0x1e9d }, + { 0x1e9f, 0x1e9f }, + { 0x1ea1, 0x1ea1 }, + { 0x1ea3, 0x1ea3 }, + { 0x1ea5, 0x1ea5 }, + { 0x1ea7, 0x1ea7 }, + { 0x1ea9, 0x1ea9 }, + { 0x1eab, 0x1eab }, + { 0x1ead, 0x1ead }, + { 0x1eaf, 0x1eaf }, + { 0x1eb1, 0x1eb1 }, + { 0x1eb3, 0x1eb3 }, + { 0x1eb5, 0x1eb5 }, + { 0x1eb7, 0x1eb7 }, + { 0x1eb9, 0x1eb9 }, + { 0x1ebb, 0x1ebb }, + { 0x1ebd, 0x1ebd }, + { 0x1ebf, 0x1ebf }, + { 0x1ec1, 0x1ec1 }, + { 0x1ec3, 0x1ec3 }, + { 0x1ec5, 0x1ec5 }, + { 0x1ec7, 0x1ec7 }, + { 0x1ec9, 0x1ec9 }, + { 0x1ecb, 0x1ecb }, + { 0x1ecd, 0x1ecd }, + { 0x1ecf, 0x1ecf }, + { 0x1ed1, 0x1ed1 }, + { 0x1ed3, 0x1ed3 }, + { 0x1ed5, 0x1ed5 }, + { 0x1ed7, 0x1ed7 }, + { 0x1ed9, 0x1ed9 }, + { 0x1edb, 0x1edb }, + { 0x1edd, 0x1edd }, + { 0x1edf, 0x1edf }, + { 0x1ee1, 0x1ee1 }, + { 0x1ee3, 0x1ee3 }, + { 0x1ee5, 0x1ee5 }, + { 0x1ee7, 0x1ee7 }, + { 0x1ee9, 0x1ee9 }, + { 0x1eeb, 0x1eeb }, + { 0x1eed, 0x1eed }, + { 0x1eef, 0x1eef }, + { 0x1ef1, 0x1ef1 }, + { 0x1ef3, 0x1ef3 }, + { 0x1ef5, 0x1ef5 }, + { 0x1ef7, 0x1ef7 }, + { 0x1ef9, 0x1ef9 }, + { 0x1efb, 0x1efb }, + { 0x1efd, 0x1efd }, + { 0x1eff, 0x1f07 }, + { 0x1f10, 0x1f15 }, + { 0x1f20, 0x1f27 }, + { 0x1f30, 0x1f37 }, + { 0x1f40, 0x1f45 }, + { 0x1f50, 0x1f57 }, + { 0x1f60, 0x1f67 }, + { 0x1f70, 0x1f7d }, + { 0x1f80, 0x1f87 }, + { 0x1f90, 0x1f97 }, + { 0x1fa0, 0x1fa7 }, + { 0x1fb0, 0x1fb4 }, + { 0x1fb6, 0x1fb7 }, + { 0x1fbe, 0x1fbe }, + { 0x1fc2, 0x1fc4 }, + { 0x1fc6, 0x1fc7 }, + { 0x1fd0, 0x1fd3 }, + { 0x1fd6, 0x1fd7 }, + { 0x1fe0, 0x1fe7 }, + { 0x1ff2, 0x1ff4 }, + { 0x1ff6, 0x1ff7 }, + { 0x2071, 0x2071 }, + { 0x207f, 0x207f }, + { 0x2090, 0x209c }, + { 0x210a, 0x210a }, + { 0x210e, 0x210f }, + { 0x2113, 0x2113 }, + { 0x212f, 0x212f }, + { 0x2134, 0x2134 }, + { 0x2139, 0x2139 }, + { 0x213c, 0x213d }, + { 0x2146, 0x2149 }, + { 0x214e, 0x214e }, + { 0x2170, 0x217f }, + { 0x2184, 0x2184 }, + { 0x24d0, 0x24e9 }, + { 0x2c30, 0x2c5f }, + { 0x2c61, 0x2c61 }, + { 0x2c65, 0x2c66 }, + { 0x2c68, 0x2c68 }, + { 0x2c6a, 0x2c6a }, + { 0x2c6c, 0x2c6c }, + { 0x2c71, 0x2c71 }, + { 0x2c73, 0x2c74 }, + { 0x2c76, 0x2c7d }, + { 0x2c81, 0x2c81 }, + { 0x2c83, 0x2c83 }, + { 0x2c85, 0x2c85 }, + { 0x2c87, 0x2c87 }, + { 0x2c89, 0x2c89 }, + { 0x2c8b, 0x2c8b }, + { 0x2c8d, 0x2c8d }, + { 0x2c8f, 0x2c8f }, + { 0x2c91, 0x2c91 }, + { 0x2c93, 0x2c93 }, + { 0x2c95, 0x2c95 }, + { 0x2c97, 0x2c97 }, + { 0x2c99, 0x2c99 }, + { 0x2c9b, 0x2c9b }, + { 0x2c9d, 0x2c9d }, + { 0x2c9f, 0x2c9f }, + { 0x2ca1, 0x2ca1 }, + { 0x2ca3, 0x2ca3 }, + { 0x2ca5, 0x2ca5 }, + { 0x2ca7, 0x2ca7 }, + { 0x2ca9, 0x2ca9 }, + { 0x2cab, 0x2cab }, + { 0x2cad, 0x2cad }, + { 0x2caf, 0x2caf }, + { 0x2cb1, 0x2cb1 }, + { 0x2cb3, 0x2cb3 }, + { 0x2cb5, 0x2cb5 }, + { 0x2cb7, 0x2cb7 }, + { 0x2cb9, 0x2cb9 }, + { 0x2cbb, 0x2cbb }, + { 0x2cbd, 0x2cbd }, + { 0x2cbf, 0x2cbf }, + { 0x2cc1, 0x2cc1 }, + { 0x2cc3, 0x2cc3 }, + { 0x2cc5, 0x2cc5 }, + { 0x2cc7, 0x2cc7 }, + { 0x2cc9, 0x2cc9 }, + { 0x2ccb, 0x2ccb }, + { 0x2ccd, 0x2ccd }, + { 0x2ccf, 0x2ccf }, + { 0x2cd1, 0x2cd1 }, + { 0x2cd3, 0x2cd3 }, + { 0x2cd5, 0x2cd5 }, + { 0x2cd7, 0x2cd7 }, + { 0x2cd9, 0x2cd9 }, + { 0x2cdb, 0x2cdb }, + { 0x2cdd, 0x2cdd }, + { 0x2cdf, 0x2cdf }, + { 0x2ce1, 0x2ce1 }, + { 0x2ce3, 0x2ce4 }, + { 0x2cec, 0x2cec }, + { 0x2cee, 0x2cee }, + { 0x2cf3, 0x2cf3 }, + { 0x2d00, 0x2d25 }, + { 0x2d27, 0x2d27 }, + { 0x2d2d, 0x2d2d }, + { 0xa641, 0xa641 }, + { 0xa643, 0xa643 }, + { 0xa645, 0xa645 }, + { 0xa647, 0xa647 }, + { 0xa649, 0xa649 }, + { 0xa64b, 0xa64b }, + { 0xa64d, 0xa64d }, + { 0xa64f, 0xa64f }, + { 0xa651, 0xa651 }, + { 0xa653, 0xa653 }, + { 0xa655, 0xa655 }, + { 0xa657, 0xa657 }, + { 0xa659, 0xa659 }, + { 0xa65b, 0xa65b }, + { 0xa65d, 0xa65d }, + { 0xa65f, 0xa65f }, + { 0xa661, 0xa661 }, + { 0xa663, 0xa663 }, + { 0xa665, 0xa665 }, + { 0xa667, 0xa667 }, + { 0xa669, 0xa669 }, + { 0xa66b, 0xa66b }, + { 0xa66d, 0xa66d }, + { 0xa681, 0xa681 }, + { 0xa683, 0xa683 }, + { 0xa685, 0xa685 }, + { 0xa687, 0xa687 }, + { 0xa689, 0xa689 }, + { 0xa68b, 0xa68b }, + { 0xa68d, 0xa68d }, + { 0xa68f, 0xa68f }, + { 0xa691, 0xa691 }, + { 0xa693, 0xa693 }, + { 0xa695, 0xa695 }, + { 0xa697, 0xa697 }, + { 0xa699, 0xa699 }, + { 0xa69b, 0xa69d }, + { 0xa723, 0xa723 }, + { 0xa725, 0xa725 }, + { 0xa727, 0xa727 }, + { 0xa729, 0xa729 }, + { 0xa72b, 0xa72b }, + { 0xa72d, 0xa72d }, + { 0xa72f, 0xa731 }, + { 0xa733, 0xa733 }, + { 0xa735, 0xa735 }, + { 0xa737, 0xa737 }, + { 0xa739, 0xa739 }, + { 0xa73b, 0xa73b }, + { 0xa73d, 0xa73d }, + { 0xa73f, 0xa73f }, + { 0xa741, 0xa741 }, + { 0xa743, 0xa743 }, + { 0xa745, 0xa745 }, + { 0xa747, 0xa747 }, + { 0xa749, 0xa749 }, + { 0xa74b, 0xa74b }, + { 0xa74d, 0xa74d }, + { 0xa74f, 0xa74f }, + { 0xa751, 0xa751 }, + { 0xa753, 0xa753 }, + { 0xa755, 0xa755 }, + { 0xa757, 0xa757 }, + { 0xa759, 0xa759 }, + { 0xa75b, 0xa75b }, + { 0xa75d, 0xa75d }, + { 0xa75f, 0xa75f }, + { 0xa761, 0xa761 }, + { 0xa763, 0xa763 }, + { 0xa765, 0xa765 }, + { 0xa767, 0xa767 }, + { 0xa769, 0xa769 }, + { 0xa76b, 0xa76b }, + { 0xa76d, 0xa76d }, + { 0xa76f, 0xa778 }, + { 0xa77a, 0xa77a }, + { 0xa77c, 0xa77c }, + { 0xa77f, 0xa77f }, + { 0xa781, 0xa781 }, + { 0xa783, 0xa783 }, + { 0xa785, 0xa785 }, + { 0xa787, 0xa787 }, + { 0xa78c, 0xa78c }, + { 0xa78e, 0xa78e }, + { 0xa791, 0xa791 }, + { 0xa793, 0xa795 }, + { 0xa797, 0xa797 }, + { 0xa799, 0xa799 }, + { 0xa79b, 0xa79b }, + { 0xa79d, 0xa79d }, + { 0xa79f, 0xa79f }, + { 0xa7a1, 0xa7a1 }, + { 0xa7a3, 0xa7a3 }, + { 0xa7a5, 0xa7a5 }, + { 0xa7a7, 0xa7a7 }, + { 0xa7a9, 0xa7a9 }, + { 0xa7af, 0xa7af }, + { 0xa7b5, 0xa7b5 }, + { 0xa7b7, 0xa7b7 }, + { 0xa7b9, 0xa7b9 }, + { 0xa7bb, 0xa7bb }, + { 0xa7bd, 0xa7bd }, + { 0xa7bf, 0xa7bf }, + { 0xa7c1, 0xa7c1 }, + { 0xa7c3, 0xa7c3 }, + { 0xa7c8, 0xa7c8 }, + { 0xa7ca, 0xa7ca }, + { 0xa7cd, 0xa7cd }, + { 0xa7d1, 0xa7d1 }, + { 0xa7d3, 0xa7d3 }, + { 0xa7d5, 0xa7d5 }, + { 0xa7d7, 0xa7d7 }, + { 0xa7d9, 0xa7d9 }, + { 0xa7db, 0xa7db }, + { 0xa7f2, 0xa7f4 }, + { 0xa7f6, 0xa7f6 }, + { 0xa7f8, 0xa7fa }, + { 0xab30, 0xab5a }, + { 0xab5c, 0xab69 }, + { 0xab70, 0xabbf }, + { 0xfb00, 0xfb06 }, + { 0xfb13, 0xfb17 }, + { 0xff41, 0xff5a }, + { 0x10428, 0x1044f }, + { 0x104d8, 0x104fb }, + { 0x10597, 0x105a1 }, + { 0x105a3, 0x105b1 }, + { 0x105b3, 0x105b9 }, + { 0x105bb, 0x105bc }, + { 0x10780, 0x10780 }, + { 0x10783, 0x10785 }, + { 0x10787, 0x107b0 }, + { 0x107b2, 0x107ba }, + { 0x10cc0, 0x10cf2 }, + { 0x10d70, 0x10d85 }, + { 0x118c0, 0x118df }, + { 0x16e60, 0x16e7f }, + { 0x1d41a, 0x1d433 }, + { 0x1d44e, 0x1d454 }, + { 0x1d456, 0x1d467 }, + { 0x1d482, 0x1d49b }, + { 0x1d4b6, 0x1d4b9 }, + { 0x1d4bb, 0x1d4bb }, + { 0x1d4bd, 0x1d4c3 }, + { 0x1d4c5, 0x1d4cf }, + { 0x1d4ea, 0x1d503 }, + { 0x1d51e, 0x1d537 }, + { 0x1d552, 0x1d56b }, + { 0x1d586, 0x1d59f }, + { 0x1d5ba, 0x1d5d3 }, + { 0x1d5ee, 0x1d607 }, + { 0x1d622, 0x1d63b }, + { 0x1d656, 0x1d66f }, + { 0x1d68a, 0x1d6a5 }, + { 0x1d6c2, 0x1d6da }, + { 0x1d6dc, 0x1d6e1 }, + { 0x1d6fc, 0x1d714 }, + { 0x1d716, 0x1d71b }, + { 0x1d736, 0x1d74e }, + { 0x1d750, 0x1d755 }, + { 0x1d770, 0x1d788 }, + { 0x1d78a, 0x1d78f }, + { 0x1d7aa, 0x1d7c2 }, + { 0x1d7c4, 0x1d7c9 }, + { 0x1d7cb, 0x1d7cb }, + { 0x1df00, 0x1df09 }, + { 0x1df0b, 0x1df1e }, + { 0x1df25, 0x1df2a }, + { 0x1e030, 0x1e06d }, + { 0x1e922, 0x1e943 }, +}; + +constexpr inline CharRange unicode_letter[] = { + { 0x41, 0x5a }, + { 0x61, 0x7a }, + { 0xaa, 0xaa }, + { 0xb5, 0xb5 }, + { 0xba, 0xba }, + { 0xc0, 0xd6 }, + { 0xd8, 0xf6 }, + { 0xf8, 0x2c1 }, + { 0x2c6, 0x2d1 }, + { 0x2e0, 0x2e4 }, + { 0x2ec, 0x2ec }, + { 0x2ee, 0x2ee }, + { 0x345, 0x345 }, + { 0x363, 0x374 }, + { 0x376, 0x377 }, + { 0x37a, 0x37d }, + { 0x37f, 0x37f }, + { 0x386, 0x386 }, + { 0x388, 0x38a }, + { 0x38c, 0x38c }, + { 0x38e, 0x3a1 }, + { 0x3a3, 0x3f5 }, + { 0x3f7, 0x481 }, + { 0x48a, 0x52f }, + { 0x531, 0x556 }, + { 0x559, 0x559 }, + { 0x560, 0x588 }, + { 0x5b0, 0x5bd }, + { 0x5bf, 0x5bf }, + { 0x5c1, 0x5c2 }, + { 0x5c4, 0x5c5 }, + { 0x5c7, 0x5c7 }, + { 0x5d0, 0x5ea }, + { 0x5ef, 0x5f2 }, + { 0x610, 0x61a }, + { 0x620, 0x657 }, + { 0x659, 0x65f }, + { 0x66e, 0x6d3 }, + { 0x6d5, 0x6dc }, + { 0x6e1, 0x6e8 }, + { 0x6ed, 0x6ef }, + { 0x6fa, 0x6fc }, + { 0x6ff, 0x6ff }, + { 0x710, 0x73f }, + { 0x74d, 0x7b1 }, + { 0x7ca, 0x7ea }, + { 0x7f4, 0x7f5 }, + { 0x7fa, 0x7fa }, + { 0x800, 0x817 }, + { 0x81a, 0x82c }, + { 0x840, 0x858 }, + { 0x860, 0x86a }, + { 0x870, 0x887 }, + { 0x889, 0x88e }, + { 0x897, 0x897 }, + { 0x8a0, 0x8c9 }, + { 0x8d4, 0x8df }, + { 0x8e3, 0x8e9 }, + { 0x8f0, 0x93b }, + { 0x93d, 0x94c }, + { 0x94e, 0x950 }, + { 0x955, 0x963 }, + { 0x971, 0x983 }, + { 0x985, 0x98c }, + { 0x98f, 0x990 }, + { 0x993, 0x9a8 }, + { 0x9aa, 0x9b0 }, + { 0x9b2, 0x9b2 }, + { 0x9b6, 0x9b9 }, + { 0x9bd, 0x9c4 }, + { 0x9c7, 0x9c8 }, + { 0x9cb, 0x9cc }, + { 0x9ce, 0x9ce }, + { 0x9d7, 0x9d7 }, + { 0x9dc, 0x9dd }, + { 0x9df, 0x9e3 }, + { 0x9f0, 0x9f1 }, + { 0x9fc, 0x9fc }, + { 0xa01, 0xa03 }, + { 0xa05, 0xa0a }, + { 0xa0f, 0xa10 }, + { 0xa13, 0xa28 }, + { 0xa2a, 0xa30 }, + { 0xa32, 0xa33 }, + { 0xa35, 0xa36 }, + { 0xa38, 0xa39 }, + { 0xa3e, 0xa42 }, + { 0xa47, 0xa48 }, + { 0xa4b, 0xa4c }, + { 0xa51, 0xa51 }, + { 0xa59, 0xa5c }, + { 0xa5e, 0xa5e }, + { 0xa70, 0xa75 }, + { 0xa81, 0xa83 }, + { 0xa85, 0xa8d }, + { 0xa8f, 0xa91 }, + { 0xa93, 0xaa8 }, + { 0xaaa, 0xab0 }, + { 0xab2, 0xab3 }, + { 0xab5, 0xab9 }, + { 0xabd, 0xac5 }, + { 0xac7, 0xac9 }, + { 0xacb, 0xacc }, + { 0xad0, 0xad0 }, + { 0xae0, 0xae3 }, + { 0xaf9, 0xafc }, + { 0xb01, 0xb03 }, + { 0xb05, 0xb0c }, + { 0xb0f, 0xb10 }, + { 0xb13, 0xb28 }, + { 0xb2a, 0xb30 }, + { 0xb32, 0xb33 }, + { 0xb35, 0xb39 }, + { 0xb3d, 0xb44 }, + { 0xb47, 0xb48 }, + { 0xb4b, 0xb4c }, + { 0xb56, 0xb57 }, + { 0xb5c, 0xb5d }, + { 0xb5f, 0xb63 }, + { 0xb71, 0xb71 }, + { 0xb82, 0xb83 }, + { 0xb85, 0xb8a }, + { 0xb8e, 0xb90 }, + { 0xb92, 0xb95 }, + { 0xb99, 0xb9a }, + { 0xb9c, 0xb9c }, + { 0xb9e, 0xb9f }, + { 0xba3, 0xba4 }, + { 0xba8, 0xbaa }, + { 0xbae, 0xbb9 }, + { 0xbbe, 0xbc2 }, + { 0xbc6, 0xbc8 }, + { 0xbca, 0xbcc }, + { 0xbd0, 0xbd0 }, + { 0xbd7, 0xbd7 }, + { 0xc00, 0xc0c }, + { 0xc0e, 0xc10 }, + { 0xc12, 0xc28 }, + { 0xc2a, 0xc39 }, + { 0xc3d, 0xc44 }, + { 0xc46, 0xc48 }, + { 0xc4a, 0xc4c }, + { 0xc55, 0xc56 }, + { 0xc58, 0xc5a }, + { 0xc5d, 0xc5d }, + { 0xc60, 0xc63 }, + { 0xc80, 0xc83 }, + { 0xc85, 0xc8c }, + { 0xc8e, 0xc90 }, + { 0xc92, 0xca8 }, + { 0xcaa, 0xcb3 }, + { 0xcb5, 0xcb9 }, + { 0xcbd, 0xcc4 }, + { 0xcc6, 0xcc8 }, + { 0xcca, 0xccc }, + { 0xcd5, 0xcd6 }, + { 0xcdd, 0xcde }, + { 0xce0, 0xce3 }, + { 0xcf1, 0xcf3 }, + { 0xd00, 0xd0c }, + { 0xd0e, 0xd10 }, + { 0xd12, 0xd3a }, + { 0xd3d, 0xd44 }, + { 0xd46, 0xd48 }, + { 0xd4a, 0xd4c }, + { 0xd4e, 0xd4e }, + { 0xd54, 0xd57 }, + { 0xd5f, 0xd63 }, + { 0xd7a, 0xd7f }, + { 0xd81, 0xd83 }, + { 0xd85, 0xd96 }, + { 0xd9a, 0xdb1 }, + { 0xdb3, 0xdbb }, + { 0xdbd, 0xdbd }, + { 0xdc0, 0xdc6 }, + { 0xdcf, 0xdd4 }, + { 0xdd6, 0xdd6 }, + { 0xdd8, 0xddf }, + { 0xdf2, 0xdf3 }, + { 0xe01, 0xe3a }, + { 0xe40, 0xe46 }, + { 0xe4d, 0xe4d }, + { 0xe81, 0xe82 }, + { 0xe84, 0xe84 }, + { 0xe86, 0xe8a }, + { 0xe8c, 0xea3 }, + { 0xea5, 0xea5 }, + { 0xea7, 0xeb9 }, + { 0xebb, 0xebd }, + { 0xec0, 0xec4 }, + { 0xec6, 0xec6 }, + { 0xecd, 0xecd }, + { 0xedc, 0xedf }, + { 0xf00, 0xf00 }, + { 0xf40, 0xf47 }, + { 0xf49, 0xf6c }, + { 0xf71, 0xf83 }, + { 0xf88, 0xf97 }, + { 0xf99, 0xfbc }, + { 0x1000, 0x1036 }, + { 0x1038, 0x1038 }, + { 0x103b, 0x103f }, + { 0x1050, 0x108f }, + { 0x109a, 0x109d }, + { 0x10a0, 0x10c5 }, + { 0x10c7, 0x10c7 }, + { 0x10cd, 0x10cd }, + { 0x10d0, 0x10fa }, + { 0x10fc, 0x1248 }, + { 0x124a, 0x124d }, + { 0x1250, 0x1256 }, + { 0x1258, 0x1258 }, + { 0x125a, 0x125d }, + { 0x1260, 0x1288 }, + { 0x128a, 0x128d }, + { 0x1290, 0x12b0 }, + { 0x12b2, 0x12b5 }, + { 0x12b8, 0x12be }, + { 0x12c0, 0x12c0 }, + { 0x12c2, 0x12c5 }, + { 0x12c8, 0x12d6 }, + { 0x12d8, 0x1310 }, + { 0x1312, 0x1315 }, + { 0x1318, 0x135a }, + { 0x1380, 0x138f }, + { 0x13a0, 0x13f5 }, + { 0x13f8, 0x13fd }, + { 0x1401, 0x166c }, + { 0x166f, 0x167f }, + { 0x1681, 0x169a }, + { 0x16a0, 0x16ea }, + { 0x16ee, 0x16f8 }, + { 0x1700, 0x1713 }, + { 0x171f, 0x1733 }, + { 0x1740, 0x1753 }, + { 0x1760, 0x176c }, + { 0x176e, 0x1770 }, + { 0x1772, 0x1773 }, + { 0x1780, 0x17b3 }, + { 0x17b6, 0x17c8 }, + { 0x17d7, 0x17d7 }, + { 0x17dc, 0x17dc }, + { 0x1820, 0x1878 }, + { 0x1880, 0x18aa }, + { 0x18b0, 0x18f5 }, + { 0x1900, 0x191e }, + { 0x1920, 0x192b }, + { 0x1930, 0x1938 }, + { 0x1950, 0x196d }, + { 0x1970, 0x1974 }, + { 0x1980, 0x19ab }, + { 0x19b0, 0x19c9 }, + { 0x1a00, 0x1a1b }, + { 0x1a20, 0x1a5e }, + { 0x1a61, 0x1a74 }, + { 0x1aa7, 0x1aa7 }, + { 0x1abf, 0x1ac0 }, + { 0x1acc, 0x1ace }, + { 0x1b00, 0x1b33 }, + { 0x1b35, 0x1b43 }, + { 0x1b45, 0x1b4c }, + { 0x1b80, 0x1ba9 }, + { 0x1bac, 0x1baf }, + { 0x1bba, 0x1be5 }, + { 0x1be7, 0x1bf1 }, + { 0x1c00, 0x1c36 }, + { 0x1c4d, 0x1c4f }, + { 0x1c5a, 0x1c7d }, + { 0x1c80, 0x1c8a }, + { 0x1c90, 0x1cba }, + { 0x1cbd, 0x1cbf }, + { 0x1ce9, 0x1cec }, + { 0x1cee, 0x1cf3 }, + { 0x1cf5, 0x1cf6 }, + { 0x1cfa, 0x1cfa }, + { 0x1d00, 0x1dbf }, + { 0x1dd3, 0x1df4 }, + { 0x1e00, 0x1f15 }, + { 0x1f18, 0x1f1d }, + { 0x1f20, 0x1f45 }, + { 0x1f48, 0x1f4d }, + { 0x1f50, 0x1f57 }, + { 0x1f59, 0x1f59 }, + { 0x1f5b, 0x1f5b }, + { 0x1f5d, 0x1f5d }, + { 0x1f5f, 0x1f7d }, + { 0x1f80, 0x1fb4 }, + { 0x1fb6, 0x1fbc }, + { 0x1fbe, 0x1fbe }, + { 0x1fc2, 0x1fc4 }, + { 0x1fc6, 0x1fcc }, + { 0x1fd0, 0x1fd3 }, + { 0x1fd6, 0x1fdb }, + { 0x1fe0, 0x1fec }, + { 0x1ff2, 0x1ff4 }, + { 0x1ff6, 0x1ffc }, + { 0x2071, 0x2071 }, + { 0x207f, 0x207f }, + { 0x2090, 0x209c }, + { 0x2102, 0x2102 }, + { 0x2107, 0x2107 }, + { 0x210a, 0x2113 }, + { 0x2115, 0x2115 }, + { 0x2119, 0x211d }, + { 0x2124, 0x2124 }, + { 0x2126, 0x2126 }, + { 0x2128, 0x2128 }, + { 0x212a, 0x212d }, + { 0x212f, 0x2139 }, + { 0x213c, 0x213f }, + { 0x2145, 0x2149 }, + { 0x214e, 0x214e }, + { 0x2160, 0x2188 }, + { 0x24b6, 0x24e9 }, + { 0x2c00, 0x2ce4 }, + { 0x2ceb, 0x2cee }, + { 0x2cf2, 0x2cf3 }, + { 0x2d00, 0x2d25 }, + { 0x2d27, 0x2d27 }, + { 0x2d2d, 0x2d2d }, + { 0x2d30, 0x2d67 }, + { 0x2d6f, 0x2d6f }, + { 0x2d80, 0x2d96 }, + { 0x2da0, 0x2da6 }, + { 0x2da8, 0x2dae }, + { 0x2db0, 0x2db6 }, + { 0x2db8, 0x2dbe }, + { 0x2dc0, 0x2dc6 }, + { 0x2dc8, 0x2dce }, + { 0x2dd0, 0x2dd6 }, + { 0x2dd8, 0x2dde }, + { 0x2de0, 0x2dff }, + { 0x2e2f, 0x2e2f }, + { 0x3005, 0x3007 }, + { 0x3021, 0x3029 }, + { 0x3031, 0x3035 }, + { 0x3038, 0x303c }, + { 0x3041, 0x3096 }, + { 0x309d, 0x309f }, + { 0x30a1, 0x30fa }, + { 0x30fc, 0x30ff }, + { 0x3105, 0x312f }, + { 0x3131, 0x318e }, + { 0x31a0, 0x31bf }, + { 0x31f0, 0x31ff }, + { 0x3400, 0x4dbf }, + { 0x4e00, 0xa48c }, + { 0xa4d0, 0xa4fd }, + { 0xa500, 0xa60c }, + { 0xa610, 0xa61f }, + { 0xa62a, 0xa62b }, + { 0xa640, 0xa66e }, + { 0xa674, 0xa67b }, + { 0xa67f, 0xa6ef }, + { 0xa717, 0xa71f }, + { 0xa722, 0xa788 }, + { 0xa78b, 0xa7cd }, + { 0xa7d0, 0xa7d1 }, + { 0xa7d3, 0xa7d3 }, + { 0xa7d5, 0xa7dc }, + { 0xa7f2, 0xa805 }, + { 0xa807, 0xa827 }, + { 0xa840, 0xa873 }, + { 0xa880, 0xa8c3 }, + { 0xa8c5, 0xa8c5 }, + { 0xa8f2, 0xa8f7 }, + { 0xa8fb, 0xa8fb }, + { 0xa8fd, 0xa8ff }, + { 0xa90a, 0xa92a }, + { 0xa930, 0xa952 }, + { 0xa960, 0xa97c }, + { 0xa980, 0xa9b2 }, + { 0xa9b4, 0xa9bf }, + { 0xa9cf, 0xa9cf }, + { 0xa9e0, 0xa9ef }, + { 0xa9fa, 0xa9fe }, + { 0xaa00, 0xaa36 }, + { 0xaa40, 0xaa4d }, + { 0xaa60, 0xaa76 }, + { 0xaa7a, 0xaabe }, + { 0xaac0, 0xaac0 }, + { 0xaac2, 0xaac2 }, + { 0xaadb, 0xaadd }, + { 0xaae0, 0xaaef }, + { 0xaaf2, 0xaaf5 }, + { 0xab01, 0xab06 }, + { 0xab09, 0xab0e }, + { 0xab11, 0xab16 }, + { 0xab20, 0xab26 }, + { 0xab28, 0xab2e }, + { 0xab30, 0xab5a }, + { 0xab5c, 0xab69 }, + { 0xab70, 0xabea }, + { 0xac00, 0xd7a3 }, + { 0xd7b0, 0xd7c6 }, + { 0xd7cb, 0xd7fb }, + { 0xf900, 0xfa6d }, + { 0xfa70, 0xfad9 }, + { 0xfb00, 0xfb06 }, + { 0xfb13, 0xfb17 }, + { 0xfb1d, 0xfb28 }, + { 0xfb2a, 0xfb36 }, + { 0xfb38, 0xfb3c }, + { 0xfb3e, 0xfb3e }, + { 0xfb40, 0xfb41 }, + { 0xfb43, 0xfb44 }, + { 0xfb46, 0xfbb1 }, + { 0xfbd3, 0xfd3d }, + { 0xfd50, 0xfd8f }, + { 0xfd92, 0xfdc7 }, + { 0xfdf0, 0xfdfb }, + { 0xfe70, 0xfe74 }, + { 0xfe76, 0xfefc }, + { 0xff21, 0xff3a }, + { 0xff41, 0xff5a }, + { 0xff66, 0xffbe }, + { 0xffc2, 0xffc7 }, + { 0xffca, 0xffcf }, + { 0xffd2, 0xffd7 }, + { 0xffda, 0xffdc }, + { 0x10000, 0x1000b }, + { 0x1000d, 0x10026 }, + { 0x10028, 0x1003a }, + { 0x1003c, 0x1003d }, + { 0x1003f, 0x1004d }, + { 0x10050, 0x1005d }, + { 0x10080, 0x100fa }, + { 0x10140, 0x10174 }, + { 0x10280, 0x1029c }, + { 0x102a0, 0x102d0 }, + { 0x10300, 0x1031f }, + { 0x1032d, 0x1034a }, + { 0x10350, 0x1037a }, + { 0x10380, 0x1039d }, + { 0x103a0, 0x103c3 }, + { 0x103c8, 0x103cf }, + { 0x103d1, 0x103d5 }, + { 0x10400, 0x1049d }, + { 0x104b0, 0x104d3 }, + { 0x104d8, 0x104fb }, + { 0x10500, 0x10527 }, + { 0x10530, 0x10563 }, + { 0x10570, 0x1057a }, + { 0x1057c, 0x1058a }, + { 0x1058c, 0x10592 }, + { 0x10594, 0x10595 }, + { 0x10597, 0x105a1 }, + { 0x105a3, 0x105b1 }, + { 0x105b3, 0x105b9 }, + { 0x105bb, 0x105bc }, + { 0x105c0, 0x105f3 }, + { 0x10600, 0x10736 }, + { 0x10740, 0x10755 }, + { 0x10760, 0x10767 }, + { 0x10780, 0x10785 }, + { 0x10787, 0x107b0 }, + { 0x107b2, 0x107ba }, + { 0x10800, 0x10805 }, + { 0x10808, 0x10808 }, + { 0x1080a, 0x10835 }, + { 0x10837, 0x10838 }, + { 0x1083c, 0x1083c }, + { 0x1083f, 0x10855 }, + { 0x10860, 0x10876 }, + { 0x10880, 0x1089e }, + { 0x108e0, 0x108f2 }, + { 0x108f4, 0x108f5 }, + { 0x10900, 0x10915 }, + { 0x10920, 0x10939 }, + { 0x10980, 0x109b7 }, + { 0x109be, 0x109bf }, + { 0x10a00, 0x10a03 }, + { 0x10a05, 0x10a06 }, + { 0x10a0c, 0x10a13 }, + { 0x10a15, 0x10a17 }, + { 0x10a19, 0x10a35 }, + { 0x10a60, 0x10a7c }, + { 0x10a80, 0x10a9c }, + { 0x10ac0, 0x10ac7 }, + { 0x10ac9, 0x10ae4 }, + { 0x10b00, 0x10b35 }, + { 0x10b40, 0x10b55 }, + { 0x10b60, 0x10b72 }, + { 0x10b80, 0x10b91 }, + { 0x10c00, 0x10c48 }, + { 0x10c80, 0x10cb2 }, + { 0x10cc0, 0x10cf2 }, + { 0x10d00, 0x10d27 }, + { 0x10d4a, 0x10d65 }, + { 0x10d69, 0x10d69 }, + { 0x10d6f, 0x10d85 }, + { 0x10e80, 0x10ea9 }, + { 0x10eab, 0x10eac }, + { 0x10eb0, 0x10eb1 }, + { 0x10ec2, 0x10ec4 }, + { 0x10efc, 0x10efc }, + { 0x10f00, 0x10f1c }, + { 0x10f27, 0x10f27 }, + { 0x10f30, 0x10f45 }, + { 0x10f70, 0x10f81 }, + { 0x10fb0, 0x10fc4 }, + { 0x10fe0, 0x10ff6 }, + { 0x11000, 0x11045 }, + { 0x11071, 0x11075 }, + { 0x11080, 0x110b8 }, + { 0x110c2, 0x110c2 }, + { 0x110d0, 0x110e8 }, + { 0x11100, 0x11132 }, + { 0x11144, 0x11147 }, + { 0x11150, 0x11172 }, + { 0x11176, 0x11176 }, + { 0x11180, 0x111bf }, + { 0x111c1, 0x111c4 }, + { 0x111ce, 0x111cf }, + { 0x111da, 0x111da }, + { 0x111dc, 0x111dc }, + { 0x11200, 0x11211 }, + { 0x11213, 0x11234 }, + { 0x11237, 0x11237 }, + { 0x1123e, 0x11241 }, + { 0x11280, 0x11286 }, + { 0x11288, 0x11288 }, + { 0x1128a, 0x1128d }, + { 0x1128f, 0x1129d }, + { 0x1129f, 0x112a8 }, + { 0x112b0, 0x112e8 }, + { 0x11300, 0x11303 }, + { 0x11305, 0x1130c }, + { 0x1130f, 0x11310 }, + { 0x11313, 0x11328 }, + { 0x1132a, 0x11330 }, + { 0x11332, 0x11333 }, + { 0x11335, 0x11339 }, + { 0x1133d, 0x11344 }, + { 0x11347, 0x11348 }, + { 0x1134b, 0x1134c }, + { 0x11350, 0x11350 }, + { 0x11357, 0x11357 }, + { 0x1135d, 0x11363 }, + { 0x11380, 0x11389 }, + { 0x1138b, 0x1138b }, + { 0x1138e, 0x1138e }, + { 0x11390, 0x113b5 }, + { 0x113b7, 0x113c0 }, + { 0x113c2, 0x113c2 }, + { 0x113c5, 0x113c5 }, + { 0x113c7, 0x113ca }, + { 0x113cc, 0x113cd }, + { 0x113d1, 0x113d1 }, + { 0x113d3, 0x113d3 }, + { 0x11400, 0x11441 }, + { 0x11443, 0x11445 }, + { 0x11447, 0x1144a }, + { 0x1145f, 0x11461 }, + { 0x11480, 0x114c1 }, + { 0x114c4, 0x114c5 }, + { 0x114c7, 0x114c7 }, + { 0x11580, 0x115b5 }, + { 0x115b8, 0x115be }, + { 0x115d8, 0x115dd }, + { 0x11600, 0x1163e }, + { 0x11640, 0x11640 }, + { 0x11644, 0x11644 }, + { 0x11680, 0x116b5 }, + { 0x116b8, 0x116b8 }, + { 0x11700, 0x1171a }, + { 0x1171d, 0x1172a }, + { 0x11740, 0x11746 }, + { 0x11800, 0x11838 }, + { 0x118a0, 0x118df }, + { 0x118ff, 0x11906 }, + { 0x11909, 0x11909 }, + { 0x1190c, 0x11913 }, + { 0x11915, 0x11916 }, + { 0x11918, 0x11935 }, + { 0x11937, 0x11938 }, + { 0x1193b, 0x1193c }, + { 0x1193f, 0x11942 }, + { 0x119a0, 0x119a7 }, + { 0x119aa, 0x119d7 }, + { 0x119da, 0x119df }, + { 0x119e1, 0x119e1 }, + { 0x119e3, 0x119e4 }, + { 0x11a00, 0x11a32 }, + { 0x11a35, 0x11a3e }, + { 0x11a50, 0x11a97 }, + { 0x11a9d, 0x11a9d }, + { 0x11ab0, 0x11af8 }, + { 0x11bc0, 0x11be0 }, + { 0x11c00, 0x11c08 }, + { 0x11c0a, 0x11c36 }, + { 0x11c38, 0x11c3e }, + { 0x11c40, 0x11c40 }, + { 0x11c72, 0x11c8f }, + { 0x11c92, 0x11ca7 }, + { 0x11ca9, 0x11cb6 }, + { 0x11d00, 0x11d06 }, + { 0x11d08, 0x11d09 }, + { 0x11d0b, 0x11d36 }, + { 0x11d3a, 0x11d3a }, + { 0x11d3c, 0x11d3d }, + { 0x11d3f, 0x11d41 }, + { 0x11d43, 0x11d43 }, + { 0x11d46, 0x11d47 }, + { 0x11d60, 0x11d65 }, + { 0x11d67, 0x11d68 }, + { 0x11d6a, 0x11d8e }, + { 0x11d90, 0x11d91 }, + { 0x11d93, 0x11d96 }, + { 0x11d98, 0x11d98 }, + { 0x11ee0, 0x11ef6 }, + { 0x11f00, 0x11f10 }, + { 0x11f12, 0x11f3a }, + { 0x11f3e, 0x11f40 }, + { 0x11fb0, 0x11fb0 }, + { 0x12000, 0x12399 }, + { 0x12400, 0x1246e }, + { 0x12480, 0x12543 }, + { 0x12f90, 0x12ff0 }, + { 0x13000, 0x1342f }, + { 0x13441, 0x13446 }, + { 0x13460, 0x143fa }, + { 0x14400, 0x14646 }, + { 0x16100, 0x1612e }, + { 0x16800, 0x16a38 }, + { 0x16a40, 0x16a5e }, + { 0x16a70, 0x16abe }, + { 0x16ad0, 0x16aed }, + { 0x16b00, 0x16b2f }, + { 0x16b40, 0x16b43 }, + { 0x16b63, 0x16b77 }, + { 0x16b7d, 0x16b8f }, + { 0x16d40, 0x16d6c }, + { 0x16e40, 0x16e7f }, + { 0x16f00, 0x16f4a }, + { 0x16f4f, 0x16f87 }, + { 0x16f8f, 0x16f9f }, + { 0x16fe0, 0x16fe1 }, + { 0x16fe3, 0x16fe3 }, + { 0x16ff0, 0x16ff1 }, + { 0x17000, 0x187f7 }, + { 0x18800, 0x18cd5 }, + { 0x18cff, 0x18d08 }, + { 0x1aff0, 0x1aff3 }, + { 0x1aff5, 0x1affb }, + { 0x1affd, 0x1affe }, + { 0x1b000, 0x1b122 }, + { 0x1b132, 0x1b132 }, + { 0x1b150, 0x1b152 }, + { 0x1b155, 0x1b155 }, + { 0x1b164, 0x1b167 }, + { 0x1b170, 0x1b2fb }, + { 0x1bc00, 0x1bc6a }, + { 0x1bc70, 0x1bc7c }, + { 0x1bc80, 0x1bc88 }, + { 0x1bc90, 0x1bc99 }, + { 0x1bc9e, 0x1bc9e }, + { 0x1d400, 0x1d454 }, + { 0x1d456, 0x1d49c }, + { 0x1d49e, 0x1d49f }, + { 0x1d4a2, 0x1d4a2 }, + { 0x1d4a5, 0x1d4a6 }, + { 0x1d4a9, 0x1d4ac }, + { 0x1d4ae, 0x1d4b9 }, + { 0x1d4bb, 0x1d4bb }, + { 0x1d4bd, 0x1d4c3 }, + { 0x1d4c5, 0x1d505 }, + { 0x1d507, 0x1d50a }, + { 0x1d50d, 0x1d514 }, + { 0x1d516, 0x1d51c }, + { 0x1d51e, 0x1d539 }, + { 0x1d53b, 0x1d53e }, + { 0x1d540, 0x1d544 }, + { 0x1d546, 0x1d546 }, + { 0x1d54a, 0x1d550 }, + { 0x1d552, 0x1d6a5 }, + { 0x1d6a8, 0x1d6c0 }, + { 0x1d6c2, 0x1d6da }, + { 0x1d6dc, 0x1d6fa }, + { 0x1d6fc, 0x1d714 }, + { 0x1d716, 0x1d734 }, + { 0x1d736, 0x1d74e }, + { 0x1d750, 0x1d76e }, + { 0x1d770, 0x1d788 }, + { 0x1d78a, 0x1d7a8 }, + { 0x1d7aa, 0x1d7c2 }, + { 0x1d7c4, 0x1d7cb }, + { 0x1df00, 0x1df1e }, + { 0x1df25, 0x1df2a }, + { 0x1e000, 0x1e006 }, + { 0x1e008, 0x1e018 }, + { 0x1e01b, 0x1e021 }, + { 0x1e023, 0x1e024 }, + { 0x1e026, 0x1e02a }, + { 0x1e030, 0x1e06d }, + { 0x1e08f, 0x1e08f }, + { 0x1e100, 0x1e12c }, + { 0x1e137, 0x1e13d }, + { 0x1e14e, 0x1e14e }, + { 0x1e290, 0x1e2ad }, + { 0x1e2c0, 0x1e2eb }, + { 0x1e4d0, 0x1e4eb }, + { 0x1e5d0, 0x1e5ed }, + { 0x1e5f0, 0x1e5f0 }, + { 0x1e7e0, 0x1e7e6 }, + { 0x1e7e8, 0x1e7eb }, + { 0x1e7ed, 0x1e7ee }, + { 0x1e7f0, 0x1e7fe }, + { 0x1e800, 0x1e8c4 }, + { 0x1e900, 0x1e943 }, + { 0x1e947, 0x1e947 }, + { 0x1e94b, 0x1e94b }, + { 0x1ee00, 0x1ee03 }, + { 0x1ee05, 0x1ee1f }, + { 0x1ee21, 0x1ee22 }, + { 0x1ee24, 0x1ee24 }, + { 0x1ee27, 0x1ee27 }, + { 0x1ee29, 0x1ee32 }, + { 0x1ee34, 0x1ee37 }, + { 0x1ee39, 0x1ee39 }, + { 0x1ee3b, 0x1ee3b }, + { 0x1ee42, 0x1ee42 }, + { 0x1ee47, 0x1ee47 }, + { 0x1ee49, 0x1ee49 }, + { 0x1ee4b, 0x1ee4b }, + { 0x1ee4d, 0x1ee4f }, + { 0x1ee51, 0x1ee52 }, + { 0x1ee54, 0x1ee54 }, + { 0x1ee57, 0x1ee57 }, + { 0x1ee59, 0x1ee59 }, + { 0x1ee5b, 0x1ee5b }, + { 0x1ee5d, 0x1ee5d }, + { 0x1ee5f, 0x1ee5f }, + { 0x1ee61, 0x1ee62 }, + { 0x1ee64, 0x1ee64 }, + { 0x1ee67, 0x1ee6a }, + { 0x1ee6c, 0x1ee72 }, + { 0x1ee74, 0x1ee77 }, + { 0x1ee79, 0x1ee7c }, + { 0x1ee7e, 0x1ee7e }, + { 0x1ee80, 0x1ee89 }, + { 0x1ee8b, 0x1ee9b }, + { 0x1eea1, 0x1eea3 }, + { 0x1eea5, 0x1eea9 }, + { 0x1eeab, 0x1eebb }, + { 0x1f130, 0x1f149 }, + { 0x1f150, 0x1f169 }, + { 0x1f170, 0x1f189 }, + { 0x20000, 0x2a6df }, + { 0x2a700, 0x2b739 }, + { 0x2b740, 0x2b81d }, + { 0x2b820, 0x2cea1 }, + { 0x2ceb0, 0x2ebe0 }, + { 0x2ebf0, 0x2ee5d }, + { 0x2f800, 0x2fa1d }, + { 0x30000, 0x3134a }, + { 0x31350, 0x323af }, +}; + +} // namespace godot diff --git a/include/godot_cpp/variant/char_string.hpp b/include/godot_cpp/variant/char_string.hpp index 991c0392a..b7b795b52 100644 --- a/include/godot_cpp/variant/char_string.hpp +++ b/include/godot_cpp/variant/char_string.hpp @@ -28,8 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef GODOT_CHAR_STRING_HPP -#define GODOT_CHAR_STRING_HPP +#pragma once #include @@ -138,5 +137,3 @@ typedef CharStringT Char32String; typedef CharStringT CharWideString; } // namespace godot - -#endif // GODOT_CHAR_STRING_HPP diff --git a/include/godot_cpp/variant/char_utils.hpp b/include/godot_cpp/variant/char_utils.hpp index 066f7945d..71522c6c3 100644 --- a/include/godot_cpp/variant/char_utils.hpp +++ b/include/godot_cpp/variant/char_utils.hpp @@ -28,63 +28,107 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef GODOT_CHAR_UTILS_HPP -#define GODOT_CHAR_UTILS_HPP +#pragma once + +#include "char_range.inc.hpp" + +namespace godot { + +#define BSEARCH_CHAR_RANGE(m_array) \ + int low = 0; \ + int high = sizeof(m_array) / sizeof(m_array[0]) - 1; \ + int middle = (low + high) / 2; \ + \ + while (low <= high) { \ + if (p_char < m_array[middle].start) { \ + high = middle - 1; \ + } else if (p_char > m_array[middle].end) { \ + low = middle + 1; \ + } else { \ + return true; \ + } \ + \ + middle = (low + high) / 2; \ + } \ + \ + return false + +constexpr bool is_unicode_identifier_start(char32_t p_char) { + BSEARCH_CHAR_RANGE(xid_start); +} + +constexpr bool is_unicode_identifier_continue(char32_t p_char) { + BSEARCH_CHAR_RANGE(xid_continue); +} + +constexpr bool is_unicode_upper_case(char32_t p_char) { + BSEARCH_CHAR_RANGE(uppercase_letter); +} + +constexpr bool is_unicode_lower_case(char32_t p_char) { + BSEARCH_CHAR_RANGE(lowercase_letter); +} + +constexpr bool is_unicode_letter(char32_t p_char) { + BSEARCH_CHAR_RANGE(unicode_letter); +} + +#undef BSEARCH_CHAR_RANGE -static _FORCE_INLINE_ bool is_ascii_upper_case(char32_t c) { - return (c >= 'A' && c <= 'Z'); +constexpr bool is_ascii_upper_case(char32_t p_char) { + return (p_char >= 'A' && p_char <= 'Z'); } -static _FORCE_INLINE_ bool is_ascii_lower_case(char32_t c) { - return (c >= 'a' && c <= 'z'); +constexpr bool is_ascii_lower_case(char32_t p_char) { + return (p_char >= 'a' && p_char <= 'z'); } -static _FORCE_INLINE_ bool is_digit(char32_t c) { - return (c >= '0' && c <= '9'); +constexpr bool is_digit(char32_t p_char) { + return (p_char >= '0' && p_char <= '9'); } -static _FORCE_INLINE_ bool is_hex_digit(char32_t c) { - return (is_digit(c) || (c >= 'a' && c <= 'f') || (c >= 'A' && c <= 'F')); +constexpr bool is_hex_digit(char32_t p_char) { + return (is_digit(p_char) || (p_char >= 'a' && p_char <= 'f') || (p_char >= 'A' && p_char <= 'F')); } -static _FORCE_INLINE_ bool is_binary_digit(char32_t c) { - return (c == '0' || c == '1'); +constexpr bool is_binary_digit(char32_t p_char) { + return (p_char == '0' || p_char == '1'); } -static _FORCE_INLINE_ bool is_ascii_char(char32_t c) { - return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z'); +constexpr bool is_ascii_alphabet_char(char32_t p_char) { + return (p_char >= 'a' && p_char <= 'z') || (p_char >= 'A' && p_char <= 'Z'); } -static _FORCE_INLINE_ bool is_ascii_alphanumeric_char(char32_t c) { - return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9'); +constexpr bool is_ascii_alphanumeric_char(char32_t p_char) { + return (p_char >= 'a' && p_char <= 'z') || (p_char >= 'A' && p_char <= 'Z') || (p_char >= '0' && p_char <= '9'); } -static _FORCE_INLINE_ bool is_ascii_identifier_char(char32_t c) { - return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9') || c == '_'; +constexpr bool is_ascii_identifier_char(char32_t p_char) { + return (p_char >= 'a' && p_char <= 'z') || (p_char >= 'A' && p_char <= 'Z') || (p_char >= '0' && p_char <= '9') || p_char == '_'; } -static _FORCE_INLINE_ bool is_symbol(char32_t c) { - return c != '_' && ((c >= '!' && c <= '/') || (c >= ':' && c <= '@') || (c >= '[' && c <= '`') || (c >= '{' && c <= '~') || c == '\t' || c == ' '); +constexpr bool is_symbol(char32_t p_char) { + return p_char != '_' && ((p_char >= '!' && p_char <= '/') || (p_char >= ':' && p_char <= '@') || (p_char >= '[' && p_char <= '`') || (p_char >= '{' && p_char <= '~') || p_char == '\t' || p_char == ' '); } -static _FORCE_INLINE_ bool is_control(char32_t p_char) { +constexpr bool is_control(char32_t p_char) { return (p_char <= 0x001f) || (p_char >= 0x007f && p_char <= 0x009f); } -static _FORCE_INLINE_ bool is_whitespace(char32_t p_char) { - return (p_char == ' ') || (p_char == 0x00a0) || (p_char == 0x1680) || (p_char >= 0x2000 && p_char <= 0x200a) || (p_char == 0x202f) || (p_char == 0x205f) || (p_char == 0x3000) || (p_char == 0x2028) || (p_char == 0x2029) || (p_char >= 0x0009 && p_char <= 0x000d) || (p_char == 0x0085); +constexpr bool is_whitespace(char32_t p_char) { + return (p_char == ' ') || (p_char == 0x00a0) || (p_char == 0x1680) || (p_char >= 0x2000 && p_char <= 0x200b) || (p_char == 0x202f) || (p_char == 0x205f) || (p_char == 0x3000) || (p_char == 0x2028) || (p_char == 0x2029) || (p_char >= 0x0009 && p_char <= 0x000d) || (p_char == 0x0085); } -static _FORCE_INLINE_ bool is_linebreak(char32_t p_char) { +constexpr bool is_linebreak(char32_t p_char) { return (p_char >= 0x000a && p_char <= 0x000d) || (p_char == 0x0085) || (p_char == 0x2028) || (p_char == 0x2029); } -static _FORCE_INLINE_ bool is_punct(char32_t p_char) { +constexpr bool is_punct(char32_t p_char) { return (p_char >= ' ' && p_char <= '/') || (p_char >= ':' && p_char <= '@') || (p_char >= '[' && p_char <= '^') || (p_char == '`') || (p_char >= '{' && p_char <= '~') || (p_char >= 0x2000 && p_char <= 0x206f) || (p_char >= 0x3000 && p_char <= 0x303f); } -static _FORCE_INLINE_ bool is_underscore(char32_t p_char) { +constexpr bool is_underscore(char32_t p_char) { return (p_char == '_'); } -#endif // GODOT_CHAR_UTILS_HPP +} // namespace godot diff --git a/include/godot_cpp/variant/color.hpp b/include/godot_cpp/variant/color.hpp index 0e837bc9f..d3bbc725b 100644 --- a/include/godot_cpp/variant/color.hpp +++ b/include/godot_cpp/variant/color.hpp @@ -28,8 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef GODOT_COLOR_HPP -#define GODOT_COLOR_HPP +#pragma once #include @@ -37,7 +36,7 @@ namespace godot { class String; -struct _NO_DISCARD_ Color { +struct [[nodiscard]] Color { union { struct { float r; @@ -103,12 +102,10 @@ struct _NO_DISCARD_ Color { _FORCE_INLINE_ Color lerp(const Color &p_to, float p_weight) const { Color res = *this; - - res.r += (p_weight * (p_to.r - r)); - res.g += (p_weight * (p_to.g - g)); - res.b += (p_weight * (p_to.b - b)); - res.a += (p_weight * (p_to.a - a)); - + res.r = Math::lerp(res.r, p_to.r, p_weight); + res.g = Math::lerp(res.g, p_to.g, p_weight); + res.b = Math::lerp(res.b, p_to.b, p_weight); + res.a = Math::lerp(res.a, p_to.a, p_weight); return res; } @@ -129,33 +126,46 @@ struct _NO_DISCARD_ Color { } _FORCE_INLINE_ uint32_t to_rgbe9995() const { - const float pow2to9 = 512.0f; - const float B = 15.0f; - const float N = 9.0f; - - float sharedexp = 65408.000f; // Result of: ((pow2to9 - 1.0f) / pow2to9) * powf(2.0f, 31.0f - 15.0f) - - float cRed = MAX(0.0f, MIN(sharedexp, r)); - float cGreen = MAX(0.0f, MIN(sharedexp, g)); - float cBlue = MAX(0.0f, MIN(sharedexp, b)); - - float cMax = MAX(cRed, MAX(cGreen, cBlue)); - - float expp = MAX(-B - 1.0f, floor(Math::log(cMax) / (real_t)Math_LN2)) + 1.0f + B; - - float sMax = (float)floor((cMax / Math::pow(2.0f, expp - B - N)) + 0.5f); - - float exps = expp + 1.0f; - - if (0.0f <= sMax && sMax < pow2to9) { - exps = expp; - } - - float sRed = Math::floor((cRed / pow(2.0f, exps - B - N)) + 0.5f); - float sGreen = Math::floor((cGreen / pow(2.0f, exps - B - N)) + 0.5f); - float sBlue = Math::floor((cBlue / pow(2.0f, exps - B - N)) + 0.5f); - - return (uint32_t(Math::fast_ftoi(sRed)) & 0x1FF) | ((uint32_t(Math::fast_ftoi(sGreen)) & 0x1FF) << 9) | ((uint32_t(Math::fast_ftoi(sBlue)) & 0x1FF) << 18) | ((uint32_t(Math::fast_ftoi(exps)) & 0x1F) << 27); + // https://github.com/microsoft/DirectX-Graphics-Samples/blob/v10.0.19041.0/MiniEngine/Core/Color.cpp + static const float kMaxVal = float(0x1FF << 7); + static const float kMinVal = float(1.f / (1 << 16)); + + // Clamp RGB to [0, 1.FF*2^16] + const float _r = CLAMP(r, 0.0f, kMaxVal); + const float _g = CLAMP(g, 0.0f, kMaxVal); + const float _b = CLAMP(b, 0.0f, kMaxVal); + + // Compute the maximum channel, no less than 1.0*2^-15 + const float MaxChannel = MAX(MAX(_r, _g), MAX(_b, kMinVal)); + + // Take the exponent of the maximum channel (rounding up the 9th bit) and + // add 15 to it. When added to the channels, it causes the implicit '1.0' + // bit and the first 8 mantissa bits to be shifted down to the low 9 bits + // of the mantissa, rounding the truncated bits. + union { + float f; + uint32_t i; + } R, G, B, E; + + E.f = MaxChannel; + E.i += 0x07804000; // Add 15 to the exponent and 0x4000 to the mantissa + E.i &= 0x7F800000; // Zero the mantissa + + // This shifts the 9-bit values we need into the lowest bits, rounding as + // needed. Note that if the channel has a smaller exponent than the max + // channel, it will shift even more. This is intentional. + R.f = _r + E.f; + G.f = _g + E.f; + B.f = _b + E.f; + + // Convert the Bias to the correct exponent in the upper 5 bits. + E.i <<= 4; + E.i += 0x10000000; + + // Combine the fields. RGB floats have unwanted data in the upper 9 + // bits. Only red needs to mask them off because green and blue shift + // it out to the left. + return E.i | (B.i << 18U) | (G.i << 9U) | (R.i & 511U); } _FORCE_INLINE_ Color blend(const Color &p_over) const { @@ -174,16 +184,16 @@ struct _NO_DISCARD_ Color { _FORCE_INLINE_ Color srgb_to_linear() const { return Color( - r < 0.04045f ? r * (1.0f / 12.92f) : Math::pow((r + 0.055f) * (float)(1.0 / (1.0 + 0.055)), 2.4f), - g < 0.04045f ? g * (1.0f / 12.92f) : Math::pow((g + 0.055f) * (float)(1.0 / (1.0 + 0.055)), 2.4f), - b < 0.04045f ? b * (1.0f / 12.92f) : Math::pow((b + 0.055f) * (float)(1.0 / (1.0 + 0.055)), 2.4f), + r < 0.04045f ? r * (1.0f / 12.92f) : Math::pow(float((r + 0.055) * (1.0 / (1.0 + 0.055))), 2.4f), + g < 0.04045f ? g * (1.0f / 12.92f) : Math::pow(float((g + 0.055) * (1.0 / (1.0 + 0.055))), 2.4f), + b < 0.04045f ? b * (1.0f / 12.92f) : Math::pow(float((b + 0.055) * (1.0 / (1.0 + 0.055))), 2.4f), a); } _FORCE_INLINE_ Color linear_to_srgb() const { return Color( - r < 0.0031308f ? 12.92f * r : (1.0f + 0.055f) * Math::pow(r, 1.0f / 2.4f) - 0.055f, - g < 0.0031308f ? 12.92f * g : (1.0f + 0.055f) * Math::pow(g, 1.0f / 2.4f) - 0.055f, - b < 0.0031308f ? 12.92f * b : (1.0f + 0.055f) * Math::pow(b, 1.0f / 2.4f) - 0.055f, a); + r < 0.0031308f ? 12.92f * r : (1.0 + 0.055) * Math::pow(r, 1.0f / 2.4f) - 0.055, + g < 0.0031308f ? 12.92f * g : (1.0 + 0.055) * Math::pow(g, 1.0f / 2.4f) - 0.055, + b < 0.0031308f ? 12.92f * b : (1.0 + 0.055) * Math::pow(b, 1.0f / 2.4f) - 0.055, a); } static Color hex(uint32_t p_hex); @@ -199,6 +209,7 @@ struct _NO_DISCARD_ Color { static Color from_string(const String &p_string, const Color &p_default); static Color from_hsv(float p_h, float p_s, float p_v, float p_alpha = 1.0f); static Color from_rgbe9995(uint32_t p_rgbe); + static Color from_rgba8(int64_t p_r8, int64_t p_g8, int64_t p_b8, int64_t p_a8 = 255); _FORCE_INLINE_ bool operator<(const Color &p_color) const; // Used in set keys. operator String() const; @@ -285,5 +296,3 @@ _FORCE_INLINE_ Color operator*(float p_scalar, const Color &p_color) { } } // namespace godot - -#endif // GODOT_COLOR_HPP diff --git a/include/godot_cpp/variant/color_names.inc.hpp b/include/godot_cpp/variant/color_names.inc.hpp index d7708e5d6..3a2c359c0 100644 --- a/include/godot_cpp/variant/color_names.inc.hpp +++ b/include/godot_cpp/variant/color_names.inc.hpp @@ -28,8 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef GODOT_COLOR_NAMES_INC_HPP -#define GODOT_COLOR_NAMES_INC_HPP +#pragma once namespace godot { @@ -188,9 +187,6 @@ static NamedColor named_colors[] = { { "WHITE_SMOKE", Color::hex(0xF5F5F5FF) }, { "YELLOW", Color::hex(0xFFFF00FF) }, { "YELLOW_GREEN", Color::hex(0x9ACD32FF) }, - { nullptr, Color() }, }; } // namespace godot - -#endif // GODOT_COLOR_NAMES_INC_HPP diff --git a/include/godot_cpp/variant/plane.hpp b/include/godot_cpp/variant/plane.hpp index 829f801f4..97ae7c81d 100644 --- a/include/godot_cpp/variant/plane.hpp +++ b/include/godot_cpp/variant/plane.hpp @@ -28,8 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef GODOT_PLANE_HPP -#define GODOT_PLANE_HPP +#pragma once #include #include @@ -38,7 +37,7 @@ namespace godot { class Variant; -struct _NO_DISCARD_ Plane { +struct [[nodiscard]] Plane { Vector3 normal; real_t d = 0; @@ -50,7 +49,7 @@ struct _NO_DISCARD_ Plane { /* Plane-Point operations */ - _FORCE_INLINE_ Vector3 center() const { return normal * d; } + _FORCE_INLINE_ Vector3 get_center() const { return normal * d; } Vector3 get_any_perpendicular_normal() const; _FORCE_INLINE_ bool is_point_over(const Vector3 &p_point) const; ///< Point is over plane @@ -103,7 +102,7 @@ real_t Plane::distance_to(const Vector3 &p_point) const { bool Plane::has_point(const Vector3 &p_point, real_t p_tolerance) const { real_t dist = normal.dot(p_point) - d; - dist = Math::abs(dist); + dist = ABS(dist); return (dist <= p_tolerance); } @@ -137,5 +136,3 @@ bool Plane::operator!=(const Plane &p_plane) const { } } // namespace godot - -#endif // GODOT_PLANE_HPP diff --git a/include/godot_cpp/variant/projection.hpp b/include/godot_cpp/variant/projection.hpp index 1de6c0244..42eb41662 100644 --- a/include/godot_cpp/variant/projection.hpp +++ b/include/godot_cpp/variant/projection.hpp @@ -28,10 +28,10 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef GODOT_PROJECTION_HPP -#define GODOT_PROJECTION_HPP +#pragma once #include +#include #include #include @@ -44,7 +44,7 @@ struct Rect2; struct Transform3D; struct Vector2; -struct _NO_DISCARD_ Projection { +struct [[nodiscard]] Projection { enum Planes { PLANE_NEAR, PLANE_FAR, @@ -56,21 +56,21 @@ struct _NO_DISCARD_ Projection { Vector4 columns[4]; - _FORCE_INLINE_ const Vector4 &operator[](const int p_axis) const { + _FORCE_INLINE_ const Vector4 &operator[](int p_axis) const { DEV_ASSERT((unsigned int)p_axis < 4); return columns[p_axis]; } - _FORCE_INLINE_ Vector4 &operator[](const int p_axis) { + _FORCE_INLINE_ Vector4 &operator[](int p_axis) { DEV_ASSERT((unsigned int)p_axis < 4); return columns[p_axis]; } - float determinant() const; + real_t determinant() const; void set_identity(); void set_zero(); void set_light_bias(); - void set_depth_correction(bool p_flip_y = true); + void set_depth_correction(bool p_flip_y = true, bool p_reverse_z = true, bool p_remap_z = true); void set_light_atlas_rect(const Rect2 &p_rect); void set_perspective(real_t p_fovy_degrees, real_t p_aspect, real_t p_z_near, real_t p_z_far, bool p_flip_fov = false); @@ -107,7 +107,7 @@ struct _NO_DISCARD_ Projection { real_t get_fov() const; bool is_orthogonal() const; - Array get_projection_planes(const Transform3D &p_transform) const; + Vector get_projection_planes(const Transform3D &p_transform) const; bool get_endpoints(const Transform3D &p_transform, Vector3 *p_8points) const; Vector2 get_viewport_half_extents() const; @@ -149,10 +149,11 @@ struct _NO_DISCARD_ Projection { return !(*this == p_cam); } - float get_lod_multiplier() const; + real_t get_lod_multiplier() const; Projection(); Projection(const Vector4 &p_x, const Vector4 &p_y, const Vector4 &p_z, const Vector4 &p_w); + Projection(real_t p_xx, real_t p_xy, real_t p_xz, real_t p_xw, real_t p_yx, real_t p_yy, real_t p_yz, real_t p_yw, real_t p_zx, real_t p_zy, real_t p_zz, real_t p_zw, real_t p_wx, real_t p_wy, real_t p_wz, real_t p_ww); Projection(const Transform3D &p_transform); ~Projection(); }; @@ -167,5 +168,3 @@ Vector3 Projection::xform(const Vector3 &p_vec3) const { } } // namespace godot - -#endif // GODOT_PROJECTION_HPP diff --git a/include/godot_cpp/variant/quaternion.hpp b/include/godot_cpp/variant/quaternion.hpp index 8d0afd788..c93fe57e8 100644 --- a/include/godot_cpp/variant/quaternion.hpp +++ b/include/godot_cpp/variant/quaternion.hpp @@ -28,8 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef GODOT_QUATERNION_HPP -#define GODOT_QUATERNION_HPP +#pragma once #include #include @@ -37,7 +36,7 @@ namespace godot { -struct _NO_DISCARD_ Quaternion { +struct [[nodiscard]] Quaternion { union { struct { real_t x; @@ -143,15 +142,24 @@ struct _NO_DISCARD_ Quaternion { } Quaternion(const Vector3 &p_v0, const Vector3 &p_v1) { // Shortest arc. - Vector3 c = p_v0.cross(p_v1); - real_t d = p_v0.dot(p_v1); - - if (d < -1.0f + (real_t)CMP_EPSILON) { - x = 0; - y = 1; - z = 0; +#ifdef MATH_CHECKS + ERR_FAIL_COND_MSG(p_v0.is_zero_approx() || p_v1.is_zero_approx(), "The vectors must not be zero."); +#endif + constexpr real_t ALMOST_ONE = 1.0f - (real_t)CMP_EPSILON; + Vector3 n0 = p_v0.normalized(); + Vector3 n1 = p_v1.normalized(); + real_t d = n0.dot(n1); + if (abs(d) > ALMOST_ONE) { + if (d >= 0) { + return; // Vectors are same. + } + Vector3 axis = n0.get_any_perpendicular(); + x = axis.x; + y = axis.y; + z = axis.z; w = 0; } else { + Vector3 c = n0.cross(n1); real_t s = Math::sqrt((1.0f + d) * 2.0f); real_t rs = 1.0f / s; @@ -232,5 +240,3 @@ _FORCE_INLINE_ Quaternion operator*(real_t p_real, const Quaternion &p_quaternio } } // namespace godot - -#endif // GODOT_QUATERNION_HPP diff --git a/include/godot_cpp/variant/rect2.hpp b/include/godot_cpp/variant/rect2.hpp index 31c81aa27..a5e334041 100644 --- a/include/godot_cpp/variant/rect2.hpp +++ b/include/godot_cpp/variant/rect2.hpp @@ -28,8 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef GODOT_RECT2_HPP -#define GODOT_RECT2_HPP +#pragma once #include #include @@ -40,7 +39,7 @@ class String; struct Rect2i; struct Transform2D; -struct _NO_DISCARD_ Rect2 { +struct [[nodiscard]] Rect2 { Point2 position; Size2 size; @@ -53,7 +52,7 @@ struct _NO_DISCARD_ Rect2 { _FORCE_INLINE_ Vector2 get_center() const { return position + (size * 0.5f); } - inline bool intersects(const Rect2 &p_rect, const bool p_include_borders = false) const { + inline bool intersects(const Rect2 &p_rect, bool p_include_borders = false) const { #ifdef MATH_CHECKS if (unlikely(size.x < 0 || size.y < 0 || p_rect.size.x < 0 || p_rect.size.y < 0)) { ERR_PRINT("Rect2 size is negative, this is not supported. Use Rect2.abs() to get a Rect2 with a positive size."); @@ -106,17 +105,17 @@ struct _NO_DISCARD_ Rect2 { } if (p_point.y < position.y) { real_t d = position.y - p_point.y; - dist = inside ? d : Math::min(dist, d); + dist = inside ? d : MIN(dist, d); inside = false; } if (p_point.x >= (position.x + size.x)) { real_t d = p_point.x - (position.x + size.x); - dist = inside ? d : Math::min(dist, d); + dist = inside ? d : MIN(dist, d); inside = false; } if (p_point.y >= (position.y + size.y)) { real_t d = p_point.y - (position.y + size.y); - dist = inside ? d : Math::min(dist, d); + dist = inside ? d : MIN(dist, d); inside = false; } @@ -146,7 +145,7 @@ struct _NO_DISCARD_ Rect2 { return size.x > 0.0f && size.y > 0.0f; } - // Returns the intersection between two Rect2s or an empty Rect2 if there is no intersection + // Returns the intersection between two Rect2s or an empty Rect2 if there is no intersection. inline Rect2 intersection(const Rect2 &p_rect) const { Rect2 new_rect = p_rect; @@ -283,13 +282,19 @@ struct _NO_DISCARD_ Rect2 { return Rect2(position + size.minf(0), size.abs()); } - Vector2 get_support(const Vector2 &p_normal) const { - Vector2 half_extents = size * 0.5f; - Vector2 ofs = position + half_extents; - return Vector2( - (p_normal.x > 0) ? -half_extents.x : half_extents.x, - (p_normal.y > 0) ? -half_extents.y : half_extents.y) + - ofs; + _FORCE_INLINE_ Rect2 round() const { + return Rect2(position.round(), size.round()); + } + + Vector2 get_support(const Vector2 &p_direction) const { + Vector2 support = position; + if (p_direction.x > 0.0f) { + support.x += size.x; + } + if (p_direction.y > 0.0f) { + support.y += size.y; + } + return support; } _FORCE_INLINE_ bool intersects_filled_polygon(const Vector2 *p_points, int p_point_count) const { @@ -305,14 +310,14 @@ struct _NO_DISCARD_ Rect2 { i_f = i; Vector2 r = (b - a); - float l = r.length(); + const real_t l = r.length(); if (l == 0.0f) { continue; } // Check inside. Vector2 tg = r.orthogonal(); - float s = tg.dot(center) - tg.dot(a); + const real_t s = tg.dot(center) - tg.dot(a); if (s < 0.0f) { side_plus++; } else { @@ -328,8 +333,8 @@ struct _NO_DISCARD_ Rect2 { Vector2 t13 = (position - a) * ir; Vector2 t24 = (end - a) * ir; - float tmin = Math::max(Math::min(t13.x, t24.x), Math::min(t13.y, t24.y)); - float tmax = Math::min(Math::max(t13.x, t24.x), Math::max(t13.y, t24.y)); + const real_t tmin = MAX(MIN(t13.x, t24.x), MIN(t13.y, t24.y)); + const real_t tmax = MIN(MAX(t13.x, t24.x), MAX(t13.y, t24.y)); // if tmax < 0, ray (line) is intersecting AABB, but the whole AABB is behind us if (tmax < 0 || tmin > tmax || tmin >= l) { @@ -369,5 +374,3 @@ struct _NO_DISCARD_ Rect2 { }; } // namespace godot - -#endif // GODOT_RECT2_HPP diff --git a/include/godot_cpp/variant/rect2i.hpp b/include/godot_cpp/variant/rect2i.hpp index 57b090592..0c593edeb 100644 --- a/include/godot_cpp/variant/rect2i.hpp +++ b/include/godot_cpp/variant/rect2i.hpp @@ -28,8 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef GODOT_RECT2I_HPP -#define GODOT_RECT2I_HPP +#pragma once #include #include @@ -39,7 +38,7 @@ namespace godot { class String; struct Rect2; -struct _NO_DISCARD_ Rect2i { +struct [[nodiscard]] Rect2i { Point2i position; Size2i size; @@ -89,7 +88,7 @@ struct _NO_DISCARD_ Rect2i { return size.x > 0 && size.y > 0; } - // Returns the intersection between two Rect2is or an empty Rect2i if there is no intersection + // Returns the intersection between two Rect2is or an empty Rect2i if there is no intersection. inline Rect2i intersection(const Rect2i &p_rect) const { Rect2i new_rect = p_rect; @@ -241,5 +240,3 @@ struct _NO_DISCARD_ Rect2i { }; } // namespace godot - -#endif // GODOT_RECT2I_HPP diff --git a/include/godot_cpp/variant/transform2d.hpp b/include/godot_cpp/variant/transform2d.hpp index d73323f31..9170e5688 100644 --- a/include/godot_cpp/variant/transform2d.hpp +++ b/include/godot_cpp/variant/transform2d.hpp @@ -28,8 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef GODOT_TRANSFORM2D_HPP -#define GODOT_TRANSFORM2D_HPP +#pragma once #include #include @@ -39,22 +38,25 @@ namespace godot { class String; -struct _NO_DISCARD_ Transform2D { - // Warning #1: basis of Transform2D is stored differently from Basis. In terms of columns array, the basis matrix looks like "on paper": +struct [[nodiscard]] Transform2D { + // WARNING: The basis of Transform2D is stored differently from Basis. + // In terms of columns array, the basis matrix looks like "on paper": // M = (columns[0][0] columns[1][0]) // (columns[0][1] columns[1][1]) - // This is such that the columns, which can be interpreted as basis vectors of the coordinate system "painted" on the object, can be accessed as columns[i]. - // Note that this is the opposite of the indices in mathematical texts, meaning: $M_{12}$ in a math book corresponds to columns[1][0] here. + // This is such that the columns, which can be interpreted as basis vectors + // of the coordinate system "painted" on the object, can be accessed as columns[i]. + // NOTE: This is the opposite of the indices in mathematical texts, + // meaning: $M_{12}$ in a math book corresponds to columns[1][0] here. // This requires additional care when working with explicit indices. // See https://en.wikipedia.org/wiki/Row-_and_column-major_order for further reading. - // Warning #2: 2D be aware that unlike 3D code, 2D code uses a left-handed coordinate system: Y-axis points down, - // and angle is measure from +X to +Y in a clockwise-fashion. + // WARNING: Be aware that unlike 3D code, 2D code uses a left-handed coordinate system: + // Y-axis points down, and angle is measure from +X to +Y in a clockwise-fashion. Vector2 columns[3]; - _FORCE_INLINE_ real_t tdotx(const Vector2 &v) const { return columns[0][0] * v.x + columns[1][0] * v.y; } - _FORCE_INLINE_ real_t tdoty(const Vector2 &v) const { return columns[0][1] * v.x + columns[1][1] * v.y; } + _FORCE_INLINE_ real_t tdotx(const Vector2 &p_v) const { return columns[0][0] * p_v.x + columns[1][0] * p_v.y; } + _FORCE_INLINE_ real_t tdoty(const Vector2 &p_v) const { return columns[0][1] * p_v.x + columns[1][1] * p_v.y; } const Vector2 &operator[](int p_idx) const { return columns[p_idx]; } Vector2 &operator[](int p_idx) { return columns[p_idx]; } @@ -65,20 +67,20 @@ struct _NO_DISCARD_ Transform2D { void affine_invert(); Transform2D affine_inverse() const; - void set_rotation(const real_t p_rot); + void set_rotation(real_t p_rot); real_t get_rotation() const; real_t get_skew() const; - void set_skew(const real_t p_angle); - _FORCE_INLINE_ void set_rotation_and_scale(const real_t p_rot, const Size2 &p_scale); - _FORCE_INLINE_ void set_rotation_scale_and_skew(const real_t p_rot, const Size2 &p_scale, const real_t p_skew); - void rotate(const real_t p_angle); + void set_skew(real_t p_angle); + _FORCE_INLINE_ void set_rotation_and_scale(real_t p_rot, const Size2 &p_scale); + _FORCE_INLINE_ void set_rotation_scale_and_skew(real_t p_rot, const Size2 &p_scale, real_t p_skew); + void rotate(real_t p_angle); void scale(const Size2 &p_scale); void scale_basis(const Size2 &p_scale); - void translate_local(const real_t p_tx, const real_t p_ty); + void translate_local(real_t p_tx, real_t p_ty); void translate_local(const Vector2 &p_translation); - real_t basis_determinant() const; + real_t determinant() const; Size2 get_scale() const; void set_scale(const Size2 &p_scale); @@ -86,18 +88,18 @@ struct _NO_DISCARD_ Transform2D { _FORCE_INLINE_ const Vector2 &get_origin() const { return columns[2]; } _FORCE_INLINE_ void set_origin(const Vector2 &p_origin) { columns[2] = p_origin; } - Transform2D basis_scaled(const Size2 &p_scale) const; Transform2D scaled(const Size2 &p_scale) const; Transform2D scaled_local(const Size2 &p_scale) const; Transform2D translated(const Vector2 &p_offset) const; Transform2D translated_local(const Vector2 &p_offset) const; - Transform2D rotated(const real_t p_angle) const; - Transform2D rotated_local(const real_t p_angle) const; + Transform2D rotated(real_t p_angle) const; + Transform2D rotated_local(real_t p_angle) const; Transform2D untranslated() const; void orthonormalize(); Transform2D orthonormalized() const; + bool is_conformal() const; bool is_equal_approx(const Transform2D &p_transform) const; bool is_finite() const; @@ -108,10 +110,12 @@ struct _NO_DISCARD_ Transform2D { void operator*=(const Transform2D &p_transform); Transform2D operator*(const Transform2D &p_transform) const; - void operator*=(const real_t p_val); - Transform2D operator*(const real_t p_val) const; + void operator*=(real_t p_val); + Transform2D operator*(real_t p_val) const; + void operator/=(real_t p_val); + Transform2D operator/(real_t p_val) const; - Transform2D interpolate_with(const Transform2D &p_transform, const real_t p_c) const; + Transform2D interpolate_with(const Transform2D &p_transform, real_t p_c) const; _FORCE_INLINE_ Vector2 basis_xform(const Vector2 &p_vec) const; _FORCE_INLINE_ Vector2 basis_xform_inv(const Vector2 &p_vec) const; @@ -124,13 +128,13 @@ struct _NO_DISCARD_ Transform2D { operator String() const; - Transform2D(const real_t xx, const real_t xy, const real_t yx, const real_t yy, const real_t ox, const real_t oy) { - columns[0][0] = xx; - columns[0][1] = xy; - columns[1][0] = yx; - columns[1][1] = yy; - columns[2][0] = ox; - columns[2][1] = oy; + Transform2D(real_t p_xx, real_t p_xy, real_t p_yx, real_t p_yy, real_t p_ox, real_t p_oy) { + columns[0][0] = p_xx; + columns[0][1] = p_xy; + columns[1][0] = p_yx; + columns[1][1] = p_yy; + columns[2][0] = p_ox; + columns[2][1] = p_oy; } Transform2D(const Vector2 &p_x, const Vector2 &p_y, const Vector2 &p_origin) { @@ -139,9 +143,9 @@ struct _NO_DISCARD_ Transform2D { columns[2] = p_origin; } - Transform2D(const real_t p_rot, const Vector2 &p_pos); + Transform2D(real_t p_rot, const Vector2 &p_pos); - Transform2D(const real_t p_rot, const Size2 &p_scale, const real_t p_skew, const Vector2 &p_pos); + Transform2D(real_t p_rot, const Size2 &p_scale, real_t p_skew, const Vector2 &p_pos); Transform2D() { columns[0][0] = 1.0; @@ -189,14 +193,14 @@ Rect2 Transform2D::xform(const Rect2 &p_rect) const { return new_rect; } -void Transform2D::set_rotation_and_scale(const real_t p_rot, const Size2 &p_scale) { +void Transform2D::set_rotation_and_scale(real_t p_rot, const Size2 &p_scale) { columns[0][0] = Math::cos(p_rot) * p_scale.x; columns[1][1] = Math::cos(p_rot) * p_scale.y; columns[1][0] = -Math::sin(p_rot) * p_scale.y; columns[0][1] = Math::sin(p_rot) * p_scale.x; } -void Transform2D::set_rotation_scale_and_skew(const real_t p_rot, const Size2 &p_scale, const real_t p_skew) { +void Transform2D::set_rotation_scale_and_skew(real_t p_rot, const Size2 &p_scale, real_t p_skew) { columns[0][0] = Math::cos(p_rot) * p_scale.x; columns[1][1] = Math::cos(p_rot + p_skew) * p_scale.y; columns[1][0] = -Math::sin(p_rot + p_skew) * p_scale.y; @@ -247,5 +251,3 @@ PackedVector2Array Transform2D::xform_inv(const PackedVector2Array &p_array) con } } // namespace godot - -#endif // GODOT_TRANSFORM2D_HPP diff --git a/include/godot_cpp/variant/transform3d.hpp b/include/godot_cpp/variant/transform3d.hpp index 6fa5999ed..80392e396 100644 --- a/include/godot_cpp/variant/transform3d.hpp +++ b/include/godot_cpp/variant/transform3d.hpp @@ -28,8 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef GODOT_TRANSFORM3D_HPP -#define GODOT_TRANSFORM3D_HPP +#pragma once #include #include @@ -39,7 +38,7 @@ namespace godot { -struct _NO_DISCARD_ Transform3D { +struct [[nodiscard]] Transform3D { Basis basis; Vector3 origin; @@ -55,8 +54,8 @@ struct _NO_DISCARD_ Transform3D { void rotate(const Vector3 &p_axis, real_t p_angle); void rotate_basis(const Vector3 &p_axis, real_t p_angle); - void set_look_at(const Vector3 &p_eye, const Vector3 &p_target, const Vector3 &p_up = Vector3(0, 1, 0)); - Transform3D looking_at(const Vector3 &p_target, const Vector3 &p_up = Vector3(0, 1, 0)) const; + void set_look_at(const Vector3 &p_eye, const Vector3 &p_target, const Vector3 &p_up = Vector3(0, 1, 0), bool p_use_model_front = false); + Transform3D looking_at(const Vector3 &p_target, const Vector3 &p_up = Vector3(0, 1, 0), bool p_use_model_front = false) const; void scale(const Vector3 &p_scale); Transform3D scaled(const Vector3 &p_scale) const; @@ -105,8 +104,10 @@ struct _NO_DISCARD_ Transform3D { void operator*=(const Transform3D &p_transform); Transform3D operator*(const Transform3D &p_transform) const; - void operator*=(const real_t p_val); - Transform3D operator*(const real_t p_val) const; + void operator*=(real_t p_val); + Transform3D operator*(real_t p_val) const; + void operator/=(real_t p_val); + Transform3D operator/(real_t p_val) const; Transform3D interpolate_with(const Transform3D &p_transform, real_t p_c) const; @@ -116,11 +117,11 @@ struct _NO_DISCARD_ Transform3D { basis.xform(v)); } - void set(real_t xx, real_t xy, real_t xz, real_t yx, real_t yy, real_t yz, real_t zx, real_t zy, real_t zz, real_t tx, real_t ty, real_t tz) { - basis.set(xx, xy, xz, yx, yy, yz, zx, zy, zz); - origin.x = tx; - origin.y = ty; - origin.z = tz; + void set(real_t p_xx, real_t p_xy, real_t p_xz, real_t p_yx, real_t p_yy, real_t p_yz, real_t p_zx, real_t p_zy, real_t p_zz, real_t p_tx, real_t p_ty, real_t p_tz) { + basis.set(p_xx, p_xy, p_xz, p_yx, p_yy, p_yz, p_zx, p_zy, p_zz); + origin.x = p_tx; + origin.y = p_ty; + origin.z = p_tz; } operator String() const; @@ -128,7 +129,7 @@ struct _NO_DISCARD_ Transform3D { Transform3D() {} Transform3D(const Basis &p_basis, const Vector3 &p_origin = Vector3()); Transform3D(const Vector3 &p_x, const Vector3 &p_y, const Vector3 &p_z, const Vector3 &p_origin); - Transform3D(real_t xx, real_t xy, real_t xz, real_t yx, real_t yy, real_t yz, real_t zx, real_t zy, real_t zz, real_t ox, real_t oy, real_t oz); + Transform3D(real_t p_xx, real_t p_xy, real_t p_xz, real_t p_yx, real_t p_yy, real_t p_yz, real_t p_zx, real_t p_zy, real_t p_zz, real_t p_ox, real_t p_oy, real_t p_oz); }; _FORCE_INLINE_ Vector3 Transform3D::xform(const Vector3 &p_vector) const { @@ -272,5 +273,3 @@ _FORCE_INLINE_ Plane Transform3D::xform_inv_fast(const Plane &p_plane, const Tra } } // namespace godot - -#endif // GODOT_TRANSFORM3D_HPP diff --git a/include/godot_cpp/variant/typed_array.hpp b/include/godot_cpp/variant/typed_array.hpp index 36bbcc971..69afdaaea 100644 --- a/include/godot_cpp/variant/typed_array.hpp +++ b/include/godot_cpp/variant/typed_array.hpp @@ -28,8 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef GODOT_TYPED_ARRAY_HPP -#define GODOT_TYPED_ARRAY_HPP +#pragma once #include #include @@ -54,6 +53,8 @@ class TypedArray : public Array { assign(p_array); } } + _FORCE_INLINE_ TypedArray(std::initializer_list p_init) : + TypedArray(Array(p_init)) {} _FORCE_INLINE_ TypedArray() { set_typed(Variant::OBJECT, T::get_class_static(), Variant()); } @@ -69,6 +70,9 @@ class TypedArray : public Array { ERR_FAIL_COND_MSG(!is_same_typed(p_array), "Cannot assign an array with a different element type."); \ _ref(p_array); \ } \ + _FORCE_INLINE_ TypedArray(std::initializer_list p_init) : \ + Array(Array(p_init), m_variant_type, StringName(), Variant()) { \ + } \ _FORCE_INLINE_ TypedArray(const Variant &p_variant) : \ TypedArray(Array(p_variant)) { \ } \ @@ -138,5 +142,3 @@ MAKE_TYPED_ARRAY(PackedColorArray, Variant::PACKED_COLOR_ARRAY) #undef MAKE_TYPED_ARRAY } // namespace godot - -#endif // GODOT_TYPED_ARRAY_HPP diff --git a/include/godot_cpp/variant/typed_dictionary.hpp b/include/godot_cpp/variant/typed_dictionary.hpp index e7f35352c..122655a47 100644 --- a/include/godot_cpp/variant/typed_dictionary.hpp +++ b/include/godot_cpp/variant/typed_dictionary.hpp @@ -28,9 +28,10 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef GODOT_TYPED_DICTIONARY_HPP -#define GODOT_TYPED_DICTIONARY_HPP +#pragma once +#include +#include #include #include @@ -57,54 +58,75 @@ class TypedDictionary : public Dictionary { _FORCE_INLINE_ TypedDictionary() { set_typed(Variant::OBJECT, K::get_class_static(), Variant(), Variant::OBJECT, V::get_class_static(), Variant()); } + _FORCE_INLINE_ TypedDictionary(std::initializer_list> p_init) : + Dictionary() { + set_typed(Variant::OBJECT, K::get_class_static(), Variant(), Variant::OBJECT, V::get_class_static(), Variant()); + for (const KeyValue &E : p_init) { + operator[](E.key) = E.value; + } + } }; //specialization for the rest of variant types -#define MAKE_TYPED_DICTIONARY_WITH_OBJECT(m_type, m_variant_type) \ - template \ - class TypedDictionary : public Dictionary { \ - public: \ - _FORCE_INLINE_ void operator=(const Dictionary &p_dictionary) { \ - ERR_FAIL_COND_MSG(!is_same_typed(p_dictionary), "Cannot assign an dictionary with a different element type."); \ - Dictionary::operator=(p_dictionary); \ - } \ - _FORCE_INLINE_ TypedDictionary(const Variant &p_variant) : \ - TypedDictionary(Dictionary(p_variant)) { \ - } \ - _FORCE_INLINE_ TypedDictionary(const Dictionary &p_dictionary) { \ - set_typed(Variant::OBJECT, T::get_class_static(), Variant(), m_variant_type, StringName(), Variant()); \ - if (is_same_typed(p_dictionary)) { \ - Dictionary::operator=(p_dictionary); \ - } else { \ - assign(p_dictionary); \ - } \ - } \ - _FORCE_INLINE_ TypedDictionary() { \ - set_typed(Variant::OBJECT, T::get_class_static(), Variant(), m_variant_type, StringName(), Variant()); \ - } \ - }; \ - template \ - class TypedDictionary : public Dictionary { \ - public: \ - _FORCE_INLINE_ void operator=(const Dictionary &p_dictionary) { \ - ERR_FAIL_COND_MSG(!is_same_typed(p_dictionary), "Cannot assign an dictionary with a different element type."); \ - Dictionary::operator=(p_dictionary); \ - } \ - _FORCE_INLINE_ TypedDictionary(const Variant &p_variant) : \ - TypedDictionary(Dictionary(p_variant)) { \ - } \ - _FORCE_INLINE_ TypedDictionary(const Dictionary &p_dictionary) { \ - set_typed(m_variant_type, StringName(), Variant(), Variant::OBJECT, T::get_class_static(), Variant()); \ - if (is_same_typed(p_dictionary)) { \ - Dictionary::operator=(p_dictionary); \ - } else { \ - assign(p_dictionary); \ - } \ - } \ - _FORCE_INLINE_ TypedDictionary() { \ - set_typed(m_variant_type, StringName(), Variant(), Variant::OBJECT, T::get_class_static(), Variant()); \ - } \ +#define MAKE_TYPED_DICTIONARY_WITH_OBJECT(m_type, m_variant_type) \ + template \ + class TypedDictionary : public Dictionary { \ + public: \ + _FORCE_INLINE_ void operator=(const Dictionary &p_dictionary) { \ + ERR_FAIL_COND_MSG(!is_same_typed(p_dictionary), "Cannot assign an dictionary with a different element type."); \ + Dictionary::operator=(p_dictionary); \ + } \ + _FORCE_INLINE_ TypedDictionary(const Variant &p_variant) : \ + TypedDictionary(Dictionary(p_variant)) { \ + } \ + _FORCE_INLINE_ TypedDictionary(const Dictionary &p_dictionary) { \ + set_typed(Variant::OBJECT, T::get_class_static(), Variant(), m_variant_type, StringName(), Variant()); \ + if (is_same_typed(p_dictionary)) { \ + Dictionary::operator=(p_dictionary); \ + } else { \ + assign(p_dictionary); \ + } \ + } \ + _FORCE_INLINE_ TypedDictionary() { \ + set_typed(Variant::OBJECT, T::get_class_static(), Variant(), m_variant_type, StringName(), Variant()); \ + } \ + _FORCE_INLINE_ TypedDictionary(std::initializer_list> p_init) : \ + Dictionary() { \ + set_typed(Variant::OBJECT, T::get_class_static(), Variant(), m_variant_type, StringName(), Variant()); \ + for (const KeyValue &E : p_init) { \ + operator[](E.key) = E.value; \ + } \ + } \ + }; \ + template \ + class TypedDictionary : public Dictionary { \ + public: \ + _FORCE_INLINE_ void operator=(const Dictionary &p_dictionary) { \ + ERR_FAIL_COND_MSG(!is_same_typed(p_dictionary), "Cannot assign an dictionary with a different element type."); \ + Dictionary::operator=(p_dictionary); \ + } \ + _FORCE_INLINE_ TypedDictionary(const Variant &p_variant) : \ + TypedDictionary(Dictionary(p_variant)) { \ + } \ + _FORCE_INLINE_ TypedDictionary(const Dictionary &p_dictionary) { \ + set_typed(m_variant_type, StringName(), Variant(), Variant::OBJECT, T::get_class_static(), Variant()); \ + if (is_same_typed(p_dictionary)) { \ + Dictionary::operator=(p_dictionary); \ + } else { \ + assign(p_dictionary); \ + } \ + } \ + _FORCE_INLINE_ TypedDictionary() { \ + set_typed(m_variant_type, StringName(), Variant(), Variant::OBJECT, T::get_class_static(), Variant()); \ + } \ + _FORCE_INLINE_ TypedDictionary(std::initializer_list> p_init) : \ + Dictionary() { \ + set_typed(m_variant_type, StringName(), Variant(), Variant::OBJECT, std::remove_pointer::type::get_class_static(), Variant()); \ + for (const KeyValue &E : p_init) { \ + operator[](E.key) = E.value; \ + } \ + } \ }; #define MAKE_TYPED_DICTIONARY_EXPANDED(m_type_key, m_variant_type_key, m_type_value, m_variant_type_value) \ @@ -129,6 +151,13 @@ class TypedDictionary : public Dictionary { _FORCE_INLINE_ TypedDictionary() { \ set_typed(m_variant_type_key, StringName(), Variant(), m_variant_type_value, StringName(), Variant()); \ } \ + _FORCE_INLINE_ TypedDictionary(std::initializer_list> p_init) : \ + Dictionary() { \ + set_typed(m_variant_type_key, StringName(), Variant(), m_variant_type_value, StringName(), Variant()); \ + for (const KeyValue &E : p_init) { \ + operator[](E.key) = E.value; \ + } \ + } \ }; #define MAKE_TYPED_DICTIONARY_NIL(m_type, m_variant_type) \ @@ -233,6 +262,204 @@ MAKE_TYPED_DICTIONARY(IPAddress, Variant::STRING) #undef MAKE_TYPED_DICTIONARY_EXPANDED #undef MAKE_TYPED_DICTIONARY_WITH_OBJECT -} // namespace godot +template +struct PtrToArg> { + _FORCE_INLINE_ static TypedDictionary convert(const void *p_ptr) { + return TypedDictionary(*reinterpret_cast(p_ptr)); + } + typedef Dictionary EncodeT; + _FORCE_INLINE_ static void encode(TypedDictionary p_val, void *p_ptr) { + *(Dictionary *)p_ptr = p_val; + } +}; + +template +struct PtrToArg &> { + typedef Dictionary EncodeT; + _FORCE_INLINE_ static TypedDictionary + convert(const void *p_ptr) { + return TypedDictionary(*reinterpret_cast(p_ptr)); + } +}; + +template +struct GetTypeInfo> { + static constexpr GDExtensionVariantType VARIANT_TYPE = GDEXTENSION_VARIANT_TYPE_DICTIONARY; + static constexpr GDExtensionClassMethodArgumentMetadata METADATA = GDEXTENSION_METHOD_ARGUMENT_METADATA_NONE; + static inline PropertyInfo get_class_info() { + return PropertyInfo(Variant::Type::DICTIONARY, String(), PROPERTY_HINT_DICTIONARY_TYPE, vformat("%s;%s", K::get_class_static(), V::get_class_static())); + } +}; -#endif // GODOT_TYPED_DICTIONARY_HPP +template +struct GetTypeInfo &> { + static constexpr GDExtensionVariantType VARIANT_TYPE = GDEXTENSION_VARIANT_TYPE_DICTIONARY; + static constexpr GDExtensionClassMethodArgumentMetadata METADATA = GDEXTENSION_METHOD_ARGUMENT_METADATA_NONE; + static inline PropertyInfo get_class_info() { + return PropertyInfo(Variant::Type::DICTIONARY, String(), PROPERTY_HINT_DICTIONARY_TYPE, vformat("%s;%s", K::get_class_static(), V::get_class_static())); + } +}; + +#define MAKE_TYPED_DICTIONARY_INFO_WITH_OBJECT(m_type, m_variant_type) \ + template \ + struct GetTypeInfo> { \ + static constexpr GDExtensionVariantType VARIANT_TYPE = GDEXTENSION_VARIANT_TYPE_DICTIONARY; \ + static constexpr GDExtensionClassMethodArgumentMetadata METADATA = GDEXTENSION_METHOD_ARGUMENT_METADATA_NONE; \ + static inline PropertyInfo get_class_info() { \ + return PropertyInfo(Variant::Type::DICTIONARY, String(), PROPERTY_HINT_DICTIONARY_TYPE, \ + vformat("%s;%s", T::get_class_static(), m_variant_type == Variant::Type::NIL ? "Variant" : Variant::get_type_name(m_variant_type).utf8().get_data())); \ + } \ + }; \ + template \ + struct GetTypeInfo &> { \ + static constexpr GDExtensionVariantType VARIANT_TYPE = GDEXTENSION_VARIANT_TYPE_DICTIONARY; \ + static constexpr GDExtensionClassMethodArgumentMetadata METADATA = GDEXTENSION_METHOD_ARGUMENT_METADATA_NONE; \ + static inline PropertyInfo get_class_info() { \ + return PropertyInfo(Variant::Type::DICTIONARY, String(), PROPERTY_HINT_DICTIONARY_TYPE, \ + vformat("%s;%s", T::get_class_static(), m_variant_type == Variant::Type::NIL ? "Variant" : Variant::get_type_name(m_variant_type).utf8().get_data())); \ + } \ + }; \ + template \ + struct GetTypeInfo> { \ + static constexpr GDExtensionVariantType VARIANT_TYPE = GDEXTENSION_VARIANT_TYPE_DICTIONARY; \ + static constexpr GDExtensionClassMethodArgumentMetadata METADATA = GDEXTENSION_METHOD_ARGUMENT_METADATA_NONE; \ + static inline PropertyInfo get_class_info() { \ + return PropertyInfo(Variant::Type::DICTIONARY, String(), PROPERTY_HINT_DICTIONARY_TYPE, \ + vformat("%s;%s", m_variant_type == Variant::Type::NIL ? "Variant" : Variant::get_type_name(m_variant_type).utf8().get_data(), T::get_class_static())); \ + } \ + }; \ + template \ + struct GetTypeInfo &> { \ + static constexpr GDExtensionVariantType VARIANT_TYPE = GDEXTENSION_VARIANT_TYPE_DICTIONARY; \ + static constexpr GDExtensionClassMethodArgumentMetadata METADATA = GDEXTENSION_METHOD_ARGUMENT_METADATA_NONE; \ + static inline PropertyInfo get_class_info() { \ + return PropertyInfo(Variant::Type::DICTIONARY, String(), PROPERTY_HINT_DICTIONARY_TYPE, \ + vformat("%s;%s", m_variant_type == Variant::Type::NIL ? "Variant" : Variant::get_type_name(m_variant_type).utf8().get_data(), T::get_class_static())); \ + } \ + }; + +#define MAKE_TYPED_DICTIONARY_INFO_EXPANDED(m_type_key, m_variant_type_key, m_type_value, m_variant_type_value) \ + template <> \ + struct GetTypeInfo> { \ + static constexpr GDExtensionVariantType VARIANT_TYPE = GDEXTENSION_VARIANT_TYPE_DICTIONARY; \ + static constexpr GDExtensionClassMethodArgumentMetadata METADATA = GDEXTENSION_METHOD_ARGUMENT_METADATA_NONE; \ + static inline PropertyInfo get_class_info() { \ + return PropertyInfo(Variant::Type::DICTIONARY, String(), PROPERTY_HINT_DICTIONARY_TYPE, \ + vformat("%s;%s", m_variant_type_key == Variant::Type::NIL ? "Variant" : Variant::get_type_name(m_variant_type_key).utf8().get_data(), \ + m_variant_type_value == Variant::Type::NIL ? "Variant" : Variant::get_type_name(m_variant_type_value).utf8().get_data())); \ + } \ + }; \ + template <> \ + struct GetTypeInfo &> { \ + static constexpr GDExtensionVariantType VARIANT_TYPE = GDEXTENSION_VARIANT_TYPE_DICTIONARY; \ + static constexpr GDExtensionClassMethodArgumentMetadata METADATA = GDEXTENSION_METHOD_ARGUMENT_METADATA_NONE; \ + static inline PropertyInfo get_class_info() { \ + return PropertyInfo(Variant::Type::DICTIONARY, String(), PROPERTY_HINT_DICTIONARY_TYPE, \ + vformat("%s;%s", m_variant_type_key == Variant::Type::NIL ? "Variant" : Variant::get_type_name(m_variant_type_key).utf8().get_data(), \ + m_variant_type_value == Variant::Type::NIL ? "Variant" : Variant::get_type_name(m_variant_type_value).utf8().get_data())); \ + } \ + }; + +#define MAKE_TYPED_DICTIONARY_INFO_NIL(m_type, m_variant_type) \ + MAKE_TYPED_DICTIONARY_INFO_WITH_OBJECT(m_type, m_variant_type) \ + MAKE_TYPED_DICTIONARY_INFO_EXPANDED(m_type, m_variant_type, bool, Variant::BOOL) \ + MAKE_TYPED_DICTIONARY_INFO_EXPANDED(m_type, m_variant_type, uint8_t, Variant::INT) \ + MAKE_TYPED_DICTIONARY_INFO_EXPANDED(m_type, m_variant_type, int8_t, Variant::INT) \ + MAKE_TYPED_DICTIONARY_INFO_EXPANDED(m_type, m_variant_type, uint16_t, Variant::INT) \ + MAKE_TYPED_DICTIONARY_INFO_EXPANDED(m_type, m_variant_type, int16_t, Variant::INT) \ + MAKE_TYPED_DICTIONARY_INFO_EXPANDED(m_type, m_variant_type, uint32_t, Variant::INT) \ + MAKE_TYPED_DICTIONARY_INFO_EXPANDED(m_type, m_variant_type, int32_t, Variant::INT) \ + MAKE_TYPED_DICTIONARY_INFO_EXPANDED(m_type, m_variant_type, uint64_t, Variant::INT) \ + MAKE_TYPED_DICTIONARY_INFO_EXPANDED(m_type, m_variant_type, int64_t, Variant::INT) \ + MAKE_TYPED_DICTIONARY_INFO_EXPANDED(m_type, m_variant_type, float, Variant::FLOAT) \ + MAKE_TYPED_DICTIONARY_INFO_EXPANDED(m_type, m_variant_type, double, Variant::FLOAT) \ + MAKE_TYPED_DICTIONARY_INFO_EXPANDED(m_type, m_variant_type, String, Variant::STRING) \ + MAKE_TYPED_DICTIONARY_INFO_EXPANDED(m_type, m_variant_type, Vector2, Variant::VECTOR2) \ + MAKE_TYPED_DICTIONARY_INFO_EXPANDED(m_type, m_variant_type, Vector2i, Variant::VECTOR2I) \ + MAKE_TYPED_DICTIONARY_INFO_EXPANDED(m_type, m_variant_type, Rect2, Variant::RECT2) \ + MAKE_TYPED_DICTIONARY_INFO_EXPANDED(m_type, m_variant_type, Rect2i, Variant::RECT2I) \ + MAKE_TYPED_DICTIONARY_INFO_EXPANDED(m_type, m_variant_type, Vector3, Variant::VECTOR3) \ + MAKE_TYPED_DICTIONARY_INFO_EXPANDED(m_type, m_variant_type, Vector3i, Variant::VECTOR3I) \ + MAKE_TYPED_DICTIONARY_INFO_EXPANDED(m_type, m_variant_type, Transform2D, Variant::TRANSFORM2D) \ + MAKE_TYPED_DICTIONARY_INFO_EXPANDED(m_type, m_variant_type, Plane, Variant::PLANE) \ + MAKE_TYPED_DICTIONARY_INFO_EXPANDED(m_type, m_variant_type, Quaternion, Variant::QUATERNION) \ + MAKE_TYPED_DICTIONARY_INFO_EXPANDED(m_type, m_variant_type, AABB, Variant::AABB) \ + MAKE_TYPED_DICTIONARY_INFO_EXPANDED(m_type, m_variant_type, Basis, Variant::BASIS) \ + MAKE_TYPED_DICTIONARY_INFO_EXPANDED(m_type, m_variant_type, Transform3D, Variant::TRANSFORM3D) \ + MAKE_TYPED_DICTIONARY_INFO_EXPANDED(m_type, m_variant_type, Color, Variant::COLOR) \ + MAKE_TYPED_DICTIONARY_INFO_EXPANDED(m_type, m_variant_type, StringName, Variant::STRING_NAME) \ + MAKE_TYPED_DICTIONARY_INFO_EXPANDED(m_type, m_variant_type, NodePath, Variant::NODE_PATH) \ + MAKE_TYPED_DICTIONARY_INFO_EXPANDED(m_type, m_variant_type, RID, Variant::RID) \ + MAKE_TYPED_DICTIONARY_INFO_EXPANDED(m_type, m_variant_type, Callable, Variant::CALLABLE) \ + MAKE_TYPED_DICTIONARY_INFO_EXPANDED(m_type, m_variant_type, Signal, Variant::SIGNAL) \ + MAKE_TYPED_DICTIONARY_INFO_EXPANDED(m_type, m_variant_type, Dictionary, Variant::DICTIONARY) \ + MAKE_TYPED_DICTIONARY_INFO_EXPANDED(m_type, m_variant_type, Array, Variant::ARRAY) \ + MAKE_TYPED_DICTIONARY_INFO_EXPANDED(m_type, m_variant_type, PackedByteArray, Variant::PACKED_BYTE_ARRAY) \ + MAKE_TYPED_DICTIONARY_INFO_EXPANDED(m_type, m_variant_type, PackedInt32Array, Variant::PACKED_INT32_ARRAY) \ + MAKE_TYPED_DICTIONARY_INFO_EXPANDED(m_type, m_variant_type, PackedInt64Array, Variant::PACKED_INT64_ARRAY) \ + MAKE_TYPED_DICTIONARY_INFO_EXPANDED(m_type, m_variant_type, PackedFloat32Array, Variant::PACKED_FLOAT32_ARRAY) \ + MAKE_TYPED_DICTIONARY_INFO_EXPANDED(m_type, m_variant_type, PackedFloat64Array, Variant::PACKED_FLOAT64_ARRAY) \ + MAKE_TYPED_DICTIONARY_INFO_EXPANDED(m_type, m_variant_type, PackedStringArray, Variant::PACKED_STRING_ARRAY) \ + MAKE_TYPED_DICTIONARY_INFO_EXPANDED(m_type, m_variant_type, PackedVector2Array, Variant::PACKED_VECTOR2_ARRAY) \ + MAKE_TYPED_DICTIONARY_INFO_EXPANDED(m_type, m_variant_type, PackedVector3Array, Variant::PACKED_VECTOR3_ARRAY) \ + MAKE_TYPED_DICTIONARY_INFO_EXPANDED(m_type, m_variant_type, PackedVector4Array, Variant::PACKED_VECTOR4_ARRAY) \ + MAKE_TYPED_DICTIONARY_INFO_EXPANDED(m_type, m_variant_type, PackedColorArray, Variant::PACKED_COLOR_ARRAY) \ + /* MAKE_TYPED_DICTIONARY_INFO_EXPANDED(m_type, m_variant_type, IPAddress, Variant::STRING) */ + +#define MAKE_TYPED_DICTIONARY_INFO(m_type, m_variant_type) \ + MAKE_TYPED_DICTIONARY_INFO_EXPANDED(m_type, m_variant_type, Variant, Variant::NIL) \ + MAKE_TYPED_DICTIONARY_INFO_NIL(m_type, m_variant_type) + +MAKE_TYPED_DICTIONARY_INFO_NIL(Variant, Variant::NIL) +MAKE_TYPED_DICTIONARY_INFO(bool, Variant::BOOL) +MAKE_TYPED_DICTIONARY_INFO(uint8_t, Variant::INT) +MAKE_TYPED_DICTIONARY_INFO(int8_t, Variant::INT) +MAKE_TYPED_DICTIONARY_INFO(uint16_t, Variant::INT) +MAKE_TYPED_DICTIONARY_INFO(int16_t, Variant::INT) +MAKE_TYPED_DICTIONARY_INFO(uint32_t, Variant::INT) +MAKE_TYPED_DICTIONARY_INFO(int32_t, Variant::INT) +MAKE_TYPED_DICTIONARY_INFO(uint64_t, Variant::INT) +MAKE_TYPED_DICTIONARY_INFO(int64_t, Variant::INT) +MAKE_TYPED_DICTIONARY_INFO(float, Variant::FLOAT) +MAKE_TYPED_DICTIONARY_INFO(double, Variant::FLOAT) +MAKE_TYPED_DICTIONARY_INFO(String, Variant::STRING) +MAKE_TYPED_DICTIONARY_INFO(Vector2, Variant::VECTOR2) +MAKE_TYPED_DICTIONARY_INFO(Vector2i, Variant::VECTOR2I) +MAKE_TYPED_DICTIONARY_INFO(Rect2, Variant::RECT2) +MAKE_TYPED_DICTIONARY_INFO(Rect2i, Variant::RECT2I) +MAKE_TYPED_DICTIONARY_INFO(Vector3, Variant::VECTOR3) +MAKE_TYPED_DICTIONARY_INFO(Vector3i, Variant::VECTOR3I) +MAKE_TYPED_DICTIONARY_INFO(Transform2D, Variant::TRANSFORM2D) +MAKE_TYPED_DICTIONARY_INFO(Plane, Variant::PLANE) +MAKE_TYPED_DICTIONARY_INFO(Quaternion, Variant::QUATERNION) +MAKE_TYPED_DICTIONARY_INFO(AABB, Variant::AABB) +MAKE_TYPED_DICTIONARY_INFO(Basis, Variant::BASIS) +MAKE_TYPED_DICTIONARY_INFO(Transform3D, Variant::TRANSFORM3D) +MAKE_TYPED_DICTIONARY_INFO(Color, Variant::COLOR) +MAKE_TYPED_DICTIONARY_INFO(StringName, Variant::STRING_NAME) +MAKE_TYPED_DICTIONARY_INFO(NodePath, Variant::NODE_PATH) +MAKE_TYPED_DICTIONARY_INFO(RID, Variant::RID) +MAKE_TYPED_DICTIONARY_INFO(Callable, Variant::CALLABLE) +MAKE_TYPED_DICTIONARY_INFO(Signal, Variant::SIGNAL) +MAKE_TYPED_DICTIONARY_INFO(Dictionary, Variant::DICTIONARY) +MAKE_TYPED_DICTIONARY_INFO(Array, Variant::ARRAY) +MAKE_TYPED_DICTIONARY_INFO(PackedByteArray, Variant::PACKED_BYTE_ARRAY) +MAKE_TYPED_DICTIONARY_INFO(PackedInt32Array, Variant::PACKED_INT32_ARRAY) +MAKE_TYPED_DICTIONARY_INFO(PackedInt64Array, Variant::PACKED_INT64_ARRAY) +MAKE_TYPED_DICTIONARY_INFO(PackedFloat32Array, Variant::PACKED_FLOAT32_ARRAY) +MAKE_TYPED_DICTIONARY_INFO(PackedFloat64Array, Variant::PACKED_FLOAT64_ARRAY) +MAKE_TYPED_DICTIONARY_INFO(PackedStringArray, Variant::PACKED_STRING_ARRAY) +MAKE_TYPED_DICTIONARY_INFO(PackedVector2Array, Variant::PACKED_VECTOR2_ARRAY) +MAKE_TYPED_DICTIONARY_INFO(PackedVector3Array, Variant::PACKED_VECTOR3_ARRAY) +MAKE_TYPED_DICTIONARY_INFO(PackedVector4Array, Variant::PACKED_VECTOR4_ARRAY) +MAKE_TYPED_DICTIONARY_INFO(PackedColorArray, Variant::PACKED_COLOR_ARRAY) +/* +MAKE_TYPED_DICTIONARY_INFO(IPAddress, Variant::STRING) +*/ + +#undef MAKE_TYPED_DICTIONARY_INFO +#undef MAKE_TYPED_DICTIONARY_INFO_NIL +#undef MAKE_TYPED_DICTIONARY_INFO_EXPANDED +#undef MAKE_TYPED_DICTIONARY_INFO_WITH_OBJECT + +} // namespace godot diff --git a/include/godot_cpp/variant/variant.hpp b/include/godot_cpp/variant/variant.hpp index 4c5f206a8..6a0264a3a 100644 --- a/include/godot_cpp/variant/variant.hpp +++ b/include/godot_cpp/variant/variant.hpp @@ -28,11 +28,11 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef GODOT_VARIANT_HPP -#define GODOT_VARIANT_HPP +#pragma once #include +#include #include #include @@ -49,6 +49,7 @@ class Variant { friend class GDExtensionBinding; friend class MethodBind; + friend class VariantInternal; static void init_bindings(); @@ -357,6 +358,65 @@ String vformat(const String &p_text, const VarArgs... p_args) { return p_text % args_array; } +Variant &Array::Iterator::operator*() const { + return *elem_ptr; +} + +Variant *Array::Iterator::operator->() const { + return elem_ptr; +} + +Array::Iterator &Array::Iterator::operator++() { + elem_ptr++; + return *this; +} + +Array::Iterator &Array::Iterator::operator--() { + elem_ptr--; + return *this; +} + +const Variant &Array::ConstIterator::operator*() const { + return *elem_ptr; +} + +const Variant *Array::ConstIterator::operator->() const { + return elem_ptr; +} + +Array::ConstIterator &Array::ConstIterator::operator++() { + elem_ptr++; + return *this; +} + +Array::ConstIterator &Array::ConstIterator::operator--() { + elem_ptr--; + return *this; +} + +Array::Iterator Array::begin() { + return Array::Iterator(ptrw()); +} +Array::Iterator Array::end() { + return Array::Iterator(ptrw() + size()); +} + +Array::ConstIterator Array::begin() const { + return Array::ConstIterator(ptr()); +} +Array::ConstIterator Array::end() const { + return Array::ConstIterator(ptr() + size()); +} + +Array::Array(std::initializer_list p_init) { + ERR_FAIL_COND(resize(p_init.size()) != 0); + + size_t i = 0; + for (const Variant &element : p_init) { + set(i++, element); + } +} + #include #ifdef REAL_T_IS_DOUBLE @@ -366,5 +426,3 @@ using PackedRealArray = PackedFloat32Array; #endif // REAL_T_IS_DOUBLE } // namespace godot - -#endif // GODOT_VARIANT_HPP diff --git a/include/godot_cpp/variant/variant_internal.hpp b/include/godot_cpp/variant/variant_internal.hpp new file mode 100644 index 000000000..637e12dd7 --- /dev/null +++ b/include/godot_cpp/variant/variant_internal.hpp @@ -0,0 +1,506 @@ +/**************************************************************************/ +/* variant_internal.hpp */ +/**************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* https://godotengine.org */ +/**************************************************************************/ +/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */ +/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* */ +/* Permission is hereby granted, free of charge, to any person obtaining */ +/* a copy of this software and associated documentation files (the */ +/* "Software"), to deal in the Software without restriction, including */ +/* without limitation the rights to use, copy, modify, merge, publish, */ +/* distribute, sublicense, and/or sell copies of the Software, and to */ +/* permit persons to whom the Software is furnished to do so, subject to */ +/* the following conditions: */ +/* */ +/* The above copyright notice and this permission notice shall be */ +/* included in all copies or substantial portions of the Software. */ +/* */ +/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ +/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ +/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */ +/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ +/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ +/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ +/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +/**************************************************************************/ + +#pragma once + +#include +#include + +namespace godot { +// For use when you want to access the internal pointer of a Variant directly. +// Use with caution. You need to be sure that the type is correct. + +namespace internal { +template +struct VariantInternalType {}; + +template <> +struct VariantInternalType { + static constexpr Variant::Type type = Variant::BOOL; +}; +template <> +struct VariantInternalType { + static constexpr Variant::Type type = Variant::INT; +}; +template <> +struct VariantInternalType { + static constexpr Variant::Type type = Variant::FLOAT; +}; +template <> +struct VariantInternalType { + static constexpr Variant::Type type = Variant::STRING; +}; +template <> +struct VariantInternalType { + static constexpr Variant::Type type = Variant::VECTOR2; +}; +template <> +struct VariantInternalType { + static constexpr Variant::Type type = Variant::VECTOR2I; +}; +template <> +struct VariantInternalType { + static constexpr Variant::Type type = Variant::RECT2; +}; +template <> +struct VariantInternalType { + static constexpr Variant::Type type = Variant::RECT2I; +}; +template <> +struct VariantInternalType { + static constexpr Variant::Type type = Variant::VECTOR3; +}; +template <> +struct VariantInternalType { + static constexpr Variant::Type type = Variant::VECTOR3I; +}; +template <> +struct VariantInternalType { + static constexpr Variant::Type type = Variant::TRANSFORM2D; +}; +template <> +struct VariantInternalType { + static constexpr Variant::Type type = Variant::VECTOR4; +}; +template <> +struct VariantInternalType { + static constexpr Variant::Type type = Variant::VECTOR4I; +}; +template <> +struct VariantInternalType { + static constexpr Variant::Type type = Variant::PLANE; +}; +template <> +struct VariantInternalType { + static constexpr Variant::Type type = Variant::QUATERNION; +}; +template <> +struct VariantInternalType { + static constexpr Variant::Type type = Variant::AABB; +}; +template <> +struct VariantInternalType { + static constexpr Variant::Type type = Variant::BASIS; +}; +template <> +struct VariantInternalType { + static constexpr Variant::Type type = Variant::TRANSFORM3D; +}; +template <> +struct VariantInternalType { + static constexpr Variant::Type type = Variant::PROJECTION; +}; +template <> +struct VariantInternalType { + static constexpr Variant::Type type = Variant::COLOR; +}; +template <> +struct VariantInternalType { + static constexpr Variant::Type type = Variant::STRING_NAME; +}; +template <> +struct VariantInternalType { + static constexpr Variant::Type type = Variant::NODE_PATH; +}; +template <> +struct VariantInternalType { + static constexpr Variant::Type type = Variant::RID; +}; +template <> +struct VariantInternalType { + static constexpr Variant::Type type = Variant::OBJECT; +}; +template <> +struct VariantInternalType { + static constexpr Variant::Type type = Variant::CALLABLE; +}; +template <> +struct VariantInternalType { + static constexpr Variant::Type type = Variant::SIGNAL; +}; +template <> +struct VariantInternalType { + static constexpr Variant::Type type = Variant::DICTIONARY; +}; +template <> +struct VariantInternalType { + static constexpr Variant::Type type = Variant::ARRAY; +}; +template <> +struct VariantInternalType { + static constexpr Variant::Type type = Variant::PACKED_BYTE_ARRAY; +}; +template <> +struct VariantInternalType { + static constexpr Variant::Type type = Variant::PACKED_INT32_ARRAY; +}; +template <> +struct VariantInternalType { + static constexpr Variant::Type type = Variant::PACKED_INT64_ARRAY; +}; +template <> +struct VariantInternalType { + static constexpr Variant::Type type = Variant::PACKED_FLOAT32_ARRAY; +}; +template <> +struct VariantInternalType { + static constexpr Variant::Type type = Variant::PACKED_FLOAT64_ARRAY; +}; +template <> +struct VariantInternalType { + static constexpr Variant::Type type = Variant::PACKED_STRING_ARRAY; +}; +template <> +struct VariantInternalType { + static constexpr Variant::Type type = Variant::PACKED_VECTOR2_ARRAY; +}; +template <> +struct VariantInternalType { + static constexpr Variant::Type type = Variant::PACKED_VECTOR3_ARRAY; +}; +template <> +struct VariantInternalType { + static constexpr Variant::Type type = Variant::PACKED_COLOR_ARRAY; +}; +template <> +struct VariantInternalType { + static constexpr Variant::Type type = Variant::PACKED_VECTOR4_ARRAY; +}; +} //namespace internal + +class VariantInternal { + friend class Variant; + + static GDExtensionVariantGetInternalPtrFunc get_internal_func[Variant::VARIANT_MAX]; + + static void init_bindings(); + +public: + template + _FORCE_INLINE_ static T *get_internal_value(Variant *v) { + return static_cast(get_internal_func[internal::VariantInternalType::type](v)); + } + + template + _FORCE_INLINE_ static const T *get_internal_value(const Variant *v) { + return static_cast(get_internal_func[internal::VariantInternalType::type](const_cast(v))); + } + + // Atomic types. + _FORCE_INLINE_ static bool *get_bool(Variant *v) { return get_internal_value(v); } + _FORCE_INLINE_ static const bool *get_bool(const Variant *v) { return get_internal_value(v); } + _FORCE_INLINE_ static int64_t *get_int(Variant *v) { return get_internal_value(v); } + _FORCE_INLINE_ static const int64_t *get_int(const Variant *v) { return get_internal_value(v); } + _FORCE_INLINE_ static double *get_float(Variant *v) { return get_internal_value(v); } + _FORCE_INLINE_ static const double *get_float(const Variant *v) { return get_internal_value(v); } + _FORCE_INLINE_ static String *get_string(Variant *v) { return get_internal_value(v); } + _FORCE_INLINE_ static const String *get_string(const Variant *v) { return get_internal_value(v); } + + // Math types. + _FORCE_INLINE_ static Vector2 *get_vector2(Variant *v) { return get_internal_value(v); } + _FORCE_INLINE_ static const Vector2 *get_vector2(const Variant *v) { return get_internal_value(v); } + _FORCE_INLINE_ static Vector2i *get_vector2i(Variant *v) { return get_internal_value(v); } + _FORCE_INLINE_ static const Vector2i *get_vector2i(const Variant *v) { return get_internal_value(v); } + _FORCE_INLINE_ static Rect2 *get_rect2(Variant *v) { return get_internal_value(v); } + _FORCE_INLINE_ static const Rect2 *get_rect2(const Variant *v) { return get_internal_value(v); } + _FORCE_INLINE_ static Rect2i *get_rect2i(Variant *v) { return get_internal_value(v); } + _FORCE_INLINE_ static const Rect2i *get_rect2i(const Variant *v) { return get_internal_value(v); } + _FORCE_INLINE_ static Vector3 *get_vector3(Variant *v) { return get_internal_value(v); } + _FORCE_INLINE_ static const Vector3 *get_vector3(const Variant *v) { return get_internal_value(v); } + _FORCE_INLINE_ static Vector3i *get_vector3i(Variant *v) { return get_internal_value(v); } + _FORCE_INLINE_ static const Vector3i *get_vector3i(const Variant *v) { return get_internal_value(v); } + _FORCE_INLINE_ static Vector4 *get_vector4(Variant *v) { return get_internal_value(v); } + _FORCE_INLINE_ static const Vector4 *get_vector4(const Variant *v) { return get_internal_value(v); } + _FORCE_INLINE_ static Vector4i *get_vector4i(Variant *v) { return get_internal_value(v); } + _FORCE_INLINE_ static const Vector4i *get_vector4i(const Variant *v) { return get_internal_value(v); } + _FORCE_INLINE_ static Transform2D *get_transform2d(Variant *v) { return get_internal_value(v); } + _FORCE_INLINE_ static const Transform2D *get_transform2d(const Variant *v) { return get_internal_value(v); } + _FORCE_INLINE_ static Plane *get_plane(Variant *v) { return get_internal_value(v); } + _FORCE_INLINE_ static const Plane *get_plane(const Variant *v) { return get_internal_value(v); } + _FORCE_INLINE_ static Quaternion *get_quaternion(Variant *v) { return get_internal_value(v); } + _FORCE_INLINE_ static const Quaternion *get_quaternion(const Variant *v) { return get_internal_value(v); } + _FORCE_INLINE_ static AABB *get_aabb(Variant *v) { return get_internal_value(v); } + _FORCE_INLINE_ static const AABB *get_aabb(const Variant *v) { return get_internal_value(v); } + _FORCE_INLINE_ static Basis *get_basis(Variant *v) { return get_internal_value(v); } + _FORCE_INLINE_ static const Basis *get_basis(const Variant *v) { return get_internal_value(v); } + _FORCE_INLINE_ static Transform3D *get_transform(Variant *v) { return get_internal_value(v); } + _FORCE_INLINE_ static const Transform3D *get_transform(const Variant *v) { return get_internal_value(v); } + _FORCE_INLINE_ static Projection *get_projection(Variant *v) { return get_internal_value(v); } + _FORCE_INLINE_ static const Projection *get_projection(const Variant *v) { return get_internal_value(v); } + + // Misc types. + _FORCE_INLINE_ static Color *get_color(Variant *v) { return get_internal_value(v); } + _FORCE_INLINE_ static const Color *get_color(const Variant *v) { return get_internal_value(v); } + _FORCE_INLINE_ static StringName *get_string_name(Variant *v) { return get_internal_value(v); } + _FORCE_INLINE_ static const StringName *get_string_name(const Variant *v) { return get_internal_value(v); } + _FORCE_INLINE_ static NodePath *get_node_path(Variant *v) { return get_internal_value(v); } + _FORCE_INLINE_ static const NodePath *get_node_path(const Variant *v) { return get_internal_value(v); } + _FORCE_INLINE_ static RID *get_rid(Variant *v) { return get_internal_value(v); } + _FORCE_INLINE_ static const RID *get_rid(const Variant *v) { return get_internal_value(v); } + _FORCE_INLINE_ static Callable *get_callable(Variant *v) { return get_internal_value(v); } + _FORCE_INLINE_ static const Callable *get_callable(const Variant *v) { return get_internal_value(v); } + _FORCE_INLINE_ static Signal *get_signal(Variant *v) { return get_internal_value(v); } + _FORCE_INLINE_ static const Signal *get_signal(const Variant *v) { return get_internal_value(v); } + _FORCE_INLINE_ static Dictionary *get_dictionary(Variant *v) { return get_internal_value(v); } + _FORCE_INLINE_ static const Dictionary *get_dictionary(const Variant *v) { return get_internal_value(v); } + _FORCE_INLINE_ static Array *get_array(Variant *v) { return get_internal_value(v); } + _FORCE_INLINE_ static const Array *get_array(const Variant *v) { return get_internal_value(v); } + + // Typed arrays. + _FORCE_INLINE_ static PackedByteArray *get_byte_array(Variant *v) { return get_internal_value(v); } + _FORCE_INLINE_ static const PackedByteArray *get_byte_array(const Variant *v) { return get_internal_value(v); } + _FORCE_INLINE_ static PackedInt32Array *get_int32_array(Variant *v) { return get_internal_value(v); } + _FORCE_INLINE_ static const PackedInt32Array *get_int32_array(const Variant *v) { return get_internal_value(v); } + _FORCE_INLINE_ static PackedInt64Array *get_int64_array(Variant *v) { return get_internal_value(v); } + _FORCE_INLINE_ static const PackedInt64Array *get_int64_array(const Variant *v) { return get_internal_value(v); } + _FORCE_INLINE_ static PackedFloat32Array *get_float32_array(Variant *v) { return get_internal_value(v); } + _FORCE_INLINE_ static const PackedFloat32Array *get_float32_array(const Variant *v) { return get_internal_value(v); } + _FORCE_INLINE_ static PackedFloat64Array *get_float64_array(Variant *v) { return get_internal_value(v); } + _FORCE_INLINE_ static const PackedFloat64Array *get_float64_array(const Variant *v) { return get_internal_value(v); } + _FORCE_INLINE_ static PackedStringArray *get_string_array(Variant *v) { return get_internal_value(v); } + _FORCE_INLINE_ static const PackedStringArray *get_string_array(const Variant *v) { return get_internal_value(v); } + _FORCE_INLINE_ static PackedVector2Array *get_vector2_array(Variant *v) { return get_internal_value(v); } + _FORCE_INLINE_ static const PackedVector2Array *get_vector2_array(const Variant *v) { return get_internal_value(v); } + _FORCE_INLINE_ static PackedVector3Array *get_vector3_array(Variant *v) { return get_internal_value(v); } + _FORCE_INLINE_ static const PackedVector3Array *get_vector3_array(const Variant *v) { return get_internal_value(v); } + _FORCE_INLINE_ static PackedColorArray *get_color_array(Variant *v) { return get_internal_value(v); } + _FORCE_INLINE_ static const PackedColorArray *get_color_array(const Variant *v) { return get_internal_value(v); } + _FORCE_INLINE_ static PackedVector4Array *get_vector4_array(Variant *v) { return get_internal_value(v); } + _FORCE_INLINE_ static const PackedVector4Array *get_vector4_array(const Variant *v) { return get_internal_value(v); } + + _FORCE_INLINE_ static Object **get_object(Variant *v) { return get_internal_value(v); } + _FORCE_INLINE_ static const Object **get_object(const Variant *v) { return (const Object **)get_internal_value(v); } + + _FORCE_INLINE_ static void *get_opaque_pointer(Variant *v) { + switch (v->get_type()) { + case Variant::NIL: + return nullptr; + case Variant::BOOL: + return get_bool(v); + case Variant::INT: + return get_int(v); + case Variant::FLOAT: + return get_float(v); + case Variant::STRING: + return get_string(v); + case Variant::VECTOR2: + return get_vector2(v); + case Variant::VECTOR2I: + return get_vector2i(v); + case Variant::VECTOR3: + return get_vector3(v); + case Variant::VECTOR3I: + return get_vector3i(v); + case Variant::VECTOR4: + return get_vector4(v); + case Variant::VECTOR4I: + return get_vector4i(v); + case Variant::RECT2: + return get_rect2(v); + case Variant::RECT2I: + return get_rect2i(v); + case Variant::TRANSFORM3D: + return get_transform(v); + case Variant::PROJECTION: + return get_projection(v); + case Variant::TRANSFORM2D: + return get_transform2d(v); + case Variant::QUATERNION: + return get_quaternion(v); + case Variant::PLANE: + return get_plane(v); + case Variant::BASIS: + return get_basis(v); + case Variant::AABB: + return get_aabb(v); + case Variant::COLOR: + return get_color(v); + case Variant::STRING_NAME: + return get_string_name(v); + case Variant::NODE_PATH: + return get_node_path(v); + case Variant::RID: + return get_rid(v); + case Variant::CALLABLE: + return get_callable(v); + case Variant::SIGNAL: + return get_signal(v); + case Variant::DICTIONARY: + return get_dictionary(v); + case Variant::ARRAY: + return get_array(v); + case Variant::PACKED_BYTE_ARRAY: + return get_byte_array(v); + case Variant::PACKED_INT32_ARRAY: + return get_int32_array(v); + case Variant::PACKED_INT64_ARRAY: + return get_int64_array(v); + case Variant::PACKED_FLOAT32_ARRAY: + return get_float32_array(v); + case Variant::PACKED_FLOAT64_ARRAY: + return get_float64_array(v); + case Variant::PACKED_STRING_ARRAY: + return get_string_array(v); + case Variant::PACKED_VECTOR2_ARRAY: + return get_vector2_array(v); + case Variant::PACKED_VECTOR3_ARRAY: + return get_vector3_array(v); + case Variant::PACKED_COLOR_ARRAY: + return get_color_array(v); + case Variant::PACKED_VECTOR4_ARRAY: + return get_vector4_array(v); + case Variant::OBJECT: + return get_object(v); + case Variant::VARIANT_MAX: + ERR_FAIL_V(nullptr); + } + ERR_FAIL_V(nullptr); + } + + _FORCE_INLINE_ static const void *get_opaque_pointer(const Variant *v) { + switch (v->get_type()) { + case Variant::NIL: + return nullptr; + case Variant::BOOL: + return get_bool(v); + case Variant::INT: + return get_int(v); + case Variant::FLOAT: + return get_float(v); + case Variant::STRING: + return get_string(v); + case Variant::VECTOR2: + return get_vector2(v); + case Variant::VECTOR2I: + return get_vector2i(v); + case Variant::VECTOR3: + return get_vector3(v); + case Variant::VECTOR3I: + return get_vector3i(v); + case Variant::VECTOR4: + return get_vector4(v); + case Variant::VECTOR4I: + return get_vector4i(v); + case Variant::RECT2: + return get_rect2(v); + case Variant::RECT2I: + return get_rect2i(v); + case Variant::TRANSFORM3D: + return get_transform(v); + case Variant::PROJECTION: + return get_projection(v); + case Variant::TRANSFORM2D: + return get_transform2d(v); + case Variant::QUATERNION: + return get_quaternion(v); + case Variant::PLANE: + return get_plane(v); + case Variant::BASIS: + return get_basis(v); + case Variant::AABB: + return get_aabb(v); + case Variant::COLOR: + return get_color(v); + case Variant::STRING_NAME: + return get_string_name(v); + case Variant::NODE_PATH: + return get_node_path(v); + case Variant::RID: + return get_rid(v); + case Variant::CALLABLE: + return get_callable(v); + case Variant::SIGNAL: + return get_signal(v); + case Variant::DICTIONARY: + return get_dictionary(v); + case Variant::ARRAY: + return get_array(v); + case Variant::PACKED_BYTE_ARRAY: + return get_byte_array(v); + case Variant::PACKED_INT32_ARRAY: + return get_int32_array(v); + case Variant::PACKED_INT64_ARRAY: + return get_int64_array(v); + case Variant::PACKED_FLOAT32_ARRAY: + return get_float32_array(v); + case Variant::PACKED_FLOAT64_ARRAY: + return get_float64_array(v); + case Variant::PACKED_STRING_ARRAY: + return get_string_array(v); + case Variant::PACKED_VECTOR2_ARRAY: + return get_vector2_array(v); + case Variant::PACKED_VECTOR3_ARRAY: + return get_vector3_array(v); + case Variant::PACKED_COLOR_ARRAY: + return get_color_array(v); + case Variant::PACKED_VECTOR4_ARRAY: + return get_vector4_array(v); + case Variant::OBJECT: + return get_object(v); + case Variant::VARIANT_MAX: + ERR_FAIL_V(nullptr); + } + ERR_FAIL_V(nullptr); + } +}; + +template +struct VariantGetInternalPtr { + static internal::VariantInternalType *get_ptr(Variant *v) { return VariantInternal::get_internal_value(v); } + static const internal::VariantInternalType *get_ptr(const Variant *v) { return VariantInternal::get_internal_value(v); } +}; + +template +struct can_set_variant_internal_value { + static const bool value = true; +}; + +template <> +struct can_set_variant_internal_value { + static const bool value = false; +}; + +template +struct VariantInternalAccessor { + static _FORCE_INLINE_ const T &get(const Variant *v) { return *VariantInternal::get_internal_value(v); } + + // Enable set() only for those types where we can set (all but Object *). + template ::value>> + static _FORCE_INLINE_ void set(Variant *v, const internal::VariantInternalType &p_value) { + *VariantInternal::get_internal_value(v) = p_value; + } +}; + +template ::value>> +struct VariantDefaultInitializer { + static _FORCE_INLINE_ void init(Variant *v) { *VariantInternal::get_internal_value(v) = T(); } +}; + +} // namespace godot diff --git a/include/godot_cpp/variant/vector2.hpp b/include/godot_cpp/variant/vector2.hpp index 8f08985f3..400bdeffe 100644 --- a/include/godot_cpp/variant/vector2.hpp +++ b/include/godot_cpp/variant/vector2.hpp @@ -28,8 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef GODOT_VECTOR2_HPP -#define GODOT_VECTOR2_HPP +#pragma once #include #include @@ -39,7 +38,7 @@ namespace godot { class String; struct Vector2i; -struct _NO_DISCARD_ Vector2 { +struct [[nodiscard]] Vector2 { static const int AXIS_COUNT = 2; enum Axis { @@ -62,13 +61,13 @@ struct _NO_DISCARD_ Vector2 { real_t coord[2] = { 0 }; }; - _FORCE_INLINE_ real_t &operator[](int p_idx) { - DEV_ASSERT((unsigned int)p_idx < 2); - return coord[p_idx]; + _FORCE_INLINE_ real_t &operator[](int p_axis) { + DEV_ASSERT((unsigned int)p_axis < 2); + return coord[p_axis]; } - _FORCE_INLINE_ const real_t &operator[](int p_idx) const { - DEV_ASSERT((unsigned int)p_idx < 2); - return coord[p_idx]; + _FORCE_INLINE_ const real_t &operator[](int p_axis) const { + DEV_ASSERT((unsigned int)p_axis < 2); + return coord[p_axis]; } _FORCE_INLINE_ Vector2::Axis min_axis_index() const { @@ -85,7 +84,7 @@ struct _NO_DISCARD_ Vector2 { real_t length() const; real_t length_squared() const; - Vector2 limit_length(const real_t p_len = 1.0) const; + Vector2 limit_length(real_t p_len = 1.0) const; Vector2 min(const Vector2 &p_vector2) const { return Vector2(MIN(x, p_vector2.x), MIN(y, p_vector2.y)); @@ -111,19 +110,20 @@ struct _NO_DISCARD_ Vector2 { real_t dot(const Vector2 &p_other) const; real_t cross(const Vector2 &p_other) const; - Vector2 posmod(const real_t p_mod) const; + Vector2 posmod(real_t p_mod) const; Vector2 posmodv(const Vector2 &p_modv) const; Vector2 project(const Vector2 &p_to) const; - Vector2 plane_project(const real_t p_d, const Vector2 &p_vec) const; + Vector2 plane_project(real_t p_d, const Vector2 &p_vec) const; - _FORCE_INLINE_ Vector2 lerp(const Vector2 &p_to, const real_t p_weight) const; - _FORCE_INLINE_ Vector2 slerp(const Vector2 &p_to, const real_t p_weight) const; - _FORCE_INLINE_ Vector2 cubic_interpolate(const Vector2 &p_b, const Vector2 &p_pre_a, const Vector2 &p_post_b, const real_t p_weight) const; - _FORCE_INLINE_ Vector2 cubic_interpolate_in_time(const Vector2 &p_b, const Vector2 &p_pre_a, const Vector2 &p_post_b, const real_t p_weight, const real_t &p_b_t, const real_t &p_pre_a_t, const real_t &p_post_b_t) const; - _FORCE_INLINE_ Vector2 bezier_interpolate(const Vector2 &p_control_1, const Vector2 &p_control_2, const Vector2 &p_end, const real_t p_t) const; + _FORCE_INLINE_ Vector2 lerp(const Vector2 &p_to, real_t p_weight) const; + _FORCE_INLINE_ Vector2 slerp(const Vector2 &p_to, real_t p_weight) const; + _FORCE_INLINE_ Vector2 cubic_interpolate(const Vector2 &p_b, const Vector2 &p_pre_a, const Vector2 &p_post_b, real_t p_weight) const; + _FORCE_INLINE_ Vector2 cubic_interpolate_in_time(const Vector2 &p_b, const Vector2 &p_pre_a, const Vector2 &p_post_b, real_t p_weight, real_t p_b_t, real_t p_pre_a_t, real_t p_post_b_t) const; + _FORCE_INLINE_ Vector2 bezier_interpolate(const Vector2 &p_control_1, const Vector2 &p_control_2, const Vector2 &p_end, real_t p_t) const; + _FORCE_INLINE_ Vector2 bezier_derivative(const Vector2 &p_control_1, const Vector2 &p_control_2, const Vector2 &p_end, real_t p_t) const; - Vector2 move_toward(const Vector2 &p_to, const real_t p_delta) const; + Vector2 move_toward(const Vector2 &p_to, real_t p_delta) const; Vector2 slide(const Vector2 &p_normal) const; Vector2 bounce(const Vector2 &p_normal) const; @@ -139,16 +139,16 @@ struct _NO_DISCARD_ Vector2 { void operator-=(const Vector2 &p_v); Vector2 operator*(const Vector2 &p_v1) const; - Vector2 operator*(const real_t &rvalue) const; - void operator*=(const real_t &rvalue); - void operator*=(const Vector2 &rvalue) { *this = *this * rvalue; } + Vector2 operator*(real_t p_rvalue) const; + void operator*=(real_t p_rvalue); + void operator*=(const Vector2 &p_rvalue) { *this = *this * p_rvalue; } Vector2 operator/(const Vector2 &p_v1) const; - Vector2 operator/(const real_t &rvalue) const; + Vector2 operator/(real_t p_rvalue) const; - void operator/=(const real_t &rvalue); - void operator/=(const Vector2 &rvalue) { *this = *this / rvalue; } + void operator/=(real_t p_rvalue); + void operator/=(const Vector2 &p_rvalue) { *this = *this / p_rvalue; } Vector2 operator-() const; @@ -161,13 +161,13 @@ struct _NO_DISCARD_ Vector2 { bool operator>=(const Vector2 &p_vec2) const { return x == p_vec2.x ? (y >= p_vec2.y) : (x > p_vec2.x); } real_t angle() const; - static Vector2 from_angle(const real_t p_angle); + static Vector2 from_angle(real_t p_angle); _FORCE_INLINE_ Vector2 abs() const { return Vector2(Math::abs(x), Math::abs(y)); } - Vector2 rotated(const real_t p_by) const; + Vector2 rotated(real_t p_by) const; Vector2 orthogonal() const { return Vector2(y, -x); } @@ -186,13 +186,13 @@ struct _NO_DISCARD_ Vector2 { operator Vector2i() const; _FORCE_INLINE_ Vector2() {} - _FORCE_INLINE_ Vector2(const real_t p_x, const real_t p_y) { + _FORCE_INLINE_ Vector2(real_t p_x, real_t p_y) { x = p_x; y = p_y; } }; -_FORCE_INLINE_ Vector2 Vector2::plane_project(const real_t p_d, const Vector2 &p_vec) const { +_FORCE_INLINE_ Vector2 Vector2::plane_project(real_t p_d, const Vector2 &p_vec) const { return p_vec - *this * (dot(p_vec) - p_d); } @@ -218,26 +218,26 @@ _FORCE_INLINE_ Vector2 Vector2::operator*(const Vector2 &p_v1) const { return Vector2(x * p_v1.x, y * p_v1.y); } -_FORCE_INLINE_ Vector2 Vector2::operator*(const real_t &rvalue) const { - return Vector2(x * rvalue, y * rvalue); +_FORCE_INLINE_ Vector2 Vector2::operator*(real_t p_rvalue) const { + return Vector2(x * p_rvalue, y * p_rvalue); } -_FORCE_INLINE_ void Vector2::operator*=(const real_t &rvalue) { - x *= rvalue; - y *= rvalue; +_FORCE_INLINE_ void Vector2::operator*=(real_t p_rvalue) { + x *= p_rvalue; + y *= p_rvalue; } _FORCE_INLINE_ Vector2 Vector2::operator/(const Vector2 &p_v1) const { return Vector2(x / p_v1.x, y / p_v1.y); } -_FORCE_INLINE_ Vector2 Vector2::operator/(const real_t &rvalue) const { - return Vector2(x / rvalue, y / rvalue); +_FORCE_INLINE_ Vector2 Vector2::operator/(real_t p_rvalue) const { + return Vector2(x / p_rvalue, y / p_rvalue); } -_FORCE_INLINE_ void Vector2::operator/=(const real_t &rvalue) { - x /= rvalue; - y /= rvalue; +_FORCE_INLINE_ void Vector2::operator/=(real_t p_rvalue) { + x /= p_rvalue; + y /= p_rvalue; } _FORCE_INLINE_ Vector2 Vector2::operator-() const { @@ -252,16 +252,14 @@ _FORCE_INLINE_ bool Vector2::operator!=(const Vector2 &p_vec2) const { return x != p_vec2.x || y != p_vec2.y; } -Vector2 Vector2::lerp(const Vector2 &p_to, const real_t p_weight) const { +Vector2 Vector2::lerp(const Vector2 &p_to, real_t p_weight) const { Vector2 res = *this; - - res.x += (p_weight * (p_to.x - x)); - res.y += (p_weight * (p_to.y - y)); - + res.x = Math::lerp(res.x, p_to.x, p_weight); + res.y = Math::lerp(res.y, p_to.y, p_weight); return res; } -Vector2 Vector2::slerp(const Vector2 &p_to, const real_t p_weight) const { +Vector2 Vector2::slerp(const Vector2 &p_to, real_t p_weight) const { real_t start_length_sq = length_squared(); real_t end_length_sq = p_to.length_squared(); if (unlikely(start_length_sq == 0.0f || end_length_sq == 0.0f)) { @@ -274,31 +272,32 @@ Vector2 Vector2::slerp(const Vector2 &p_to, const real_t p_weight) const { return rotated(angle * p_weight) * (result_length / start_length); } -Vector2 Vector2::cubic_interpolate(const Vector2 &p_b, const Vector2 &p_pre_a, const Vector2 &p_post_b, const real_t p_weight) const { +Vector2 Vector2::cubic_interpolate(const Vector2 &p_b, const Vector2 &p_pre_a, const Vector2 &p_post_b, real_t p_weight) const { Vector2 res = *this; res.x = Math::cubic_interpolate(res.x, p_b.x, p_pre_a.x, p_post_b.x, p_weight); res.y = Math::cubic_interpolate(res.y, p_b.y, p_pre_a.y, p_post_b.y, p_weight); return res; } -Vector2 Vector2::cubic_interpolate_in_time(const Vector2 &p_b, const Vector2 &p_pre_a, const Vector2 &p_post_b, const real_t p_weight, const real_t &p_b_t, const real_t &p_pre_a_t, const real_t &p_post_b_t) const { +Vector2 Vector2::cubic_interpolate_in_time(const Vector2 &p_b, const Vector2 &p_pre_a, const Vector2 &p_post_b, real_t p_weight, real_t p_b_t, real_t p_pre_a_t, real_t p_post_b_t) const { Vector2 res = *this; res.x = Math::cubic_interpolate_in_time(res.x, p_b.x, p_pre_a.x, p_post_b.x, p_weight, p_b_t, p_pre_a_t, p_post_b_t); res.y = Math::cubic_interpolate_in_time(res.y, p_b.y, p_pre_a.y, p_post_b.y, p_weight, p_b_t, p_pre_a_t, p_post_b_t); return res; } -Vector2 Vector2::bezier_interpolate(const Vector2 &p_control_1, const Vector2 &p_control_2, const Vector2 &p_end, const real_t p_t) const { +Vector2 Vector2::bezier_interpolate(const Vector2 &p_control_1, const Vector2 &p_control_2, const Vector2 &p_end, real_t p_t) const { Vector2 res = *this; + res.x = Math::bezier_interpolate(res.x, p_control_1.x, p_control_2.x, p_end.x, p_t); + res.y = Math::bezier_interpolate(res.y, p_control_1.y, p_control_2.y, p_end.y, p_t); + return res; +} - /* Formula from Wikipedia article on Bezier curves. */ - real_t omt = (1.0 - p_t); - real_t omt2 = omt * omt; - real_t omt3 = omt2 * omt; - real_t t2 = p_t * p_t; - real_t t3 = t2 * p_t; - - return res * omt3 + p_control_1 * omt2 * p_t * 3.0 + p_control_2 * omt * t2 * 3.0 + p_end * t3; +Vector2 Vector2::bezier_derivative(const Vector2 &p_control_1, const Vector2 &p_control_2, const Vector2 &p_end, real_t p_t) const { + Vector2 res = *this; + res.x = Math::bezier_derivative(res.x, p_control_1.x, p_control_2.x, p_end.x, p_t); + res.y = Math::bezier_derivative(res.y, p_control_1.y, p_control_2.y, p_end.y, p_t); + return res; } Vector2 Vector2::direction_to(const Vector2 &p_to) const { @@ -310,19 +309,19 @@ Vector2 Vector2::direction_to(const Vector2 &p_to) const { // Multiplication operators required to workaround issues with LLVM using implicit conversion // to Vector2i instead for integers where it should not. -_FORCE_INLINE_ Vector2 operator*(const float p_scalar, const Vector2 &p_vec) { +_FORCE_INLINE_ Vector2 operator*(float p_scalar, const Vector2 &p_vec) { return p_vec * p_scalar; } -_FORCE_INLINE_ Vector2 operator*(const double p_scalar, const Vector2 &p_vec) { +_FORCE_INLINE_ Vector2 operator*(double p_scalar, const Vector2 &p_vec) { return p_vec * p_scalar; } -_FORCE_INLINE_ Vector2 operator*(const int32_t p_scalar, const Vector2 &p_vec) { +_FORCE_INLINE_ Vector2 operator*(int32_t p_scalar, const Vector2 &p_vec) { return p_vec * p_scalar; } -_FORCE_INLINE_ Vector2 operator*(const int64_t p_scalar, const Vector2 &p_vec) { +_FORCE_INLINE_ Vector2 operator*(int64_t p_scalar, const Vector2 &p_vec) { return p_vec * p_scalar; } @@ -330,5 +329,3 @@ typedef Vector2 Size2; typedef Vector2 Point2; } // namespace godot - -#endif // GODOT_VECTOR2_HPP diff --git a/include/godot_cpp/variant/vector2i.hpp b/include/godot_cpp/variant/vector2i.hpp index 0d787c3fc..3278af9f1 100644 --- a/include/godot_cpp/variant/vector2i.hpp +++ b/include/godot_cpp/variant/vector2i.hpp @@ -28,8 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef GODOT_VECTOR2I_HPP -#define GODOT_VECTOR2I_HPP +#pragma once #include #include @@ -39,7 +38,7 @@ namespace godot { class String; struct Vector2; -struct _NO_DISCARD_ Vector2i { +struct [[nodiscard]] Vector2i { static const int AXIS_COUNT = 2; enum Axis { @@ -62,13 +61,13 @@ struct _NO_DISCARD_ Vector2i { int32_t coord[2] = { 0 }; }; - _FORCE_INLINE_ int32_t &operator[](int p_idx) { - DEV_ASSERT((unsigned int)p_idx < 2); - return coord[p_idx]; + _FORCE_INLINE_ int32_t &operator[](int p_axis) { + DEV_ASSERT((unsigned int)p_axis < 2); + return coord[p_axis]; } - _FORCE_INLINE_ const int32_t &operator[](int p_idx) const { - DEV_ASSERT((unsigned int)p_idx < 2); - return coord[p_idx]; + _FORCE_INLINE_ const int32_t &operator[](int p_axis) const { + DEV_ASSERT((unsigned int)p_axis < 2); + return coord[p_axis]; } _FORCE_INLINE_ Vector2i::Axis min_axis_index() const { @@ -95,22 +94,30 @@ struct _NO_DISCARD_ Vector2i { return Vector2i(MAX(x, p_scalar), MAX(y, p_scalar)); } + double distance_to(const Vector2i &p_to) const { + return (p_to - *this).length(); + } + + int64_t distance_squared_to(const Vector2i &p_to) const { + return (p_to - *this).length_squared(); + } + Vector2i operator+(const Vector2i &p_v) const; void operator+=(const Vector2i &p_v); Vector2i operator-(const Vector2i &p_v) const; void operator-=(const Vector2i &p_v); Vector2i operator*(const Vector2i &p_v1) const; - Vector2i operator*(const int32_t &rvalue) const; - void operator*=(const int32_t &rvalue); + Vector2i operator*(int32_t p_rvalue) const; + void operator*=(int32_t p_rvalue); Vector2i operator/(const Vector2i &p_v1) const; - Vector2i operator/(const int32_t &rvalue) const; - void operator/=(const int32_t &rvalue); + Vector2i operator/(int32_t p_rvalue) const; + void operator/=(int32_t p_rvalue); Vector2i operator%(const Vector2i &p_v1) const; - Vector2i operator%(const int32_t &rvalue) const; - void operator%=(const int32_t &rvalue); + Vector2i operator%(int32_t p_rvalue) const; + void operator%=(int32_t p_rvalue); Vector2i operator-() const; bool operator<(const Vector2i &p_vec2) const { return (x == p_vec2.x) ? (y < p_vec2.y) : (x < p_vec2.x); } @@ -125,22 +132,19 @@ struct _NO_DISCARD_ Vector2i { int64_t length_squared() const; double length() const; - int64_t distance_squared_to(const Vector2i &p_to) const; - double distance_to(const Vector2i &p_to) const; - real_t aspect() const { return width / (real_t)height; } Vector2i sign() const { return Vector2i(SIGN(x), SIGN(y)); } Vector2i abs() const { return Vector2i(Math::abs(x), Math::abs(y)); } - Vector2i snapped(const Vector2i &p_step) const; - Vector2i snappedi(int32_t p_step) const; Vector2i clamp(const Vector2i &p_min, const Vector2i &p_max) const; Vector2i clampi(int32_t p_min, int32_t p_max) const; + Vector2i snapped(const Vector2i &p_step) const; + Vector2i snappedi(int32_t p_step) const; operator String() const; operator Vector2() const; inline Vector2i() {} - inline Vector2i(const int32_t p_x, const int32_t p_y) { + inline Vector2i(int32_t p_x, int32_t p_y) { x = p_x; y = p_y; } @@ -148,19 +152,19 @@ struct _NO_DISCARD_ Vector2i { // Multiplication operators required to workaround issues with LLVM using implicit conversion. -_FORCE_INLINE_ Vector2i operator*(const int32_t p_scalar, const Vector2i &p_vector) { +_FORCE_INLINE_ Vector2i operator*(int32_t p_scalar, const Vector2i &p_vector) { return p_vector * p_scalar; } -_FORCE_INLINE_ Vector2i operator*(const int64_t p_scalar, const Vector2i &p_vector) { +_FORCE_INLINE_ Vector2i operator*(int64_t p_scalar, const Vector2i &p_vector) { return p_vector * p_scalar; } -_FORCE_INLINE_ Vector2i operator*(const float p_scalar, const Vector2i &p_vector) { +_FORCE_INLINE_ Vector2i operator*(float p_scalar, const Vector2i &p_vector) { return p_vector * p_scalar; } -_FORCE_INLINE_ Vector2i operator*(const double p_scalar, const Vector2i &p_vector) { +_FORCE_INLINE_ Vector2i operator*(double p_scalar, const Vector2i &p_vector) { return p_vector * p_scalar; } @@ -168,5 +172,3 @@ typedef Vector2i Size2i; typedef Vector2i Point2i; } // namespace godot - -#endif // GODOT_VECTOR2I_HPP diff --git a/include/godot_cpp/variant/vector3.hpp b/include/godot_cpp/variant/vector3.hpp index f256c3895..796daeca7 100644 --- a/include/godot_cpp/variant/vector3.hpp +++ b/include/godot_cpp/variant/vector3.hpp @@ -28,8 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef GODOT_VECTOR3_HPP -#define GODOT_VECTOR3_HPP +#pragma once #include #include @@ -41,7 +40,7 @@ struct Basis; struct Vector2; struct Vector3i; -struct _NO_DISCARD_ Vector3 { +struct [[nodiscard]] Vector3 { static const int AXIS_COUNT = 3; enum Axis { @@ -60,12 +59,12 @@ struct _NO_DISCARD_ Vector3 { real_t coord[3] = { 0 }; }; - _FORCE_INLINE_ const real_t &operator[](const int p_axis) const { + _FORCE_INLINE_ const real_t &operator[](int p_axis) const { DEV_ASSERT((unsigned int)p_axis < 3); return coord[p_axis]; } - _FORCE_INLINE_ real_t &operator[](const int p_axis) { + _FORCE_INLINE_ real_t &operator[](int p_axis) { DEV_ASSERT((unsigned int)p_axis < 3); return coord[p_axis]; } @@ -101,36 +100,38 @@ struct _NO_DISCARD_ Vector3 { _FORCE_INLINE_ Vector3 normalized() const; _FORCE_INLINE_ bool is_normalized() const; _FORCE_INLINE_ Vector3 inverse() const; - Vector3 limit_length(const real_t p_len = 1.0) const; + Vector3 limit_length(real_t p_len = 1.0) const; _FORCE_INLINE_ void zero(); - void snap(const Vector3 p_val); - void snapf(real_t p_val); - Vector3 snapped(const Vector3 p_val) const; - Vector3 snappedf(real_t p_val) const; + void snap(const Vector3 &p_step); + void snapf(real_t p_step); + Vector3 snapped(const Vector3 &p_step) const; + Vector3 snappedf(real_t p_step) const; - void rotate(const Vector3 &p_axis, const real_t p_angle); - Vector3 rotated(const Vector3 &p_axis, const real_t p_angle) const; + void rotate(const Vector3 &p_axis, real_t p_angle); + Vector3 rotated(const Vector3 &p_axis, real_t p_angle) const; /* Static Methods between 2 vector3s */ - _FORCE_INLINE_ Vector3 lerp(const Vector3 &p_to, const real_t p_weight) const; - _FORCE_INLINE_ Vector3 slerp(const Vector3 &p_to, const real_t p_weight) const; - _FORCE_INLINE_ Vector3 cubic_interpolate(const Vector3 &p_b, const Vector3 &p_pre_a, const Vector3 &p_post_b, const real_t p_weight) const; - _FORCE_INLINE_ Vector3 cubic_interpolate_in_time(const Vector3 &p_b, const Vector3 &p_pre_a, const Vector3 &p_post_b, const real_t p_weight, const real_t &p_b_t, const real_t &p_pre_a_t, const real_t &p_post_b_t) const; - _FORCE_INLINE_ Vector3 bezier_interpolate(const Vector3 &p_control_1, const Vector3 &p_control_2, const Vector3 &p_end, const real_t p_t) const; + _FORCE_INLINE_ Vector3 lerp(const Vector3 &p_to, real_t p_weight) const; + _FORCE_INLINE_ Vector3 slerp(const Vector3 &p_to, real_t p_weight) const; + _FORCE_INLINE_ Vector3 cubic_interpolate(const Vector3 &p_b, const Vector3 &p_pre_a, const Vector3 &p_post_b, real_t p_weight) const; + _FORCE_INLINE_ Vector3 cubic_interpolate_in_time(const Vector3 &p_b, const Vector3 &p_pre_a, const Vector3 &p_post_b, real_t p_weight, real_t p_b_t, real_t p_pre_a_t, real_t p_post_b_t) const; + _FORCE_INLINE_ Vector3 bezier_interpolate(const Vector3 &p_control_1, const Vector3 &p_control_2, const Vector3 &p_end, real_t p_t) const; + _FORCE_INLINE_ Vector3 bezier_derivative(const Vector3 &p_control_1, const Vector3 &p_control_2, const Vector3 &p_end, real_t p_t) const; - Vector3 move_toward(const Vector3 &p_to, const real_t p_delta) const; + Vector3 move_toward(const Vector3 &p_to, real_t p_delta) const; Vector2 octahedron_encode() const; static Vector3 octahedron_decode(const Vector2 &p_oct); - Vector2 octahedron_tangent_encode(const float sign) const; - static Vector3 octahedron_tangent_decode(const Vector2 &p_oct, float *sign); + Vector2 octahedron_tangent_encode(float p_sign) const; + static Vector3 octahedron_tangent_decode(const Vector2 &p_oct, float *r_sign); _FORCE_INLINE_ Vector3 cross(const Vector3 &p_with) const; _FORCE_INLINE_ real_t dot(const Vector3 &p_with) const; Basis outer(const Vector3 &p_with) const; + _FORCE_INLINE_ Vector3 get_any_perpendicular() const; _FORCE_INLINE_ Vector3 abs() const; _FORCE_INLINE_ Vector3 floor() const; @@ -143,7 +144,7 @@ struct _NO_DISCARD_ Vector3 { _FORCE_INLINE_ real_t distance_to(const Vector3 &p_to) const; _FORCE_INLINE_ real_t distance_squared_to(const Vector3 &p_to) const; - _FORCE_INLINE_ Vector3 posmod(const real_t p_mod) const; + _FORCE_INLINE_ Vector3 posmod(real_t p_mod) const; _FORCE_INLINE_ Vector3 posmodv(const Vector3 &p_modv) const; _FORCE_INLINE_ Vector3 project(const Vector3 &p_to) const; @@ -170,10 +171,10 @@ struct _NO_DISCARD_ Vector3 { _FORCE_INLINE_ Vector3 &operator/=(const Vector3 &p_v); _FORCE_INLINE_ Vector3 operator/(const Vector3 &p_v) const; - _FORCE_INLINE_ Vector3 &operator*=(const real_t p_scalar); - _FORCE_INLINE_ Vector3 operator*(const real_t p_scalar) const; - _FORCE_INLINE_ Vector3 &operator/=(const real_t p_scalar); - _FORCE_INLINE_ Vector3 operator/(const real_t p_scalar) const; + _FORCE_INLINE_ Vector3 &operator*=(real_t p_scalar); + _FORCE_INLINE_ Vector3 operator*(real_t p_scalar) const; + _FORCE_INLINE_ Vector3 &operator/=(real_t p_scalar); + _FORCE_INLINE_ Vector3 operator/(real_t p_scalar) const; _FORCE_INLINE_ Vector3 operator-() const; @@ -188,7 +189,7 @@ struct _NO_DISCARD_ Vector3 { operator Vector3i() const; _FORCE_INLINE_ Vector3() {} - _FORCE_INLINE_ Vector3(const real_t p_x, const real_t p_y, const real_t p_z) { + _FORCE_INLINE_ Vector3(real_t p_x, real_t p_y, real_t p_z) { x = p_x; y = p_y; z = p_z; @@ -228,14 +229,15 @@ Vector3 Vector3::round() const { return Vector3(Math::round(x), Math::round(y), Math::round(z)); } -Vector3 Vector3::lerp(const Vector3 &p_to, const real_t p_weight) const { - return Vector3( - x + (p_weight * (p_to.x - x)), - y + (p_weight * (p_to.y - y)), - z + (p_weight * (p_to.z - z))); +Vector3 Vector3::lerp(const Vector3 &p_to, real_t p_weight) const { + Vector3 res = *this; + res.x = Math::lerp(res.x, p_to.x, p_weight); + res.y = Math::lerp(res.y, p_to.y, p_weight); + res.z = Math::lerp(res.z, p_to.z, p_weight); + return res; } -Vector3 Vector3::slerp(const Vector3 &p_to, const real_t p_weight) const { +Vector3 Vector3::slerp(const Vector3 &p_to, real_t p_weight) const { // This method seems more complicated than it really is, since we write out // the internals of some methods for efficiency (mainly, checking length). real_t start_length_sq = length_squared(); @@ -257,7 +259,7 @@ Vector3 Vector3::slerp(const Vector3 &p_to, const real_t p_weight) const { return rotated(axis, angle * p_weight) * (result_length / start_length); } -Vector3 Vector3::cubic_interpolate(const Vector3 &p_b, const Vector3 &p_pre_a, const Vector3 &p_post_b, const real_t p_weight) const { +Vector3 Vector3::cubic_interpolate(const Vector3 &p_b, const Vector3 &p_pre_a, const Vector3 &p_post_b, real_t p_weight) const { Vector3 res = *this; res.x = Math::cubic_interpolate(res.x, p_b.x, p_pre_a.x, p_post_b.x, p_weight); res.y = Math::cubic_interpolate(res.y, p_b.y, p_pre_a.y, p_post_b.y, p_weight); @@ -265,7 +267,7 @@ Vector3 Vector3::cubic_interpolate(const Vector3 &p_b, const Vector3 &p_pre_a, c return res; } -Vector3 Vector3::cubic_interpolate_in_time(const Vector3 &p_b, const Vector3 &p_pre_a, const Vector3 &p_post_b, const real_t p_weight, const real_t &p_b_t, const real_t &p_pre_a_t, const real_t &p_post_b_t) const { +Vector3 Vector3::cubic_interpolate_in_time(const Vector3 &p_b, const Vector3 &p_pre_a, const Vector3 &p_post_b, real_t p_weight, real_t p_b_t, real_t p_pre_a_t, real_t p_post_b_t) const { Vector3 res = *this; res.x = Math::cubic_interpolate_in_time(res.x, p_b.x, p_pre_a.x, p_post_b.x, p_weight, p_b_t, p_pre_a_t, p_post_b_t); res.y = Math::cubic_interpolate_in_time(res.y, p_b.y, p_pre_a.y, p_post_b.y, p_weight, p_b_t, p_pre_a_t, p_post_b_t); @@ -273,17 +275,20 @@ Vector3 Vector3::cubic_interpolate_in_time(const Vector3 &p_b, const Vector3 &p_ return res; } -Vector3 Vector3::bezier_interpolate(const Vector3 &p_control_1, const Vector3 &p_control_2, const Vector3 &p_end, const real_t p_t) const { +Vector3 Vector3::bezier_interpolate(const Vector3 &p_control_1, const Vector3 &p_control_2, const Vector3 &p_end, real_t p_t) const { Vector3 res = *this; + res.x = Math::bezier_interpolate(res.x, p_control_1.x, p_control_2.x, p_end.x, p_t); + res.y = Math::bezier_interpolate(res.y, p_control_1.y, p_control_2.y, p_end.y, p_t); + res.z = Math::bezier_interpolate(res.z, p_control_1.z, p_control_2.z, p_end.z, p_t); + return res; +} - /* Formula from Wikipedia article on Bezier curves. */ - real_t omt = (1.0 - p_t); - real_t omt2 = omt * omt; - real_t omt3 = omt2 * omt; - real_t t2 = p_t * p_t; - real_t t3 = t2 * p_t; - - return res * omt3 + p_control_1 * omt2 * p_t * 3.0 + p_control_2 * omt * t2 * 3.0 + p_end * t3; +Vector3 Vector3::bezier_derivative(const Vector3 &p_control_1, const Vector3 &p_control_2, const Vector3 &p_end, real_t p_t) const { + Vector3 res = *this; + res.x = Math::bezier_derivative(res.x, p_control_1.x, p_control_2.x, p_end.x, p_t); + res.y = Math::bezier_derivative(res.y, p_control_1.y, p_control_2.y, p_end.y, p_t); + res.z = Math::bezier_derivative(res.z, p_control_1.z, p_control_2.z, p_end.z, p_t); + return res; } real_t Vector3::distance_to(const Vector3 &p_to) const { @@ -294,7 +299,7 @@ real_t Vector3::distance_squared_to(const Vector3 &p_to) const { return (p_to - *this).length_squared(); } -Vector3 Vector3::posmod(const real_t p_mod) const { +Vector3 Vector3::posmod(real_t p_mod) const { return Vector3(Math::fposmod(x, p_mod), Math::fposmod(y, p_mod), Math::fposmod(z, p_mod)); } @@ -323,6 +328,16 @@ Vector3 Vector3::direction_to(const Vector3 &p_to) const { return ret; } +Vector3 Vector3::get_any_perpendicular() const { + // Return the any perpendicular vector by cross product with the Vector3.RIGHT or Vector3.UP, + // whichever has the greater angle to the current vector with the sign of each element positive. + // The only essence is "to avoid being parallel to the current vector", and there is no mathematical basis for using Vector3.RIGHT and Vector3.UP, + // since it could be a different vector depending on the prior branching code Math::abs(x) <= Math::abs(y) && Math::abs(x) <= Math::abs(z). + // However, it would be reasonable to use any of the axes of the basis, as it is simpler to calculate. + ERR_FAIL_COND_V_MSG(is_zero_approx(), Vector3(0, 0, 0), "The Vector3 must not be zero."); + return cross((Math::abs(x) <= Math::abs(y) && Math::abs(x) <= Math::abs(z)) ? Vector3(1, 0, 0) : Vector3(0, 1, 0)).normalized(); +} + /* Operators */ Vector3 &Vector3::operator+=(const Vector3 &p_v) { @@ -369,7 +384,7 @@ Vector3 Vector3::operator/(const Vector3 &p_v) const { return Vector3(x / p_v.x, y / p_v.y, z / p_v.z); } -Vector3 &Vector3::operator*=(const real_t p_scalar) { +Vector3 &Vector3::operator*=(real_t p_scalar) { x *= p_scalar; y *= p_scalar; z *= p_scalar; @@ -379,34 +394,34 @@ Vector3 &Vector3::operator*=(const real_t p_scalar) { // Multiplication operators required to workaround issues with LLVM using implicit conversion // to Vector3i instead for integers where it should not. -_FORCE_INLINE_ Vector3 operator*(const float p_scalar, const Vector3 &p_vec) { +_FORCE_INLINE_ Vector3 operator*(float p_scalar, const Vector3 &p_vec) { return p_vec * p_scalar; } -_FORCE_INLINE_ Vector3 operator*(const double p_scalar, const Vector3 &p_vec) { +_FORCE_INLINE_ Vector3 operator*(double p_scalar, const Vector3 &p_vec) { return p_vec * p_scalar; } -_FORCE_INLINE_ Vector3 operator*(const int32_t p_scalar, const Vector3 &p_vec) { +_FORCE_INLINE_ Vector3 operator*(int32_t p_scalar, const Vector3 &p_vec) { return p_vec * p_scalar; } -_FORCE_INLINE_ Vector3 operator*(const int64_t p_scalar, const Vector3 &p_vec) { +_FORCE_INLINE_ Vector3 operator*(int64_t p_scalar, const Vector3 &p_vec) { return p_vec * p_scalar; } -Vector3 Vector3::operator*(const real_t p_scalar) const { +Vector3 Vector3::operator*(real_t p_scalar) const { return Vector3(x * p_scalar, y * p_scalar, z * p_scalar); } -Vector3 &Vector3::operator/=(const real_t p_scalar) { +Vector3 &Vector3::operator/=(real_t p_scalar) { x /= p_scalar; y /= p_scalar; z /= p_scalar; return *this; } -Vector3 Vector3::operator/(const real_t p_scalar) const { +Vector3 Vector3::operator/(real_t p_scalar) const { return Vector3(x / p_scalar, y / p_scalar, z / p_scalar); } @@ -520,9 +535,9 @@ void Vector3::zero() { // slide returns the component of the vector along the given plane, specified by its normal vector. Vector3 Vector3::slide(const Vector3 &p_normal) const { #ifdef MATH_CHECKS - ERR_FAIL_COND_V_MSG(!p_normal.is_normalized(), Vector3(), "The normal Vector3 must be normalized."); + ERR_FAIL_COND_V_MSG(!p_normal.is_normalized(), Vector3(), "The normal Vector3 " + p_normal.operator String() + " must be normalized."); #endif - return *this - p_normal * this->dot(p_normal); + return *this - p_normal * dot(p_normal); } Vector3 Vector3::bounce(const Vector3 &p_normal) const { @@ -531,11 +546,9 @@ Vector3 Vector3::bounce(const Vector3 &p_normal) const { Vector3 Vector3::reflect(const Vector3 &p_normal) const { #ifdef MATH_CHECKS - ERR_FAIL_COND_V_MSG(!p_normal.is_normalized(), Vector3(), "The normal Vector3 must be normalized."); + ERR_FAIL_COND_V_MSG(!p_normal.is_normalized(), Vector3(), "The normal Vector3 " + p_normal.operator String() + " must be normalized."); #endif - return 2.0f * p_normal * this->dot(p_normal) - *this; + return 2.0f * p_normal * dot(p_normal) - *this; } } // namespace godot - -#endif // GODOT_VECTOR3_HPP diff --git a/include/godot_cpp/variant/vector3i.hpp b/include/godot_cpp/variant/vector3i.hpp index b2cdbbdfd..2901b3665 100644 --- a/include/godot_cpp/variant/vector3i.hpp +++ b/include/godot_cpp/variant/vector3i.hpp @@ -28,8 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef GODOT_VECTOR3I_HPP -#define GODOT_VECTOR3I_HPP +#pragma once #include #include @@ -39,7 +38,7 @@ namespace godot { class String; struct Vector3; -struct _NO_DISCARD_ Vector3i { +struct [[nodiscard]] Vector3i { static const int AXIS_COUNT = 3; enum Axis { @@ -58,12 +57,12 @@ struct _NO_DISCARD_ Vector3i { int32_t coord[3] = { 0 }; }; - _FORCE_INLINE_ const int32_t &operator[](const int p_axis) const { + _FORCE_INLINE_ const int32_t &operator[](int p_axis) const { DEV_ASSERT((unsigned int)p_axis < 3); return coord[p_axis]; } - _FORCE_INLINE_ int32_t &operator[](const int p_axis) { + _FORCE_INLINE_ int32_t &operator[](int p_axis) { DEV_ASSERT((unsigned int)p_axis < 3); return coord[p_axis]; } @@ -90,17 +89,17 @@ struct _NO_DISCARD_ Vector3i { _FORCE_INLINE_ int64_t length_squared() const; _FORCE_INLINE_ double length() const; - _FORCE_INLINE_ int64_t distance_squared_to(const Vector3i &p_to) const; - _FORCE_INLINE_ double distance_to(const Vector3i &p_to) const; - _FORCE_INLINE_ void zero(); _FORCE_INLINE_ Vector3i abs() const; _FORCE_INLINE_ Vector3i sign() const; - Vector3i snapped(const Vector3i &p_step) const; - Vector3i snappedi(int32_t p_step) const; Vector3i clamp(const Vector3i &p_min, const Vector3i &p_max) const; Vector3i clampi(int32_t p_min, int32_t p_max) const; + Vector3i snapped(const Vector3i &p_step) const; + Vector3i snappedi(int32_t p_step) const; + + _FORCE_INLINE_ double distance_to(const Vector3i &p_to) const; + _FORCE_INLINE_ int64_t distance_squared_to(const Vector3i &p_to) const; /* Operators */ @@ -115,12 +114,12 @@ struct _NO_DISCARD_ Vector3i { _FORCE_INLINE_ Vector3i &operator%=(const Vector3i &p_v); _FORCE_INLINE_ Vector3i operator%(const Vector3i &p_v) const; - _FORCE_INLINE_ Vector3i &operator*=(const int32_t p_scalar); - _FORCE_INLINE_ Vector3i operator*(const int32_t p_scalar) const; - _FORCE_INLINE_ Vector3i &operator/=(const int32_t p_scalar); - _FORCE_INLINE_ Vector3i operator/(const int32_t p_scalar) const; - _FORCE_INLINE_ Vector3i &operator%=(const int32_t p_scalar); - _FORCE_INLINE_ Vector3i operator%(const int32_t p_scalar) const; + _FORCE_INLINE_ Vector3i &operator*=(int32_t p_scalar); + _FORCE_INLINE_ Vector3i operator*(int32_t p_scalar) const; + _FORCE_INLINE_ Vector3i &operator/=(int32_t p_scalar); + _FORCE_INLINE_ Vector3i operator/(int32_t p_scalar) const; + _FORCE_INLINE_ Vector3i &operator%=(int32_t p_scalar); + _FORCE_INLINE_ Vector3i operator%(int32_t p_scalar) const; _FORCE_INLINE_ Vector3i operator-() const; @@ -135,7 +134,7 @@ struct _NO_DISCARD_ Vector3i { operator Vector3() const; _FORCE_INLINE_ Vector3i() {} - _FORCE_INLINE_ Vector3i(const int32_t p_x, const int32_t p_y, const int32_t p_z) { + _FORCE_INLINE_ Vector3i(int32_t p_x, int32_t p_y, int32_t p_z) { x = p_x; y = p_y; z = p_z; @@ -150,14 +149,6 @@ double Vector3i::length() const { return Math::sqrt((double)length_squared()); } -int64_t Vector3i::distance_squared_to(const Vector3i &p_to) const { - return (p_to - *this).length_squared(); -} - -double Vector3i::distance_to(const Vector3i &p_to) const { - return (p_to - *this).length(); -} - Vector3i Vector3i::abs() const { return Vector3i(Math::abs(x), Math::abs(y), Math::abs(z)); } @@ -166,6 +157,14 @@ Vector3i Vector3i::sign() const { return Vector3i(SIGN(x), SIGN(y), SIGN(z)); } +double Vector3i::distance_to(const Vector3i &p_to) const { + return (p_to - *this).length(); +} + +int64_t Vector3i::distance_squared_to(const Vector3i &p_to) const { + return (p_to - *this).length_squared(); +} + /* Operators */ Vector3i &Vector3i::operator+=(const Vector3i &p_v) { @@ -223,54 +222,54 @@ Vector3i Vector3i::operator%(const Vector3i &p_v) const { return Vector3i(x % p_v.x, y % p_v.y, z % p_v.z); } -Vector3i &Vector3i::operator*=(const int32_t p_scalar) { +Vector3i &Vector3i::operator*=(int32_t p_scalar) { x *= p_scalar; y *= p_scalar; z *= p_scalar; return *this; } -Vector3i Vector3i::operator*(const int32_t p_scalar) const { +Vector3i Vector3i::operator*(int32_t p_scalar) const { return Vector3i(x * p_scalar, y * p_scalar, z * p_scalar); } // Multiplication operators required to workaround issues with LLVM using implicit conversion. -_FORCE_INLINE_ Vector3i operator*(const int32_t p_scalar, const Vector3i &p_vector) { +_FORCE_INLINE_ Vector3i operator*(int32_t p_scalar, const Vector3i &p_vector) { return p_vector * p_scalar; } -_FORCE_INLINE_ Vector3i operator*(const int64_t p_scalar, const Vector3i &p_vector) { +_FORCE_INLINE_ Vector3i operator*(int64_t p_scalar, const Vector3i &p_vector) { return p_vector * p_scalar; } -_FORCE_INLINE_ Vector3i operator*(const float p_scalar, const Vector3i &p_vector) { +_FORCE_INLINE_ Vector3i operator*(float p_scalar, const Vector3i &p_vector) { return p_vector * p_scalar; } -_FORCE_INLINE_ Vector3i operator*(const double p_scalar, const Vector3i &p_vector) { +_FORCE_INLINE_ Vector3i operator*(double p_scalar, const Vector3i &p_vector) { return p_vector * p_scalar; } -Vector3i &Vector3i::operator/=(const int32_t p_scalar) { +Vector3i &Vector3i::operator/=(int32_t p_scalar) { x /= p_scalar; y /= p_scalar; z /= p_scalar; return *this; } -Vector3i Vector3i::operator/(const int32_t p_scalar) const { +Vector3i Vector3i::operator/(int32_t p_scalar) const { return Vector3i(x / p_scalar, y / p_scalar, z / p_scalar); } -Vector3i &Vector3i::operator%=(const int32_t p_scalar) { +Vector3i &Vector3i::operator%=(int32_t p_scalar) { x %= p_scalar; y %= p_scalar; z %= p_scalar; return *this; } -Vector3i Vector3i::operator%(const int32_t p_scalar) const { +Vector3i Vector3i::operator%(int32_t p_scalar) const { return Vector3i(x % p_scalar, y % p_scalar, z % p_scalar); } @@ -339,5 +338,3 @@ void Vector3i::zero() { } } // namespace godot - -#endif // GODOT_VECTOR3I_HPP diff --git a/include/godot_cpp/variant/vector4.hpp b/include/godot_cpp/variant/vector4.hpp index e0e197f82..3348f6111 100644 --- a/include/godot_cpp/variant/vector4.hpp +++ b/include/godot_cpp/variant/vector4.hpp @@ -28,8 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef GODOT_VECTOR4_HPP -#define GODOT_VECTOR4_HPP +#pragma once #include #include @@ -37,8 +36,9 @@ namespace godot { class String; +struct Vector4i; -struct _NO_DISCARD_ Vector4 { +struct [[nodiscard]] Vector4 { static const int AXIS_COUNT = 4; enum Axis { @@ -55,15 +55,14 @@ struct _NO_DISCARD_ Vector4 { real_t z; real_t w; }; - [[deprecated("Use coord instead")]] real_t components[4]; real_t coord[4] = { 0, 0, 0, 0 }; }; - _FORCE_INLINE_ real_t &operator[](const int p_axis) { + _FORCE_INLINE_ real_t &operator[](int p_axis) { DEV_ASSERT((unsigned int)p_axis < 4); return coord[p_axis]; } - _FORCE_INLINE_ const real_t &operator[](const int p_axis) const { + _FORCE_INLINE_ const real_t &operator[](int p_axis) const { DEV_ASSERT((unsigned int)p_axis < 4); return coord[p_axis]; } @@ -105,11 +104,11 @@ struct _NO_DISCARD_ Vector4 { Vector4 floor() const; Vector4 ceil() const; Vector4 round() const; - Vector4 lerp(const Vector4 &p_to, const real_t p_weight) const; - Vector4 cubic_interpolate(const Vector4 &p_b, const Vector4 &p_pre_a, const Vector4 &p_post_b, const real_t p_weight) const; - Vector4 cubic_interpolate_in_time(const Vector4 &p_b, const Vector4 &p_pre_a, const Vector4 &p_post_b, const real_t p_weight, const real_t &p_b_t, const real_t &p_pre_a_t, const real_t &p_post_b_t) const; + Vector4 lerp(const Vector4 &p_to, real_t p_weight) const; + Vector4 cubic_interpolate(const Vector4 &p_b, const Vector4 &p_pre_a, const Vector4 &p_post_b, real_t p_weight) const; + Vector4 cubic_interpolate_in_time(const Vector4 &p_b, const Vector4 &p_pre_a, const Vector4 &p_post_b, real_t p_weight, real_t p_b_t, real_t p_pre_a_t, real_t p_post_b_t) const; - Vector4 posmod(const real_t p_mod) const; + Vector4 posmod(real_t p_mod) const; Vector4 posmodv(const Vector4 &p_modv) const; void snap(const Vector4 &p_step); void snapf(real_t p_step); @@ -125,15 +124,15 @@ struct _NO_DISCARD_ Vector4 { _FORCE_INLINE_ void operator-=(const Vector4 &p_vec4); _FORCE_INLINE_ void operator*=(const Vector4 &p_vec4); _FORCE_INLINE_ void operator/=(const Vector4 &p_vec4); - _FORCE_INLINE_ void operator*=(const real_t &s); - _FORCE_INLINE_ void operator/=(const real_t &s); + _FORCE_INLINE_ void operator*=(real_t p_s); + _FORCE_INLINE_ void operator/=(real_t p_s); _FORCE_INLINE_ Vector4 operator+(const Vector4 &p_vec4) const; _FORCE_INLINE_ Vector4 operator-(const Vector4 &p_vec4) const; _FORCE_INLINE_ Vector4 operator*(const Vector4 &p_vec4) const; _FORCE_INLINE_ Vector4 operator/(const Vector4 &p_vec4) const; _FORCE_INLINE_ Vector4 operator-() const; - _FORCE_INLINE_ Vector4 operator*(const real_t &s) const; - _FORCE_INLINE_ Vector4 operator/(const real_t &s) const; + _FORCE_INLINE_ Vector4 operator*(real_t p_s) const; + _FORCE_INLINE_ Vector4 operator/(real_t p_s) const; _FORCE_INLINE_ bool operator==(const Vector4 &p_vec4) const; _FORCE_INLINE_ bool operator!=(const Vector4 &p_vec4) const; @@ -143,28 +142,14 @@ struct _NO_DISCARD_ Vector4 { _FORCE_INLINE_ bool operator<=(const Vector4 &p_vec4) const; operator String() const; + operator Vector4i() const; _FORCE_INLINE_ Vector4() {} - - _FORCE_INLINE_ Vector4(real_t p_x, real_t p_y, real_t p_z, real_t p_w) : - x(p_x), - y(p_y), - z(p_z), - w(p_w) { - } - - Vector4(const Vector4 &p_vec4) : - x(p_vec4.x), - y(p_vec4.y), - z(p_vec4.z), - w(p_vec4.w) { - } - - void operator=(const Vector4 &p_vec4) { - x = p_vec4.x; - y = p_vec4.y; - z = p_vec4.z; - w = p_vec4.w; + _FORCE_INLINE_ Vector4(real_t p_x, real_t p_y, real_t p_z, real_t p_w) { + x = p_x; + y = p_y; + z = p_z; + w = p_w; } }; @@ -203,15 +188,15 @@ void Vector4::operator/=(const Vector4 &p_vec4) { z /= p_vec4.z; w /= p_vec4.w; } -void Vector4::operator*=(const real_t &s) { - x *= s; - y *= s; - z *= s; - w *= s; +void Vector4::operator*=(real_t p_s) { + x *= p_s; + y *= p_s; + z *= p_s; + w *= p_s; } -void Vector4::operator/=(const real_t &s) { - *this *= 1.0f / s; +void Vector4::operator/=(real_t p_s) { + *this *= 1.0f / p_s; } Vector4 Vector4::operator+(const Vector4 &p_vec4) const { @@ -234,12 +219,12 @@ Vector4 Vector4::operator-() const { return Vector4(-x, -y, -z, -w); } -Vector4 Vector4::operator*(const real_t &s) const { - return Vector4(x * s, y * s, z * s, w * s); +Vector4 Vector4::operator*(real_t p_s) const { + return Vector4(x * p_s, y * p_s, z * p_s, w * p_s); } -Vector4 Vector4::operator/(const real_t &s) const { - return *this * (1.0f / s); +Vector4 Vector4::operator/(real_t p_s) const { + return *this * (1.0f / p_s); } bool Vector4::operator==(const Vector4 &p_vec4) const { @@ -302,22 +287,20 @@ bool Vector4::operator>=(const Vector4 &p_v) const { return x > p_v.x; } -_FORCE_INLINE_ Vector4 operator*(const float p_scalar, const Vector4 &p_vec) { +_FORCE_INLINE_ Vector4 operator*(float p_scalar, const Vector4 &p_vec) { return p_vec * p_scalar; } -_FORCE_INLINE_ Vector4 operator*(const double p_scalar, const Vector4 &p_vec) { +_FORCE_INLINE_ Vector4 operator*(double p_scalar, const Vector4 &p_vec) { return p_vec * p_scalar; } -_FORCE_INLINE_ Vector4 operator*(const int32_t p_scalar, const Vector4 &p_vec) { +_FORCE_INLINE_ Vector4 operator*(int32_t p_scalar, const Vector4 &p_vec) { return p_vec * p_scalar; } -_FORCE_INLINE_ Vector4 operator*(const int64_t p_scalar, const Vector4 &p_vec) { +_FORCE_INLINE_ Vector4 operator*(int64_t p_scalar, const Vector4 &p_vec) { return p_vec * p_scalar; } } // namespace godot - -#endif // GODOT_VECTOR4_HPP diff --git a/include/godot_cpp/variant/vector4i.hpp b/include/godot_cpp/variant/vector4i.hpp index 8e9510fd0..1a7471af6 100644 --- a/include/godot_cpp/variant/vector4i.hpp +++ b/include/godot_cpp/variant/vector4i.hpp @@ -28,8 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef GODOT_VECTOR4I_HPP -#define GODOT_VECTOR4I_HPP +#pragma once #include #include @@ -39,7 +38,7 @@ namespace godot { class String; struct Vector4; -struct _NO_DISCARD_ Vector4i { +struct [[nodiscard]] Vector4i { static const int AXIS_COUNT = 4; enum Axis { @@ -60,12 +59,12 @@ struct _NO_DISCARD_ Vector4i { int32_t coord[4] = { 0 }; }; - _FORCE_INLINE_ const int32_t &operator[](const int p_axis) const { + _FORCE_INLINE_ const int32_t &operator[](int p_axis) const { DEV_ASSERT((unsigned int)p_axis < 4); return coord[p_axis]; } - _FORCE_INLINE_ int32_t &operator[](const int p_axis) { + _FORCE_INLINE_ int32_t &operator[](int p_axis) { DEV_ASSERT((unsigned int)p_axis < 4); return coord[p_axis]; } @@ -92,17 +91,17 @@ struct _NO_DISCARD_ Vector4i { _FORCE_INLINE_ int64_t length_squared() const; _FORCE_INLINE_ double length() const; - _FORCE_INLINE_ int64_t distance_squared_to(const Vector4i &p_to) const; - _FORCE_INLINE_ double distance_to(const Vector4i &p_to) const; - _FORCE_INLINE_ void zero(); + _FORCE_INLINE_ double distance_to(const Vector4i &p_to) const; + _FORCE_INLINE_ int64_t distance_squared_to(const Vector4i &p_to) const; + _FORCE_INLINE_ Vector4i abs() const; _FORCE_INLINE_ Vector4i sign() const; - Vector4i snapped(const Vector4i &p_step) const; - Vector4i snappedi(int32_t p_step) const; Vector4i clamp(const Vector4i &p_min, const Vector4i &p_max) const; Vector4i clampi(int32_t p_min, int32_t p_max) const; + Vector4i snapped(const Vector4i &p_step) const; + Vector4i snappedi(int32_t p_step) const; /* Operators */ @@ -117,12 +116,12 @@ struct _NO_DISCARD_ Vector4i { _FORCE_INLINE_ Vector4i &operator%=(const Vector4i &p_v); _FORCE_INLINE_ Vector4i operator%(const Vector4i &p_v) const; - _FORCE_INLINE_ Vector4i &operator*=(const int32_t p_scalar); - _FORCE_INLINE_ Vector4i operator*(const int32_t p_scalar) const; - _FORCE_INLINE_ Vector4i &operator/=(const int32_t p_scalar); - _FORCE_INLINE_ Vector4i operator/(const int32_t p_scalar) const; - _FORCE_INLINE_ Vector4i &operator%=(const int32_t p_scalar); - _FORCE_INLINE_ Vector4i operator%(const int32_t p_scalar) const; + _FORCE_INLINE_ Vector4i &operator*=(int32_t p_scalar); + _FORCE_INLINE_ Vector4i operator*(int32_t p_scalar) const; + _FORCE_INLINE_ Vector4i &operator/=(int32_t p_scalar); + _FORCE_INLINE_ Vector4i operator/(int32_t p_scalar) const; + _FORCE_INLINE_ Vector4i &operator%=(int32_t p_scalar); + _FORCE_INLINE_ Vector4i operator%(int32_t p_scalar) const; _FORCE_INLINE_ Vector4i operator-() const; @@ -138,7 +137,7 @@ struct _NO_DISCARD_ Vector4i { _FORCE_INLINE_ Vector4i() {} Vector4i(const Vector4 &p_vec4); - _FORCE_INLINE_ Vector4i(const int32_t p_x, const int32_t p_y, const int32_t p_z, const int32_t p_w) { + _FORCE_INLINE_ Vector4i(int32_t p_x, int32_t p_y, int32_t p_z, int32_t p_w) { x = p_x; y = p_y; z = p_z; @@ -154,20 +153,20 @@ double Vector4i::length() const { return Math::sqrt((double)length_squared()); } -int64_t Vector4i::distance_squared_to(const Vector4i &p_to) const { - return (p_to - *this).length_squared(); -} - double Vector4i::distance_to(const Vector4i &p_to) const { return (p_to - *this).length(); } +int64_t Vector4i::distance_squared_to(const Vector4i &p_to) const { + return (p_to - *this).length_squared(); +} + Vector4i Vector4i::abs() const { return Vector4i(Math::abs(x), Math::abs(y), Math::abs(z), Math::abs(w)); } Vector4i Vector4i::sign() const { - return Vector4i(Math::sign(x), Math::sign(y), Math::sign(z), Math::sign(w)); + return Vector4i(SIGN(x), SIGN(y), SIGN(z), SIGN(w)); } /* Operators */ @@ -232,7 +231,7 @@ Vector4i Vector4i::operator%(const Vector4i &p_v) const { return Vector4i(x % p_v.x, y % p_v.y, z % p_v.z, w % p_v.w); } -Vector4i &Vector4i::operator*=(const int32_t p_scalar) { +Vector4i &Vector4i::operator*=(int32_t p_scalar) { x *= p_scalar; y *= p_scalar; z *= p_scalar; @@ -240,29 +239,29 @@ Vector4i &Vector4i::operator*=(const int32_t p_scalar) { return *this; } -Vector4i Vector4i::operator*(const int32_t p_scalar) const { +Vector4i Vector4i::operator*(int32_t p_scalar) const { return Vector4i(x * p_scalar, y * p_scalar, z * p_scalar, w * p_scalar); } // Multiplication operators required to workaround issues with LLVM using implicit conversion. -_FORCE_INLINE_ Vector4i operator*(const int32_t p_scalar, const Vector4i &p_vector) { +_FORCE_INLINE_ Vector4i operator*(int32_t p_scalar, const Vector4i &p_vector) { return p_vector * p_scalar; } -_FORCE_INLINE_ Vector4i operator*(const int64_t p_scalar, const Vector4i &p_vector) { +_FORCE_INLINE_ Vector4i operator*(int64_t p_scalar, const Vector4i &p_vector) { return p_vector * p_scalar; } -_FORCE_INLINE_ Vector4i operator*(const float p_scalar, const Vector4i &p_vector) { +_FORCE_INLINE_ Vector4i operator*(float p_scalar, const Vector4i &p_vector) { return p_vector * p_scalar; } -_FORCE_INLINE_ Vector4i operator*(const double p_scalar, const Vector4i &p_vector) { +_FORCE_INLINE_ Vector4i operator*(double p_scalar, const Vector4i &p_vector) { return p_vector * p_scalar; } -Vector4i &Vector4i::operator/=(const int32_t p_scalar) { +Vector4i &Vector4i::operator/=(int32_t p_scalar) { x /= p_scalar; y /= p_scalar; z /= p_scalar; @@ -270,11 +269,11 @@ Vector4i &Vector4i::operator/=(const int32_t p_scalar) { return *this; } -Vector4i Vector4i::operator/(const int32_t p_scalar) const { +Vector4i Vector4i::operator/(int32_t p_scalar) const { return Vector4i(x / p_scalar, y / p_scalar, z / p_scalar, w / p_scalar); } -Vector4i &Vector4i::operator%=(const int32_t p_scalar) { +Vector4i &Vector4i::operator%=(int32_t p_scalar) { x %= p_scalar; y %= p_scalar; z %= p_scalar; @@ -282,7 +281,7 @@ Vector4i &Vector4i::operator%=(const int32_t p_scalar) { return *this; } -Vector4i Vector4i::operator%(const int32_t p_scalar) const { +Vector4i Vector4i::operator%(int32_t p_scalar) const { return Vector4i(x % p_scalar, y % p_scalar, z % p_scalar, w % p_scalar); } @@ -367,5 +366,3 @@ void Vector4i::zero() { } } // namespace godot - -#endif // GODOT_VECTOR4I_HPP diff --git a/misc/scripts/check_get_file_list.py b/misc/scripts/check_get_file_list.py index 33bc6b624..6ea5d6f73 100755 --- a/misc/scripts/check_get_file_list.py +++ b/misc/scripts/check_get_file_list.py @@ -6,26 +6,41 @@ sys.path.insert(1, os.path.join(os.path.dirname(__file__), "..", "..")) -from binding_generator import generate_bindings, get_file_list +from binding_generator import _generate_bindings, _get_file_list +from build_profile import generate_trimmed_api api_filepath = "gdextension/extension_api.json" bits = "64" precision = "single" output_dir = "self_test" -generate_bindings(api_filepath, use_template_get_node=False, bits=bits, precision=precision, output_dir=output_dir) -flist = get_file_list(api_filepath, output_dir, headers=True, sources=True) - -p = Path(output_dir) / "gen" -allfiles = [str(f.as_posix()) for f in p.glob("**/*.*")] -missing = list(filter((lambda f: f not in flist), allfiles)) -extras = list(filter((lambda f: f not in allfiles), flist)) -if len(missing) > 0 or len(extras) > 0: - print("Error!") - for f in missing: - print("MISSING: " + str(f)) - for f in extras: - print("EXTRA: " + str(f)) - sys.exit(1) -else: - print("OK!") + +def test(profile_filepath=""): + api = generate_trimmed_api(api_filepath, profile_filepath) + _generate_bindings( + api, + api_filepath, + use_template_get_node=False, + bits=bits, + precision=precision, + output_dir=output_dir, + ) + flist = _get_file_list(api, output_dir, headers=True, sources=True) + + p = Path(output_dir) / "gen" + allfiles = [str(f.as_posix()) for f in p.glob("**/*.*")] + missing = list(filter((lambda f: f not in flist), allfiles)) + extras = list(filter((lambda f: f not in allfiles), flist)) + if len(missing) > 0 or len(extras) > 0: + print("Error!") + for f in missing: + print("MISSING: " + str(f)) + for f in extras: + print("EXTRA: " + str(f)) + sys.exit(1) + else: + print("OK!") + + +test() +test("test/build_profile.json") diff --git a/misc/scripts/header_guards.py b/misc/scripts/header_guards.py index c99c42200..63a6b75ff 100644 --- a/misc/scripts/header_guards.py +++ b/misc/scripts/header_guards.py @@ -2,121 +2,82 @@ # -*- coding: utf-8 -*- import sys -from pathlib import Path if len(sys.argv) < 2: print("Invalid usage of header_guards.py, it should be called with a path to one or multiple files.") sys.exit(1) -HEADER_CHECK_OFFSET = 30 -HEADER_BEGIN_OFFSET = 31 -HEADER_END_OFFSET = -1 - changed = [] invalid = [] for file in sys.argv[1:]: - with open(file, "rt", encoding="utf-8", newline="\n") as f: - lines = f.readlines() + header_start = -1 + header_end = -1 - if len(lines) <= HEADER_BEGIN_OFFSET: - continue # Most likely a dummy file. + with open(file.strip(), "rt", encoding="utf-8", newline="\n") as f: + lines = f.readlines() - if lines[HEADER_CHECK_OFFSET].startswith("#import"): - continue # Early catch obj-c file. + for idx, line in enumerate(lines): + sline = line.strip() + + if header_start < 0: + if sline == "": # Skip empty lines at the top. + continue + + if sline.startswith("/**********"): # Godot header starts this way. + header_start = idx + else: + header_end = 0 # There is no Godot header. + break + else: + if not sline.startswith(("*", "/*")): # Not in the Godot header anymore. + header_end = idx + 1 # The guard should be two lines below the Godot header. + break + + if (HEADER_CHECK_OFFSET := header_end) < 0 or HEADER_CHECK_OFFSET >= len(lines): + invalid.append(file) + continue - name = f"GODOT_{Path(file).name}".upper().replace(".", "_").replace("-", "_").replace(" ", "_") + if lines[HEADER_CHECK_OFFSET].startswith("#pragma once"): + continue - HEADER_CHECK = f"#ifndef {name}\n" - HEADER_BEGIN = f"#define {name}\n" - HEADER_END = f"#endif // {name}\n" + # Might be using legacy header guards. + HEADER_BEGIN_OFFSET = HEADER_CHECK_OFFSET + 1 + HEADER_END_OFFSET = len(lines) - 1 - if ( - lines[HEADER_CHECK_OFFSET] == HEADER_CHECK - and lines[HEADER_BEGIN_OFFSET] == HEADER_BEGIN - and lines[HEADER_END_OFFSET] == HEADER_END - ): + if HEADER_BEGIN_OFFSET >= HEADER_END_OFFSET: + invalid.append(file) continue - # Guards might exist but with the wrong names. if ( lines[HEADER_CHECK_OFFSET].startswith("#ifndef") and lines[HEADER_BEGIN_OFFSET].startswith("#define") and lines[HEADER_END_OFFSET].startswith("#endif") ): - lines[HEADER_CHECK_OFFSET] = HEADER_CHECK - lines[HEADER_BEGIN_OFFSET] = HEADER_BEGIN - lines[HEADER_END_OFFSET] = HEADER_END + lines[HEADER_CHECK_OFFSET] = "#pragma once" + lines[HEADER_BEGIN_OFFSET] = "\n" + lines.pop() with open(file, "wt", encoding="utf-8", newline="\n") as f: f.writelines(lines) changed.append(file) continue - header_check = -1 - header_begin = -1 - header_end = -1 - pragma_once = -1 - objc = False - - for idx, line in enumerate(lines): - if not line.startswith("#"): - continue - elif line.startswith("#ifndef") and header_check == -1: - header_check = idx - elif line.startswith("#define") and header_begin == -1: - header_begin = idx - elif line.startswith("#endif") and header_end == -1: - header_end = idx - elif line.startswith("#pragma once"): - pragma_once = idx + # Verify `#pragma once` doesn't exist at invalid location. + misplaced = False + for line in lines: + if line.startswith("#pragma once"): + misplaced = True break - elif line.startswith("#import"): - objc = True - break - - if objc: - continue - if pragma_once != -1: - lines.pop(pragma_once) - lines.insert(HEADER_CHECK_OFFSET, HEADER_CHECK) - lines.insert(HEADER_BEGIN_OFFSET, HEADER_BEGIN) - lines.append("\n") - lines.append(HEADER_END) - with open(file, "wt", encoding="utf-8", newline="\n") as f: - f.writelines(lines) - changed.append(file) - continue - - if header_check == -1 and header_begin == -1 and header_end == -1: - # Guards simply didn't exist - lines.insert(HEADER_CHECK_OFFSET, HEADER_CHECK) - lines.insert(HEADER_BEGIN_OFFSET, HEADER_BEGIN) - lines.append("\n") - lines.append(HEADER_END) - with open(file, "wt", encoding="utf-8", newline="\n") as f: - f.writelines(lines) - changed.append(file) + if misplaced: + invalid.append(file) continue - if header_check != -1 and header_begin != -1 and header_end != -1: - # All prepends "found", see if we can salvage this. - if header_check == header_begin - 1 and header_begin < header_end: - lines.pop(header_check) - lines.pop(header_begin - 1) - lines.pop(header_end - 2) - if lines[header_end - 3] == "\n": - lines.pop(header_end - 3) - lines.insert(HEADER_CHECK_OFFSET, HEADER_CHECK) - lines.insert(HEADER_BEGIN_OFFSET, HEADER_BEGIN) - lines.append("\n") - lines.append(HEADER_END) - with open(file, "wt", encoding="utf-8", newline="\n") as f: - f.writelines(lines) - changed.append(file) - continue - - invalid.append(file) + # Assume that we're simply missing a guard entirely. + lines.insert(HEADER_CHECK_OFFSET, "#pragma once\n\n") + with open(file, "wt", encoding="utf-8", newline="\n") as f: + f.writelines(lines) + changed.append(file) if changed: for file in changed: diff --git a/src/core/class_db.cpp b/src/core/class_db.cpp index ae74f2c27..f6257b733 100644 --- a/src/core/class_db.cpp +++ b/src/core/class_db.cpp @@ -285,7 +285,7 @@ void ClassDB::bind_integer_constant(const StringName &p_class_name, const String // Register it with Godot internal::gdextension_interface_classdb_register_extension_class_integer_constant(internal::library, p_class_name._native_ptr(), p_enum_name._native_ptr(), p_constant_name._native_ptr(), p_constant_value, p_is_bitfield); } -GDExtensionClassCallVirtual ClassDB::get_virtual_func(void *p_userdata, GDExtensionConstStringNamePtr p_name) { +GDExtensionClassCallVirtual ClassDB::get_virtual_func(void *p_userdata, GDExtensionConstStringNamePtr p_name, uint32_t p_hash) { // This is called by Godot the first time it calls a virtual function, and it caches the result, per object instance. // Because of this, it can happen from different threads at once. // It should be ok not using any mutex as long as we only READ data. @@ -299,10 +299,10 @@ GDExtensionClassCallVirtual ClassDB::get_virtual_func(void *p_userdata, GDExtens // Find method in current class, or any of its parent classes (Godot classes not included) while (type != nullptr) { - std::unordered_map::const_iterator method_it = type->virtual_methods.find(*name); + std::unordered_map::const_iterator method_it = type->virtual_methods.find(*name); - if (method_it != type->virtual_methods.end()) { - return method_it->second; + if (method_it != type->virtual_methods.end() && method_it->second.hash == p_hash) { + return method_it->second.func; } type = type->parent_ptr; @@ -328,7 +328,7 @@ const GDExtensionInstanceBindingCallbacks *ClassDB::get_instance_binding_callbac return callbacks_it->second; } -void ClassDB::bind_virtual_method(const StringName &p_class, const StringName &p_method, GDExtensionClassCallVirtual p_call) { +void ClassDB::bind_virtual_method(const StringName &p_class, const StringName &p_method, GDExtensionClassCallVirtual p_call, uint32_t p_hash) { std::unordered_map::iterator type_it = classes.find(p_class); ERR_FAIL_COND_MSG(type_it == classes.end(), String("Class '{0}' doesn't exist.").format(Array::make(p_class))); @@ -337,7 +337,10 @@ void ClassDB::bind_virtual_method(const StringName &p_class, const StringName &p ERR_FAIL_COND_MSG(type.method_map.find(p_method) != type.method_map.end(), String("Method '{0}::{1}()' already registered as non-virtual.").format(Array::make(p_class, p_method))); ERR_FAIL_COND_MSG(type.virtual_methods.find(p_method) != type.virtual_methods.end(), String("Virtual '{0}::{1}()' method already registered.").format(Array::make(p_class, p_method))); - type.virtual_methods[p_method] = p_call; + type.virtual_methods[p_method] = ClassInfo::VirtualMethod{ + p_call, + p_hash, + }; } void ClassDB::add_virtual_method(const StringName &p_class, const MethodInfo &p_method, const Vector &p_arg_names) { diff --git a/src/godot.cpp b/src/godot.cpp index fe75e6e9d..31a64c462 100644 --- a/src/godot.cpp +++ b/src/godot.cpp @@ -94,6 +94,7 @@ GDExtensionInterfaceVariantCanConvert gdextension_interface_variant_can_convert GDExtensionInterfaceVariantCanConvertStrict gdextension_interface_variant_can_convert_strict = nullptr; GDExtensionInterfaceGetVariantFromTypeConstructor gdextension_interface_get_variant_from_type_constructor = nullptr; GDExtensionInterfaceGetVariantToTypeConstructor gdextension_interface_get_variant_to_type_constructor = nullptr; +GDExtensionInterfaceGetVariantGetInternalPtrFunc gdextension_interface_variant_get_ptr_internal_getter = nullptr; GDExtensionInterfaceVariantGetPtrOperatorEvaluator gdextension_interface_variant_get_ptr_operator_evaluator = nullptr; GDExtensionInterfaceVariantGetPtrBuiltinMethod gdextension_interface_variant_get_ptr_builtin_method = nullptr; GDExtensionInterfaceVariantGetPtrConstructor gdextension_interface_variant_get_ptr_constructor = nullptr; @@ -375,6 +376,7 @@ GDExtensionBool GDExtensionBinding::init(GDExtensionInterfaceGetProcAddress p_ge LOAD_PROC_ADDRESS(variant_can_convert_strict, GDExtensionInterfaceVariantCanConvertStrict); LOAD_PROC_ADDRESS(get_variant_from_type_constructor, GDExtensionInterfaceGetVariantFromTypeConstructor); LOAD_PROC_ADDRESS(get_variant_to_type_constructor, GDExtensionInterfaceGetVariantToTypeConstructor); + LOAD_PROC_ADDRESS(variant_get_ptr_internal_getter, GDExtensionInterfaceGetVariantGetInternalPtrFunc); LOAD_PROC_ADDRESS(variant_get_ptr_operator_evaluator, GDExtensionInterfaceVariantGetPtrOperatorEvaluator); LOAD_PROC_ADDRESS(variant_get_ptr_builtin_method, GDExtensionInterfaceVariantGetPtrBuiltinMethod); LOAD_PROC_ADDRESS(variant_get_ptr_constructor, GDExtensionInterfaceVariantGetPtrConstructor); diff --git a/src/variant/aabb.cpp b/src/variant/aabb.cpp index ded17d2ba..c0ac63899 100644 --- a/src/variant/aabb.cpp +++ b/src/variant/aabb.cpp @@ -119,55 +119,75 @@ AABB AABB::intersection(const AABB &p_aabb) const { return AABB(min, max - min); } -bool AABB::intersects_ray(const Vector3 &p_from, const Vector3 &p_dir, Vector3 *r_clip, Vector3 *r_normal) const { +// Note that this routine returns the BACKTRACKED (i.e. behind the ray origin) +// intersection point + normal if INSIDE the AABB. +// The caller can therefore decide when INSIDE whether to use the +// backtracked intersection, or use p_from as the intersection, and +// carry on progressing without e.g. reflecting against the normal. +bool AABB::find_intersects_ray(const Vector3 &p_from, const Vector3 &p_dir, bool &r_inside, Vector3 *r_intersection_point, Vector3 *r_normal) const { #ifdef MATH_CHECKS if (unlikely(size.x < 0 || size.y < 0 || size.z < 0)) { ERR_PRINT("AABB size is negative, this is not supported. Use AABB.abs() to get an AABB with a positive size."); } #endif - Vector3 c1, c2; Vector3 end = position + size; - real_t near = -1e20; - real_t far = 1e20; + real_t tmin = -1e20; + real_t tmax = 1e20; int axis = 0; + // Make sure r_inside is always initialized, + // to prevent reading uninitialized data in the client code. + r_inside = false; + for (int i = 0; i < 3; i++) { if (p_dir[i] == 0) { if ((p_from[i] < position[i]) || (p_from[i] > end[i])) { return false; } } else { // ray not parallel to planes in this direction - c1[i] = (position[i] - p_from[i]) / p_dir[i]; - c2[i] = (end[i] - p_from[i]) / p_dir[i]; + real_t t1 = (position[i] - p_from[i]) / p_dir[i]; + real_t t2 = (end[i] - p_from[i]) / p_dir[i]; - if (c1[i] > c2[i]) { - SWAP(c1, c2); + if (t1 > t2) { + SWAP(t1, t2); } - if (c1[i] > near) { - near = c1[i]; + if (t1 >= tmin) { + tmin = t1; axis = i; } - if (c2[i] < far) { - far = c2[i]; + if (t2 < tmax) { + if (t2 < 0) { + return false; + } + tmax = t2; } - if ((near > far) || (far < 0)) { + if (tmin > tmax) { return false; } } } - if (r_clip) { - *r_clip = c1; + // Did the ray start from inside the box? + // In which case the intersection returned is the point of entry + // (behind the ray start) or the calling routine can use the ray origin as intersection point. + r_inside = tmin < 0; + + if (r_intersection_point) { + *r_intersection_point = p_from + p_dir * tmin; + + // Prevent float error by making sure the point is exactly + // on the AABB border on the relevant axis. + r_intersection_point->coord[axis] = (p_dir[axis] >= 0) ? position.coord[axis] : end.coord[axis]; } if (r_normal) { *r_normal = Vector3(); - (*r_normal)[axis] = p_dir[axis] ? -1 : 1; + (*r_normal)[axis] = (p_dir[axis] >= 0) ? -1 : 1; } return true; } -bool AABB::intersects_segment(const Vector3 &p_from, const Vector3 &p_to, Vector3 *r_clip, Vector3 *r_normal) const { +bool AABB::intersects_segment(const Vector3 &p_from, const Vector3 &p_to, Vector3 *r_intersection_point, Vector3 *r_normal) const { #ifdef MATH_CHECKS if (unlikely(size.x < 0 || size.y < 0 || size.z < 0)) { ERR_PRINT("AABB size is negative, this is not supported. Use AABB.abs() to get an AABB with a positive size."); @@ -225,8 +245,8 @@ bool AABB::intersects_segment(const Vector3 &p_from, const Vector3 &p_to, Vector *r_normal = normal; } - if (r_clip) { - *r_clip = p_from + rel * min; + if (r_intersection_point) { + *r_intersection_point = p_from + rel * min; } return true; @@ -412,7 +432,15 @@ Variant AABB::intersects_segment_bind(const Vector3 &p_from, const Vector3 &p_to Variant AABB::intersects_ray_bind(const Vector3 &p_from, const Vector3 &p_dir) const { Vector3 inters; - if (intersects_ray(p_from, p_dir, &inters)) { + bool inside = false; + + if (find_intersects_ray(p_from, p_dir, inside, &inters)) { + // When inside the intersection point may be BEHIND the ray, + // so for general use we return the ray origin. + if (inside) { + return p_from; + } + return inters; } return Variant(); diff --git a/src/variant/basis.cpp b/src/variant/basis.cpp index d8a991917..67cbb3aca 100644 --- a/src/variant/basis.cpp +++ b/src/variant/basis.cpp @@ -29,31 +29,17 @@ /**************************************************************************/ #include +#include #include #include +using namespace godot; + #define cofac(row1, col1, row2, col2) \ (rows[row1][col1] * rows[row2][col2] - rows[row1][col2] * rows[row2][col1]) namespace godot { -void Basis::from_z(const Vector3 &p_z) { - if (Math::abs(p_z.z) > (real_t)Math_SQRT12) { - // choose p in y-z plane - real_t a = p_z[1] * p_z[1] + p_z[2] * p_z[2]; - real_t k = 1.0f / Math::sqrt(a); - rows[0] = Vector3(0, -p_z[2] * k, p_z[1] * k); - rows[1] = Vector3(a * k, -p_z[0] * rows[0][2], p_z[0] * rows[0][1]); - } else { - // choose p in x-y plane - real_t a = p_z.x * p_z.x + p_z.y * p_z.y; - real_t k = 1.0f / Math::sqrt(a); - rows[0] = Vector3(-p_z.y * k, p_z.x * k, 0); - rows[1] = Vector3(-p_z.z * rows[0].y, p_z.z * rows[0].x, a * k); - } - rows[2] = p_z; -} - void Basis::invert() { real_t co[3] = { cofac(1, 1, 2, 2), cofac(1, 2, 2, 0), cofac(1, 0, 2, 1) @@ -107,13 +93,35 @@ Basis Basis::orthogonalized() const { return c; } +// Returns true if the basis vectors are orthogonal (perpendicular), so it has no skew or shear, and can be decomposed into rotation and scale. +// See https://en.wikipedia.org/wiki/Orthogonal_basis bool Basis::is_orthogonal() const { - Basis identity; - Basis m = (*this) * transposed(); + const Vector3 x = get_column(0); + const Vector3 y = get_column(1); + const Vector3 z = get_column(2); + return Math::is_zero_approx(x.dot(y)) && Math::is_zero_approx(x.dot(z)) && Math::is_zero_approx(y.dot(z)); +} - return m.is_equal_approx(identity); +// Returns true if the basis vectors are orthonormal (orthogonal and normalized), so it has no scale, skew, or shear. +// See https://en.wikipedia.org/wiki/Orthonormal_basis +bool Basis::is_orthonormal() const { + const Vector3 x = get_column(0); + const Vector3 y = get_column(1); + const Vector3 z = get_column(2); + return Math::is_equal_approx(x.length_squared(), 1) && Math::is_equal_approx(y.length_squared(), 1) && Math::is_equal_approx(z.length_squared(), 1) && Math::is_zero_approx(x.dot(y)) && Math::is_zero_approx(x.dot(z)) && Math::is_zero_approx(y.dot(z)); } +// Returns true if the basis is conformal (orthogonal, uniform scale, preserves angles and distance ratios). +// See https://en.wikipedia.org/wiki/Conformal_linear_transformation +bool Basis::is_conformal() const { + const Vector3 x = get_column(0); + const Vector3 y = get_column(1); + const Vector3 z = get_column(2); + const real_t x_len_sq = x.length_squared(); + return Math::is_equal_approx(x_len_sq, y.length_squared()) && Math::is_equal_approx(x_len_sq, z.length_squared()) && Math::is_zero_approx(x.dot(y)) && Math::is_zero_approx(x.dot(z)) && Math::is_zero_approx(y.dot(z)); +} + +// Returns true if the basis only has diagonal elements, so it may only have scale or flip, but no rotation, skew, or shear. bool Basis::is_diagonal() const { return ( Math::is_zero_approx(rows[0][1]) && Math::is_zero_approx(rows[0][2]) && @@ -121,8 +129,9 @@ bool Basis::is_diagonal() const { Math::is_zero_approx(rows[2][0]) && Math::is_zero_approx(rows[2][1])); } +// Returns true if the basis is a pure rotation matrix, so it has no scale, skew, shear, or flip. bool Basis::is_rotation() const { - return Math::is_equal_approx(determinant(), 1, (real_t)UNIT_EPSILON) && is_orthogonal(); + return is_conformal() && Math::is_equal_approx(determinant(), 1, (real_t)UNIT_EPSILON); } #ifdef MATH_CHECKS @@ -257,29 +266,26 @@ void Basis::scale_orthogonal(const Vector3 &p_scale) { Basis Basis::scaled_orthogonal(const Vector3 &p_scale) const { Basis m = *this; Vector3 s = Vector3(-1, -1, -1) + p_scale; + bool sign = std::signbit(s.x + s.y + s.z); + Basis b = m.orthonormalized(); + s = b.xform_inv(s); Vector3 dots; - Basis b; for (int i = 0; i < 3; i++) { for (int j = 0; j < 3; j++) { - dots[j] += s[i] * Math::abs(m.get_column(i).normalized().dot(b.get_column(j))); + dots[j] += s[i] * abs(m.get_column(i).normalized().dot(b.get_column(j))); } } + if (sign != std::signbit(dots.x + dots.y + dots.z)) { + dots = -dots; + } m.scale_local(Vector3(1, 1, 1) + dots); return m; } -float Basis::get_uniform_scale() const { +real_t Basis::get_uniform_scale() const { return (rows[0].length() + rows[1].length() + rows[2].length()) / 3.0f; } -void Basis::make_scale_uniform() { - float l = (rows[0].length() + rows[1].length() + rows[2].length()) / 3.0f; - for (int i = 0; i < 3; i++) { - rows[i].normalize(); - rows[i] *= l; - } -} - Basis Basis::scaled_local(const Vector3 &p_scale) const { return (*this) * Basis::from_scale(p_scale); } @@ -291,7 +297,7 @@ Vector3 Basis::get_scale_abs() const { Vector3(rows[0][2], rows[1][2], rows[2][2]).length()); } -Vector3 Basis::get_scale_local() const { +Vector3 Basis::get_scale_global() const { real_t det_sign = SIGN(determinant()); return det_sign * Vector3(rows[0].length(), rows[1].length(), rows[2].length()); } @@ -418,7 +424,7 @@ void Basis::rotate_to_align(Vector3 p_start_direction, Vector3 p_end_direction) real_t dot = p_start_direction.dot(p_end_direction); dot = CLAMP(dot, -1.0f, 1.0f); const real_t angle_rads = Math::acos(dot); - set_axis_angle(axis, angle_rads); + *this = Basis(axis, angle_rads) * (*this); } } @@ -453,8 +459,13 @@ void Basis::get_rotation_axis_angle_local(Vector3 &p_axis, real_t &p_angle) cons } Vector3 Basis::get_euler(EulerOrder p_order) const { + // This epsilon value results in angles within a +/- 0.04 degree range being simplified/truncated. + // Based on testing, this is the largest the epsilon can be without the angle truncation becoming + // visually noticeable. + const real_t epsilon = 0.00000025; + switch (p_order) { - case EULER_ORDER_XYZ: { + case EulerOrder::EULER_ORDER_XYZ: { // Euler angles in XYZ convention. // See https://en.wikipedia.org/wiki/Euler_angles#Rotation_matrix // @@ -464,8 +475,8 @@ Vector3 Basis::get_euler(EulerOrder p_order) const { Vector3 euler; real_t sy = rows[0][2]; - if (sy < (1.0f - (real_t)CMP_EPSILON)) { - if (sy > -(1.0f - (real_t)CMP_EPSILON)) { + if (sy < (1.0f - epsilon)) { + if (sy > -(1.0f - epsilon)) { // is this a pure Y rotation? if (rows[1][0] == 0 && rows[0][1] == 0 && rows[1][2] == 0 && rows[2][1] == 0 && rows[1][1] == 1) { // return the simplest form (human friendlier in editor and scripts) @@ -489,7 +500,7 @@ Vector3 Basis::get_euler(EulerOrder p_order) const { } return euler; } - case EULER_ORDER_XZY: { + case EulerOrder::EULER_ORDER_XZY: { // Euler angles in XZY convention. // See https://en.wikipedia.org/wiki/Euler_angles#Rotation_matrix // @@ -499,8 +510,8 @@ Vector3 Basis::get_euler(EulerOrder p_order) const { Vector3 euler; real_t sz = rows[0][1]; - if (sz < (1.0f - (real_t)CMP_EPSILON)) { - if (sz > -(1.0f - (real_t)CMP_EPSILON)) { + if (sz < (1.0f - epsilon)) { + if (sz > -(1.0f - epsilon)) { euler.x = Math::atan2(rows[2][1], rows[1][1]); euler.y = Math::atan2(rows[0][2], rows[0][0]); euler.z = Math::asin(-sz); @@ -518,7 +529,7 @@ Vector3 Basis::get_euler(EulerOrder p_order) const { } return euler; } - case EULER_ORDER_YXZ: { + case EulerOrder::EULER_ORDER_YXZ: { // Euler angles in YXZ convention. // See https://en.wikipedia.org/wiki/Euler_angles#Rotation_matrix // @@ -530,8 +541,8 @@ Vector3 Basis::get_euler(EulerOrder p_order) const { real_t m12 = rows[1][2]; - if (m12 < (1 - (real_t)CMP_EPSILON)) { - if (m12 > -(1 - (real_t)CMP_EPSILON)) { + if (m12 < (1 - epsilon)) { + if (m12 > -(1 - epsilon)) { // is this a pure X rotation? if (rows[1][0] == 0 && rows[0][1] == 0 && rows[0][2] == 0 && rows[2][0] == 0 && rows[0][0] == 1) { // return the simplest form (human friendlier in editor and scripts) @@ -556,7 +567,7 @@ Vector3 Basis::get_euler(EulerOrder p_order) const { return euler; } - case EULER_ORDER_YZX: { + case EulerOrder::EULER_ORDER_YZX: { // Euler angles in YZX convention. // See https://en.wikipedia.org/wiki/Euler_angles#Rotation_matrix // @@ -566,8 +577,8 @@ Vector3 Basis::get_euler(EulerOrder p_order) const { Vector3 euler; real_t sz = rows[1][0]; - if (sz < (1.0f - (real_t)CMP_EPSILON)) { - if (sz > -(1.0f - (real_t)CMP_EPSILON)) { + if (sz < (1.0f - epsilon)) { + if (sz > -(1.0f - epsilon)) { euler.x = Math::atan2(-rows[1][2], rows[1][1]); euler.y = Math::atan2(-rows[2][0], rows[0][0]); euler.z = Math::asin(sz); @@ -584,8 +595,8 @@ Vector3 Basis::get_euler(EulerOrder p_order) const { euler.z = Math_PI / 2.0f; } return euler; - } - case EULER_ORDER_ZXY: { + } break; + case EulerOrder::EULER_ORDER_ZXY: { // Euler angles in ZXY convention. // See https://en.wikipedia.org/wiki/Euler_angles#Rotation_matrix // @@ -594,8 +605,8 @@ Vector3 Basis::get_euler(EulerOrder p_order) const { // -cx*sy sx cx*cy Vector3 euler; real_t sx = rows[2][1]; - if (sx < (1.0f - (real_t)CMP_EPSILON)) { - if (sx > -(1.0f - (real_t)CMP_EPSILON)) { + if (sx < (1.0f - epsilon)) { + if (sx > -(1.0f - epsilon)) { euler.x = Math::asin(sx); euler.y = Math::atan2(-rows[2][0], rows[2][2]); euler.z = Math::atan2(-rows[0][1], rows[1][1]); @@ -612,8 +623,8 @@ Vector3 Basis::get_euler(EulerOrder p_order) const { euler.z = 0; } return euler; - } - case EULER_ORDER_ZYX: { + } break; + case EulerOrder::EULER_ORDER_ZYX: { // Euler angles in ZYX convention. // See https://en.wikipedia.org/wiki/Euler_angles#Rotation_matrix // @@ -622,8 +633,8 @@ Vector3 Basis::get_euler(EulerOrder p_order) const { // -sy cy*sx cy*cx Vector3 euler; real_t sy = rows[2][0]; - if (sy < (1.0f - (real_t)CMP_EPSILON)) { - if (sy > -(1.0f - (real_t)CMP_EPSILON)) { + if (sy < (1.0f - epsilon)) { + if (sy > -(1.0f - epsilon)) { euler.x = Math::atan2(rows[2][1], rows[2][2]); euler.y = Math::asin(-sy); euler.z = Math::atan2(rows[1][0], rows[0][0]); @@ -664,26 +675,26 @@ void Basis::set_euler(const Vector3 &p_euler, EulerOrder p_order) { Basis zmat(c, -s, 0, s, c, 0, 0, 0, 1); switch (p_order) { - case EULER_ORDER_XYZ: { + case EulerOrder::EULER_ORDER_XYZ: { *this = xmat * (ymat * zmat); } break; - case EULER_ORDER_XZY: { + case EulerOrder::EULER_ORDER_XZY: { *this = xmat * zmat * ymat; } break; - case EULER_ORDER_YXZ: { + case EulerOrder::EULER_ORDER_YXZ: { *this = ymat * xmat * zmat; } break; - case EULER_ORDER_YZX: { + case EulerOrder::EULER_ORDER_YZX: { *this = ymat * zmat * xmat; } break; - case EULER_ORDER_ZXY: { + case EulerOrder::EULER_ORDER_ZXY: { *this = zmat * xmat * ymat; } break; - case EULER_ORDER_ZYX: { + case EulerOrder::EULER_ORDER_ZYX: { *this = zmat * ymat * xmat; } break; default: { - ERR_FAIL_MSG("Invalid order parameter for set_euler(vec3,order)"); + ERR_FAIL_MSG("Invalid Euler order parameter."); } } } @@ -720,7 +731,7 @@ Basis::operator String() const { Quaternion Basis::get_quaternion() const { #ifdef MATH_CHECKS - ERR_FAIL_COND_V_MSG(!is_rotation(), Quaternion(), "Basis must be normalized in order to be casted to a Quaternion. Use get_rotation_quaternion() or call orthonormalized() if the Basis contains linearly independent vectors."); + ERR_FAIL_COND_V_MSG(!is_rotation(), Quaternion(), "Basis " + operator String() + " must be normalized in order to be casted to a Quaternion. Use get_rotation_quaternion() or call orthonormalized() if the Basis contains linearly independent vectors."); #endif /* Allow getting a quaternion from an unnormalized transform */ Basis m = *this; @@ -828,8 +839,8 @@ void Basis::get_axis_angle(Vector3 &r_axis, real_t &r_angle) const { z = (rows[1][0] - rows[0][1]) / s; r_axis = Vector3(x, y, z); - // CLAMP to avoid NaN if the value passed to acos is not in [0,1]. - r_angle = Math::acos(CLAMP((rows[0][0] + rows[1][1] + rows[2][2] - 1) / 2, (real_t)0.0, (real_t)1.0)); + // acos does clamping. + r_angle = Math::acos((rows[0][0] + rows[1][1] + rows[2][2] - 1) / 2); } void Basis::set_quaternion(const Quaternion &p_quaternion) { @@ -847,7 +858,7 @@ void Basis::set_quaternion(const Quaternion &p_quaternion) { void Basis::set_axis_angle(const Vector3 &p_axis, real_t p_angle) { // Rotation matrix from axis and angle, see https://en.wikipedia.org/wiki/Rotation_matrix#Rotation_matrix_from_axis_angle #ifdef MATH_CHECKS - ERR_FAIL_COND_MSG(!p_axis.is_normalized(), "The axis Vector3 must be normalized."); + ERR_FAIL_COND_MSG(!p_axis.is_normalized(), "The axis Vector3 " + p_axis.operator String() + " must be normalized."); #endif Vector3 axis_sq(p_axis.x * p_axis.x, p_axis.y * p_axis.y, p_axis.z * p_axis.z); real_t cosine = Math::cos(p_angle); @@ -905,7 +916,7 @@ void Basis::_set_diagonal(const Vector3 &p_diag) { rows[2][2] = p_diag.z; } -Basis Basis::lerp(const Basis &p_to, const real_t &p_weight) const { +Basis Basis::lerp(const Basis &p_to, real_t p_weight) const { Basis b; b.rows[0] = rows[0].lerp(p_to.rows[0], p_weight); b.rows[1] = rows[1].lerp(p_to.rows[1], p_weight); @@ -914,7 +925,7 @@ Basis Basis::lerp(const Basis &p_to, const real_t &p_weight) const { return b; } -Basis Basis::slerp(const Basis &p_to, const real_t &p_weight) const { +Basis Basis::slerp(const Basis &p_to, real_t p_weight) const { //consider scale Quaternion from(*this); Quaternion to(p_to); @@ -1047,9 +1058,10 @@ Basis Basis::looking_at(const Vector3 &p_target, const Vector3 &p_up, bool p_use v_z = -v_z; } Vector3 v_x = p_up.cross(v_z); -#ifdef MATH_CHECKS - ERR_FAIL_COND_V_MSG(v_x.is_zero_approx(), Basis(), "The target vector and up vector can't be parallel to each other."); -#endif + if (v_x.is_zero_approx()) { + WARN_PRINT("Target and up vectors are colinear. This is not advised as it may cause unwanted rotation around local Z axis."); + v_x = p_up.get_any_perpendicular(); // Vectors are almost parallel. + } v_x.normalize(); Vector3 v_y = v_z.cross(v_x); diff --git a/src/variant/color.cpp b/src/variant/color.cpp index 4e3b870e2..1fb5211a5 100644 --- a/src/variant/color.cpp +++ b/src/variant/color.cpp @@ -29,6 +29,7 @@ /**************************************************************************/ #include +#include #include #include #include @@ -131,20 +132,20 @@ String _to_hex(float p_val) { String Color::to_html(bool p_alpha) const { String txt; - txt = txt + _to_hex(r); - txt = txt + _to_hex(g); - txt = txt + _to_hex(b); + txt += _to_hex(r); + txt += _to_hex(g); + txt += _to_hex(b); if (p_alpha) { - txt = txt + _to_hex(a); + txt += _to_hex(a); } return txt; } float Color::get_h() const { - float min = Math::min(r, g); - min = Math::min(min, b); - float max = Math::max(r, g); - max = Math::max(max, b); + float min = MIN(r, g); + min = MIN(min, b); + float max = MAX(r, g); + max = MAX(max, b); float delta = max - min; @@ -170,10 +171,10 @@ float Color::get_h() const { } float Color::get_s() const { - float min = Math::min(r, g); - min = Math::min(min, b); - float max = Math::max(r, g); - max = Math::max(max, b); + float min = MIN(r, g); + min = MIN(min, b); + float max = MAX(r, g); + max = MAX(max, b); float delta = max - min; @@ -181,8 +182,8 @@ float Color::get_s() const { } float Color::get_v() const { - float max = Math::max(r, g); - max = Math::max(max, b); + float max = MAX(r, g); + max = MAX(max, b); return max; } @@ -385,7 +386,6 @@ Color Color::named(const String &p_name) { int idx = find_named_color(p_name); if (idx == -1) { ERR_FAIL_V_MSG(Color(), "Invalid color name: " + p_name + "."); - return Color(); } return named_colors[idx].color; } @@ -400,7 +400,7 @@ Color Color::named(const String &p_name, const Color &p_default) { int Color::find_named_color(const String &p_name) { String name = p_name; - // Normalize name + // Normalize name. name = name.replace(" ", ""); name = name.replace("-", ""); name = name.replace("_", ""); @@ -408,23 +408,24 @@ int Color::find_named_color(const String &p_name) { name = name.replace(".", ""); name = name.to_upper(); - int idx = 0; - while (named_colors[idx].name != nullptr) { - if (name == String(named_colors[idx].name).replace("_", "")) { - return idx; + static HashMap named_colors_hashmap; + if (unlikely(named_colors_hashmap.is_empty())) { + const int named_color_count = get_named_color_count(); + for (int i = 0; i < named_color_count; i++) { + named_colors_hashmap[String(named_colors[i].name).replace("_", "")] = i; } - idx++; + } + + const HashMap::ConstIterator E = named_colors_hashmap.find(name); + if (E) { + return E->value; } return -1; } int Color::get_named_color_count() { - int idx = 0; - while (named_colors[idx].name != nullptr) { - idx++; - } - return idx; + return sizeof(named_colors) / sizeof(NamedColor); } String Color::get_named_color_name(int p_idx) { @@ -467,6 +468,10 @@ Color Color::from_rgbe9995(uint32_t p_rgbe) { return Color(rd, gd, bd, 1.0f); } +Color Color::from_rgba8(int64_t p_r8, int64_t p_g8, int64_t p_b8, int64_t p_a8) { + return Color(p_r8 / 255.0f, p_g8 / 255.0f, p_b8 / 255.0f, p_a8 / 255.0f); +} + Color::operator String() const { return "(" + String::num(r, 4) + ", " + String::num(g, 4) + ", " + String::num(b, 4) + ", " + String::num(a, 4) + ")"; } diff --git a/src/variant/packed_arrays.cpp b/src/variant/packed_arrays.cpp index 8fe8a7338..4206b886d 100644 --- a/src/variant/packed_arrays.cpp +++ b/src/variant/packed_arrays.cpp @@ -236,6 +236,14 @@ void Array::_ref(const Array &p_from) const { internal::gdextension_interface_array_ref((GDExtensionTypePtr *)this, (GDExtensionConstTypePtr *)&p_from); } +const Variant *Array::ptr() const { + return (const Variant *)internal::gdextension_interface_array_operator_index_const((GDExtensionTypePtr *)this, 0); +} + +Variant *Array::ptrw() { + return (Variant *)internal::gdextension_interface_array_operator_index((GDExtensionTypePtr *)this, 0); +} + const Variant &Dictionary::operator[](const Variant &p_key) const { const Variant *var = (const Variant *)internal::gdextension_interface_dictionary_operator_index_const((GDExtensionTypePtr *)this, (GDExtensionVariantPtr)&p_key); return *var; diff --git a/src/variant/plane.cpp b/src/variant/plane.cpp index caea516e1..05aadcaa9 100644 --- a/src/variant/plane.cpp +++ b/src/variant/plane.cpp @@ -60,7 +60,7 @@ Vector3 Plane::get_any_perpendicular_normal() const { static const Vector3 p2 = Vector3(0, 1, 0); Vector3 p; - if (Math::abs(normal.dot(p1)) > 0.99f) { // if too similar to p1 + if (ABS(normal.dot(p1)) > 0.99f) { // if too similar to p1 p = p2; // use p2 } else { p = p1; // use p1 @@ -100,13 +100,11 @@ bool Plane::intersects_ray(const Vector3 &p_from, const Vector3 &p_dir, Vector3 Vector3 segment = p_dir; real_t den = normal.dot(segment); - //printf("den is %i\n",den); if (Math::is_zero_approx(den)) { return false; } real_t dist = (normal.dot(p_from) - d) / den; - //printf("dist is %i\n",dist); if (dist > (real_t)CMP_EPSILON) { //this is a ray, before the emitting pos (p_from) doesn't exist @@ -123,13 +121,11 @@ bool Plane::intersects_segment(const Vector3 &p_begin, const Vector3 &p_end, Vec Vector3 segment = p_begin - p_end; real_t den = normal.dot(segment); - //printf("den is %i\n",den); if (Math::is_zero_approx(den)) { return false; } real_t dist = (normal.dot(p_begin) - d) / den; - //printf("dist is %i\n",dist); if (dist < (real_t)-CMP_EPSILON || dist > (1.0f + (real_t)CMP_EPSILON)) { return false; diff --git a/src/variant/projection.cpp b/src/variant/projection.cpp index ddedc93f9..d8e35d441 100644 --- a/src/variant/projection.cpp +++ b/src/variant/projection.cpp @@ -39,7 +39,7 @@ namespace godot { -float Projection::determinant() const { +real_t Projection::determinant() const { return columns[0][3] * columns[1][2] * columns[2][1] * columns[3][0] - columns[0][2] * columns[1][3] * columns[2][1] * columns[3][0] - columns[0][3] * columns[1][1] * columns[2][2] * columns[3][0] + columns[0][1] * columns[1][3] * columns[2][2] * columns[3][0] + columns[0][2] * columns[1][1] * columns[2][3] * columns[3][0] - columns[0][1] * columns[1][2] * columns[2][3] * columns[3][0] - @@ -171,7 +171,7 @@ Projection Projection::perspective_znear_adjusted(real_t p_new_znear) const { } Plane Projection::get_projection_plane(Planes p_plane) const { - const real_t *matrix = (const real_t *)this->columns; + const real_t *matrix = (const real_t *)columns; switch (p_plane) { case PLANE_NEAR: { @@ -404,20 +404,19 @@ void Projection::set_frustum(real_t p_size, real_t p_aspect, Vector2 p_offset, r } real_t Projection::get_z_far() const { - const real_t *matrix = (const real_t *)this->columns; + const real_t *matrix = (const real_t *)columns; Plane new_plane = Plane(matrix[3] - matrix[2], matrix[7] - matrix[6], matrix[11] - matrix[10], matrix[15] - matrix[14]); - new_plane.normal = -new_plane.normal; new_plane.normalize(); return new_plane.d; } real_t Projection::get_z_near() const { - const real_t *matrix = (const real_t *)this->columns; + const real_t *matrix = (const real_t *)columns; Plane new_plane = Plane(matrix[3] + matrix[2], matrix[7] + matrix[6], matrix[11] + matrix[10], @@ -428,7 +427,7 @@ real_t Projection::get_z_near() const { } Vector2 Projection::get_viewport_half_extents() const { - const real_t *matrix = (const real_t *)this->columns; + const real_t *matrix = (const real_t *)columns; ///////--- Near Plane ---/////// Plane near_plane = Plane(matrix[3] + matrix[2], matrix[7] + matrix[6], @@ -456,7 +455,7 @@ Vector2 Projection::get_viewport_half_extents() const { } Vector2 Projection::get_far_plane_half_extents() const { - const real_t *matrix = (const real_t *)this->columns; + const real_t *matrix = (const real_t *)columns; ///////--- Far Plane ---/////// Plane far_plane = Plane(matrix[3] - matrix[2], matrix[7] - matrix[6], @@ -484,7 +483,7 @@ Vector2 Projection::get_far_plane_half_extents() const { } bool Projection::get_endpoints(const Transform3D &p_transform, Vector3 *p_8points) const { - Array planes = get_projection_planes(Transform3D()); + Vector planes = get_projection_planes(Transform3D()); const Planes intersections[8][3] = { { PLANE_FAR, PLANE_LEFT, PLANE_TOP }, { PLANE_FAR, PLANE_LEFT, PLANE_BOTTOM }, @@ -509,17 +508,17 @@ bool Projection::get_endpoints(const Transform3D &p_transform, Vector3 *p_8point return true; } -Array Projection::get_projection_planes(const Transform3D &p_transform) const { +Vector Projection::get_projection_planes(const Transform3D &p_transform) const { /** Fast Plane Extraction from combined modelview/projection matrices. * References: * https://web.archive.org/web/20011221205252/https://www.markmorley.com/opengl/frustumculling.html * https://web.archive.org/web/20061020020112/https://www2.ravensoft.com/users/ggribb/plane%20extraction.pdf */ - Array planes; + Vector planes; planes.resize(6); - const real_t *matrix = (const real_t *)this->columns; + const real_t *matrix = (const real_t *)columns; Plane new_plane; @@ -532,7 +531,7 @@ Array Projection::get_projection_planes(const Transform3D &p_transform) const { new_plane.normal = -new_plane.normal; new_plane.normalize(); - planes[0] = p_transform.xform(new_plane); + planes.write[0] = p_transform.xform(new_plane); ///////--- Far Plane ---/////// new_plane = Plane(matrix[3] - matrix[2], @@ -543,7 +542,7 @@ Array Projection::get_projection_planes(const Transform3D &p_transform) const { new_plane.normal = -new_plane.normal; new_plane.normalize(); - planes[1] = p_transform.xform(new_plane); + planes.write[1] = p_transform.xform(new_plane); ///////--- Left Plane ---/////// new_plane = Plane(matrix[3] + matrix[0], @@ -554,7 +553,7 @@ Array Projection::get_projection_planes(const Transform3D &p_transform) const { new_plane.normal = -new_plane.normal; new_plane.normalize(); - planes[2] = p_transform.xform(new_plane); + planes.write[2] = p_transform.xform(new_plane); ///////--- Top Plane ---/////// new_plane = Plane(matrix[3] - matrix[1], @@ -565,7 +564,7 @@ Array Projection::get_projection_planes(const Transform3D &p_transform) const { new_plane.normal = -new_plane.normal; new_plane.normalize(); - planes[3] = p_transform.xform(new_plane); + planes.write[3] = p_transform.xform(new_plane); ///////--- Right Plane ---/////// new_plane = Plane(matrix[3] - matrix[0], @@ -576,7 +575,7 @@ Array Projection::get_projection_planes(const Transform3D &p_transform) const { new_plane.normal = -new_plane.normal; new_plane.normalize(); - planes[4] = p_transform.xform(new_plane); + planes.write[4] = p_transform.xform(new_plane); ///////--- Bottom Plane ---/////// new_plane = Plane(matrix[3] + matrix[1], @@ -587,7 +586,7 @@ Array Projection::get_projection_planes(const Transform3D &p_transform) const { new_plane.normal = -new_plane.normal; new_plane.normalize(); - planes[5] = p_transform.xform(new_plane); + planes.write[5] = p_transform.xform(new_plane); return planes; } @@ -599,101 +598,229 @@ Projection Projection::inverse() const { } void Projection::invert() { - int i, j, k; - int pvt_i[4], pvt_j[4]; /* Locations of pivot matrix */ - real_t pvt_val; /* Value of current pivot element */ - real_t hold; /* Temporary storage */ - real_t determinant = 1.0f; - for (k = 0; k < 4; k++) { - /** Locate k'th pivot element **/ - pvt_val = columns[k][k]; /** Initialize for search **/ - pvt_i[k] = k; - pvt_j[k] = k; - for (i = k; i < 4; i++) { - for (j = k; j < 4; j++) { - if (Math::abs(columns[i][j]) > Math::abs(pvt_val)) { - pvt_i[k] = i; - pvt_j[k] = j; - pvt_val = columns[i][j]; - } - } - } - - /** Product of pivots, gives determinant when finished **/ - determinant *= pvt_val; - if (Math::is_zero_approx(determinant)) { - return; /** Matrix is singular (zero determinant). **/ - } - - /** "Interchange" rows (with sign change stuff) **/ - i = pvt_i[k]; - if (i != k) { /** If rows are different **/ - for (j = 0; j < 4; j++) { - hold = -columns[k][j]; - columns[k][j] = columns[i][j]; - columns[i][j] = hold; - } - } - - /** "Interchange" columns **/ - j = pvt_j[k]; - if (j != k) { /** If columns are different **/ - for (i = 0; i < 4; i++) { - hold = -columns[i][k]; - columns[i][k] = columns[i][j]; - columns[i][j] = hold; - } - } - - /** Divide column by minus pivot value **/ - for (i = 0; i < 4; i++) { - if (i != k) { - columns[i][k] /= (-pvt_val); - } - } - - /** Reduce the matrix **/ - for (i = 0; i < 4; i++) { - hold = columns[i][k]; - for (j = 0; j < 4; j++) { - if (i != k && j != k) { - columns[i][j] += hold * columns[k][j]; - } - } - } - - /** Divide row by pivot **/ - for (j = 0; j < 4; j++) { - if (j != k) { - columns[k][j] /= pvt_val; - } - } - - /** Replace pivot by reciprocal (at last we can touch it). **/ - columns[k][k] = 1.0 / pvt_val; + // Adapted from Mesa's `src/util/u_math.c` `util_invert_mat4x4`. + // MIT licensed. Copyright 2008 VMware, Inc. Authored by Jacques Leroy. + Projection temp; + real_t *out = (real_t *)temp.columns; + real_t *m = (real_t *)columns; + + real_t wtmp[4][8]; + real_t m0, m1, m2, m3, s; + real_t *r0, *r1, *r2, *r3; + +#define MAT(m, r, c) (m)[(c) * 4 + (r)] + + r0 = wtmp[0]; + r1 = wtmp[1]; + r2 = wtmp[2]; + r3 = wtmp[3]; + + r0[0] = MAT(m, 0, 0); + r0[1] = MAT(m, 0, 1); + r0[2] = MAT(m, 0, 2); + r0[3] = MAT(m, 0, 3); + r0[4] = 1.0; + r0[5] = 0.0; + r0[6] = 0.0; + r0[7] = 0.0; + + r1[0] = MAT(m, 1, 0); + r1[1] = MAT(m, 1, 1); + r1[2] = MAT(m, 1, 2); + r1[3] = MAT(m, 1, 3); + r1[5] = 1.0; + r1[4] = 0.0; + r1[6] = 0.0; + r1[7] = 0.0; + + r2[0] = MAT(m, 2, 0); + r2[1] = MAT(m, 2, 1); + r2[2] = MAT(m, 2, 2); + r2[3] = MAT(m, 2, 3); + r2[6] = 1.0; + r2[4] = 0.0; + r2[5] = 0.0; + r2[7] = 0.0; + + r3[0] = MAT(m, 3, 0); + r3[1] = MAT(m, 3, 1); + r3[2] = MAT(m, 3, 2); + r3[3] = MAT(m, 3, 3); + + r3[7] = 1.0; + r3[4] = 0.0; + r3[5] = 0.0; + r3[6] = 0.0; + + /* choose pivot - or die */ + if (Math::abs(r3[0]) > Math::abs(r2[0])) { + SWAP(r3, r2); + } + if (Math::abs(r2[0]) > Math::abs(r1[0])) { + SWAP(r2, r1); + } + if (Math::abs(r1[0]) > Math::abs(r0[0])) { + SWAP(r1, r0); + } + ERR_FAIL_COND(0.0 == r0[0]); + + /* eliminate first variable */ + m1 = r1[0] / r0[0]; + m2 = r2[0] / r0[0]; + m3 = r3[0] / r0[0]; + s = r0[1]; + r1[1] -= m1 * s; + r2[1] -= m2 * s; + r3[1] -= m3 * s; + s = r0[2]; + r1[2] -= m1 * s; + r2[2] -= m2 * s; + r3[2] -= m3 * s; + s = r0[3]; + r1[3] -= m1 * s; + r2[3] -= m2 * s; + r3[3] -= m3 * s; + s = r0[4]; + if (s != 0.0) { + r1[4] -= m1 * s; + r2[4] -= m2 * s; + r3[4] -= m3 * s; + } + s = r0[5]; + if (s != 0.0) { + r1[5] -= m1 * s; + r2[5] -= m2 * s; + r3[5] -= m3 * s; + } + s = r0[6]; + if (s != 0.0) { + r1[6] -= m1 * s; + r2[6] -= m2 * s; + r3[6] -= m3 * s; + } + s = r0[7]; + if (s != 0.0) { + r1[7] -= m1 * s; + r2[7] -= m2 * s; + r3[7] -= m3 * s; } - /* That was most of the work, one final pass of row/column interchange */ - /* to finish */ - for (k = 4 - 2; k >= 0; k--) { /* Don't need to work with 1 by 1 corner*/ - i = pvt_j[k]; /* Rows to swap correspond to pivot COLUMN */ - if (i != k) { /* If rows are different */ - for (j = 0; j < 4; j++) { - hold = columns[k][j]; - columns[k][j] = -columns[i][j]; - columns[i][j] = hold; - } - } + /* choose pivot - or die */ + if (Math::abs(r3[1]) > Math::abs(r2[1])) { + SWAP(r3, r2); + } + if (Math::abs(r2[1]) > Math::abs(r1[1])) { + SWAP(r2, r1); + } + ERR_FAIL_COND(0.0 == r1[1]); + + /* eliminate second variable */ + m2 = r2[1] / r1[1]; + m3 = r3[1] / r1[1]; + r2[2] -= m2 * r1[2]; + r3[2] -= m3 * r1[2]; + r2[3] -= m2 * r1[3]; + r3[3] -= m3 * r1[3]; + s = r1[4]; + if (0.0 != s) { + r2[4] -= m2 * s; + r3[4] -= m3 * s; + } + s = r1[5]; + if (0.0 != s) { + r2[5] -= m2 * s; + r3[5] -= m3 * s; + } + s = r1[6]; + if (0.0 != s) { + r2[6] -= m2 * s; + r3[6] -= m3 * s; + } + s = r1[7]; + if (0.0 != s) { + r2[7] -= m2 * s; + r3[7] -= m3 * s; + } - j = pvt_i[k]; /* Columns to swap correspond to pivot ROW */ - if (j != k) { /* If columns are different */ - for (i = 0; i < 4; i++) { - hold = columns[i][k]; - columns[i][k] = -columns[i][j]; - columns[i][j] = hold; - } - } + /* choose pivot - or die */ + if (Math::abs(r3[2]) > Math::abs(r2[2])) { + SWAP(r3, r2); } + ERR_FAIL_COND(0.0 == r2[2]); + + /* eliminate third variable */ + m3 = r3[2] / r2[2]; + r3[3] -= m3 * r2[3]; + r3[4] -= m3 * r2[4]; + r3[5] -= m3 * r2[5]; + r3[6] -= m3 * r2[6]; + r3[7] -= m3 * r2[7]; + + /* last check */ + ERR_FAIL_COND(0.0 == r3[3]); + + s = 1.0 / r3[3]; /* now back substitute row 3 */ + r3[4] *= s; + r3[5] *= s; + r3[6] *= s; + r3[7] *= s; + + m2 = r2[3]; /* now back substitute row 2 */ + s = 1.0 / r2[2]; + r2[4] = s * (r2[4] - r3[4] * m2); + r2[5] = s * (r2[5] - r3[5] * m2); + r2[6] = s * (r2[6] - r3[6] * m2); + r2[7] = s * (r2[7] - r3[7] * m2); + m1 = r1[3]; + r1[4] -= r3[4] * m1; + r1[5] -= r3[5] * m1; + r1[6] -= r3[6] * m1; + r1[7] -= r3[7] * m1; + m0 = r0[3]; + r0[4] -= r3[4] * m0; + r0[5] -= r3[5] * m0; + r0[6] -= r3[6] * m0; + r0[7] -= r3[7] * m0; + + m1 = r1[2]; /* now back substitute row 1 */ + s = 1.0 / r1[1]; + r1[4] = s * (r1[4] - r2[4] * m1); + r1[5] = s * (r1[5] - r2[5] * m1), + r1[6] = s * (r1[6] - r2[6] * m1); + r1[7] = s * (r1[7] - r2[7] * m1); + m0 = r0[2]; + r0[4] -= r2[4] * m0; + r0[5] -= r2[5] * m0; + r0[6] -= r2[6] * m0; + r0[7] -= r2[7] * m0; + + m0 = r0[1]; /* now back substitute row 0 */ + s = 1.0 / r0[0]; + r0[4] = s * (r0[4] - r1[4] * m0); + r0[5] = s * (r0[5] - r1[5] * m0), + r0[6] = s * (r0[6] - r1[6] * m0); + r0[7] = s * (r0[7] - r1[7] * m0); + + MAT(out, 0, 0) = r0[4]; + MAT(out, 0, 1) = r0[5]; + MAT(out, 0, 2) = r0[6]; + MAT(out, 0, 3) = r0[7]; + MAT(out, 1, 0) = r1[4]; + MAT(out, 1, 1) = r1[5]; + MAT(out, 1, 2) = r1[6]; + MAT(out, 1, 3) = r1[7]; + MAT(out, 2, 0) = r2[4]; + MAT(out, 2, 1) = r2[5]; + MAT(out, 2, 2) = r2[6]; + MAT(out, 2, 3) = r2[7]; + MAT(out, 3, 0) = r3[4]; + MAT(out, 3, 1) = r3[5]; + MAT(out, 3, 2) = r3[6]; + MAT(out, 3, 3) = r3[7]; + +#undef MAT + + *this = temp; } void Projection::flip_y() { @@ -722,7 +849,8 @@ Projection Projection::operator*(const Projection &p_matrix) const { return new_matrix; } -void Projection::set_depth_correction(bool p_flip_y) { +void Projection::set_depth_correction(bool p_flip_y, bool p_reverse_z, bool p_remap_z) { + // p_remap_z is used to convert from OpenGL-style clip space (-1 - 1) to Vulkan style (0 - 1). real_t *m = &columns[0][0]; m[0] = 1; @@ -735,11 +863,11 @@ void Projection::set_depth_correction(bool p_flip_y) { m[7] = 0.0; m[8] = 0.0; m[9] = 0.0; - m[10] = 0.5; + m[10] = p_remap_z ? (p_reverse_z ? -0.5 : 0.5) : (p_reverse_z ? -1.0 : 1.0); m[11] = 0.0; m[12] = 0.0; m[13] = 0.0; - m[14] = 0.5; + m[14] = p_remap_z ? 0.5 : 0.0; m[15] = 1.0; } @@ -786,14 +914,10 @@ void Projection::set_light_atlas_rect(const Rect2 &p_rect) { } Projection::operator String() const { - String str; - for (int i = 0; i < 4; i++) { - for (int j = 0; j < 4; j++) { - str = str + String((j > 0) ? ", " : "\n") + rtos(columns[i][j]); - } - } - - return str; + return "[X: " + columns[0].operator String() + + ", Y: " + columns[1].operator String() + + ", Z: " + columns[2].operator String() + + ", W: " + columns[3].operator String() + "]"; } real_t Projection::get_aspect() const { @@ -812,7 +936,7 @@ bool Projection::is_orthogonal() const { } real_t Projection::get_fov() const { - const real_t *matrix = (const real_t *)this->columns; + const real_t *matrix = (const real_t *)columns; Plane right_plane = Plane(matrix[3] - matrix[0], matrix[7] - matrix[4], @@ -834,13 +958,13 @@ real_t Projection::get_fov() const { } } -float Projection::get_lod_multiplier() const { +real_t Projection::get_lod_multiplier() const { if (is_orthogonal()) { return get_viewport_half_extents().x; } else { - float zn = get_z_near(); - float width = get_viewport_half_extents().x * 2.0; - return 1.0 / (zn / width); + const real_t zn = get_z_near(); + const real_t width = get_viewport_half_extents().x * 2.0f; + return 1.0f / (zn / width); } // Usage is lod_size / (lod_distance * multiplier) < threshold @@ -913,6 +1037,13 @@ Projection::Projection(const Vector4 &p_x, const Vector4 &p_y, const Vector4 &p_ columns[3] = p_w; } +Projection::Projection(real_t p_xx, real_t p_xy, real_t p_xz, real_t p_xw, real_t p_yx, real_t p_yy, real_t p_yz, real_t p_yw, real_t p_zx, real_t p_zy, real_t p_zz, real_t p_zw, real_t p_wx, real_t p_wy, real_t p_wz, real_t p_ww) { + columns[0] = Vector4(p_xx, p_xy, p_xz, p_xw); + columns[1] = Vector4(p_yx, p_yy, p_yz, p_yw); + columns[2] = Vector4(p_zx, p_zy, p_zz, p_zw); + columns[3] = Vector4(p_wx, p_wy, p_wz, p_ww); +} + Projection::Projection(const Transform3D &p_transform) { const Transform3D &tr = p_transform; real_t *m = &columns[0][0]; diff --git a/src/variant/quaternion.cpp b/src/variant/quaternion.cpp index 3dd7af54a..af75cf450 100644 --- a/src/variant/quaternion.cpp +++ b/src/variant/quaternion.cpp @@ -194,11 +194,11 @@ Quaternion Quaternion::spherical_cubic_interpolate(const Quaternion &p_b, const post_q = Basis(post_q).get_rotation_quaternion(); // Flip quaternions to shortest path if necessary. - bool flip1 = Math::sign(from_q.dot(pre_q)); + bool flip1 = std::signbit(from_q.dot(pre_q)); pre_q = flip1 ? -pre_q : pre_q; - bool flip2 = Math::sign(from_q.dot(to_q)); + bool flip2 = std::signbit(from_q.dot(to_q)); to_q = flip2 ? -to_q : to_q; - bool flip3 = flip2 ? to_q.dot(post_q) <= 0 : Math::sign(to_q.dot(post_q)); + bool flip3 = flip2 ? to_q.dot(post_q) <= 0 : std::signbit(to_q.dot(post_q)); post_q = flip3 ? -post_q : post_q; // Calc by Expmap in from_q space. @@ -245,11 +245,11 @@ Quaternion Quaternion::spherical_cubic_interpolate_in_time(const Quaternion &p_b post_q = Basis(post_q).get_rotation_quaternion(); // Flip quaternions to shortest path if necessary. - bool flip1 = Math::sign(from_q.dot(pre_q)); + bool flip1 = std::signbit(from_q.dot(pre_q)); pre_q = flip1 ? -pre_q : pre_q; - bool flip2 = Math::sign(from_q.dot(to_q)); + bool flip2 = std::signbit(from_q.dot(to_q)); to_q = flip2 ? -to_q : to_q; - bool flip3 = flip2 ? to_q.dot(post_q) <= 0 : Math::sign(to_q.dot(post_q)); + bool flip3 = flip2 ? to_q.dot(post_q) <= 0 : std::signbit(to_q.dot(post_q)); post_q = flip3 ? -post_q : post_q; // Calc by Expmap in from_q space. diff --git a/src/variant/rect2.cpp b/src/variant/rect2.cpp index 62730a9d4..7192a7111 100644 --- a/src/variant/rect2.cpp +++ b/src/variant/rect2.cpp @@ -211,31 +211,31 @@ bool Rect2::intersects_transformed(const Transform2D &p_xform, const Rect2 &p_re real_t mina = maxa; real_t dp = p_xform.columns[0].dot(xf_points2[1]); - maxa = Math::max(dp, maxa); - mina = Math::min(dp, mina); + maxa = MAX(dp, maxa); + mina = MIN(dp, mina); dp = p_xform.columns[0].dot(xf_points2[2]); - maxa = Math::max(dp, maxa); - mina = Math::min(dp, mina); + maxa = MAX(dp, maxa); + mina = MIN(dp, mina); dp = p_xform.columns[0].dot(xf_points2[3]); - maxa = Math::max(dp, maxa); - mina = Math::min(dp, mina); + maxa = MAX(dp, maxa); + mina = MIN(dp, mina); real_t maxb = p_xform.columns[0].dot(xf_points[0]); real_t minb = maxb; dp = p_xform.columns[0].dot(xf_points[1]); - maxb = Math::max(dp, maxb); - minb = Math::min(dp, minb); + maxb = MAX(dp, maxb); + minb = MIN(dp, minb); dp = p_xform.columns[0].dot(xf_points[2]); - maxb = Math::max(dp, maxb); - minb = Math::min(dp, minb); + maxb = MAX(dp, maxb); + minb = MIN(dp, minb); dp = p_xform.columns[0].dot(xf_points[3]); - maxb = Math::max(dp, maxb); - minb = Math::min(dp, minb); + maxb = MAX(dp, maxb); + minb = MIN(dp, minb); if (mina > maxb) { return false; @@ -248,31 +248,31 @@ bool Rect2::intersects_transformed(const Transform2D &p_xform, const Rect2 &p_re mina = maxa; dp = p_xform.columns[1].dot(xf_points2[1]); - maxa = Math::max(dp, maxa); - mina = Math::min(dp, mina); + maxa = MAX(dp, maxa); + mina = MIN(dp, mina); dp = p_xform.columns[1].dot(xf_points2[2]); - maxa = Math::max(dp, maxa); - mina = Math::min(dp, mina); + maxa = MAX(dp, maxa); + mina = MIN(dp, mina); dp = p_xform.columns[1].dot(xf_points2[3]); - maxa = Math::max(dp, maxa); - mina = Math::min(dp, mina); + maxa = MAX(dp, maxa); + mina = MIN(dp, mina); maxb = p_xform.columns[1].dot(xf_points[0]); minb = maxb; dp = p_xform.columns[1].dot(xf_points[1]); - maxb = Math::max(dp, maxb); - minb = Math::min(dp, minb); + maxb = MAX(dp, maxb); + minb = MIN(dp, minb); dp = p_xform.columns[1].dot(xf_points[2]); - maxb = Math::max(dp, maxb); - minb = Math::min(dp, minb); + maxb = MAX(dp, maxb); + minb = MIN(dp, minb); dp = p_xform.columns[1].dot(xf_points[3]); - maxb = Math::max(dp, maxb); - minb = Math::min(dp, minb); + maxb = MAX(dp, maxb); + minb = MIN(dp, minb); if (mina > maxb) { return false; @@ -285,7 +285,7 @@ bool Rect2::intersects_transformed(const Transform2D &p_xform, const Rect2 &p_re } Rect2::operator String() const { - return "[P: " + position.operator String() + ", S: " + size + "]"; + return "[P: " + position.operator String() + ", S: " + size.operator String() + "]"; } Rect2::operator Rect2i() const { diff --git a/src/variant/transform2d.cpp b/src/variant/transform2d.cpp index 3b2c0b09e..b6b330bda 100644 --- a/src/variant/transform2d.cpp +++ b/src/variant/transform2d.cpp @@ -48,7 +48,7 @@ Transform2D Transform2D::inverse() const { } void Transform2D::affine_invert() { - real_t det = basis_determinant(); + real_t det = determinant(); #ifdef MATH_CHECKS ERR_FAIL_COND(det == 0); #endif @@ -67,17 +67,17 @@ Transform2D Transform2D::affine_inverse() const { return inv; } -void Transform2D::rotate(const real_t p_angle) { +void Transform2D::rotate(real_t p_angle) { *this = Transform2D(p_angle, Vector2()) * (*this); } real_t Transform2D::get_skew() const { - real_t det = basis_determinant(); + real_t det = determinant(); return Math::acos(columns[0].normalized().dot(SIGN(det) * columns[1].normalized())) - (real_t)Math_PI * 0.5f; } -void Transform2D::set_skew(const real_t p_angle) { - real_t det = basis_determinant(); +void Transform2D::set_skew(real_t p_angle) { + real_t det = determinant(); columns[1] = SIGN(det) * columns[0].rotated(((real_t)Math_PI * 0.5f + p_angle)).normalized() * columns[1].length(); } @@ -85,7 +85,7 @@ real_t Transform2D::get_rotation() const { return Math::atan2(columns[0].y, columns[0].x); } -void Transform2D::set_rotation(const real_t p_rot) { +void Transform2D::set_rotation(real_t p_rot) { Size2 scale = get_scale(); real_t cr = Math::cos(p_rot); real_t sr = Math::sin(p_rot); @@ -96,7 +96,7 @@ void Transform2D::set_rotation(const real_t p_rot) { set_scale(scale); } -Transform2D::Transform2D(const real_t p_rot, const Vector2 &p_pos) { +Transform2D::Transform2D(real_t p_rot, const Vector2 &p_pos) { real_t cr = Math::cos(p_rot); real_t sr = Math::sin(p_rot); columns[0][0] = cr; @@ -106,7 +106,7 @@ Transform2D::Transform2D(const real_t p_rot, const Vector2 &p_pos) { columns[2] = p_pos; } -Transform2D::Transform2D(const real_t p_rot, const Size2 &p_scale, const real_t p_skew, const Vector2 &p_pos) { +Transform2D::Transform2D(real_t p_rot, const Size2 &p_scale, real_t p_skew, const Vector2 &p_pos) { columns[0][0] = Math::cos(p_rot) * p_scale.x; columns[1][1] = Math::cos(p_rot + p_skew) * p_scale.y; columns[1][0] = -Math::sin(p_rot + p_skew) * p_scale.y; @@ -115,7 +115,7 @@ Transform2D::Transform2D(const real_t p_rot, const Size2 &p_scale, const real_t } Size2 Transform2D::get_scale() const { - real_t det_sign = Math::sign(basis_determinant()); + real_t det_sign = SIGN(determinant()); return Size2(columns[0].length(), det_sign * columns[1].length()); } @@ -138,7 +138,7 @@ void Transform2D::scale_basis(const Size2 &p_scale) { columns[1][1] *= p_scale.y; } -void Transform2D::translate_local(const real_t p_tx, const real_t p_ty) { +void Transform2D::translate_local(real_t p_tx, real_t p_ty) { translate_local(Vector2(p_tx, p_ty)); } @@ -153,7 +153,7 @@ void Transform2D::orthonormalize() { Vector2 y = columns[1]; x.normalize(); - y = (y - x * (x.dot(y))); + y = y - x * x.dot(y); y.normalize(); columns[0] = x; @@ -161,9 +161,21 @@ void Transform2D::orthonormalize() { } Transform2D Transform2D::orthonormalized() const { - Transform2D on = *this; - on.orthonormalize(); - return on; + Transform2D ortho = *this; + ortho.orthonormalize(); + return ortho; +} + +bool Transform2D::is_conformal() const { + // Non-flipped case. + if (Math::is_equal_approx(columns[0][0], columns[1][1]) && Math::is_equal_approx(columns[0][1], -columns[1][0])) { + return true; + } + // Flipped case. + if (Math::is_equal_approx(columns[0][0], -columns[1][1]) && Math::is_equal_approx(columns[0][1], columns[1][0])) { + return true; + } + return false; } bool Transform2D::is_equal_approx(const Transform2D &p_transform) const { @@ -223,12 +235,6 @@ Transform2D Transform2D::operator*(const Transform2D &p_transform) const { return t; } -Transform2D Transform2D::basis_scaled(const Size2 &p_scale) const { - Transform2D copy = *this; - copy.scale_basis(p_scale); - return copy; -} - Transform2D Transform2D::scaled(const Size2 &p_scale) const { // Equivalent to left multiplication Transform2D copy = *this; @@ -257,67 +263,52 @@ Transform2D Transform2D::translated_local(const Vector2 &p_offset) const { return Transform2D(columns[0], columns[1], columns[2] + basis_xform(p_offset)); } -Transform2D Transform2D::rotated(const real_t p_angle) const { +Transform2D Transform2D::rotated(real_t p_angle) const { // Equivalent to left multiplication return Transform2D(p_angle, Vector2()) * (*this); } -Transform2D Transform2D::rotated_local(const real_t p_angle) const { +Transform2D Transform2D::rotated_local(real_t p_angle) const { // Equivalent to right multiplication return (*this) * Transform2D(p_angle, Vector2()); // Could be optimized, because origin transform can be skipped. } -real_t Transform2D::basis_determinant() const { +real_t Transform2D::determinant() const { return columns[0].x * columns[1].y - columns[0].y * columns[1].x; } -Transform2D Transform2D::interpolate_with(const Transform2D &p_transform, const real_t p_c) const { - //extract parameters - Vector2 p1 = get_origin(); - Vector2 p2 = p_transform.get_origin(); - - real_t r1 = get_rotation(); - real_t r2 = p_transform.get_rotation(); - - Size2 s1 = get_scale(); - Size2 s2 = p_transform.get_scale(); - - //slerp rotation - Vector2 v1(Math::cos(r1), Math::sin(r1)); - Vector2 v2(Math::cos(r2), Math::sin(r2)); - - real_t dot = v1.dot(v2); - - dot = Math::clamp(dot, (real_t)-1.0, (real_t)1.0); - - Vector2 v; - - if (dot > 0.9995f) { - v = v1.lerp(v2, p_c).normalized(); //linearly interpolate to avoid numerical precision issues - } else { - real_t angle = p_c * Math::acos(dot); - Vector2 v3 = (v2 - v1 * dot).normalized(); - v = v1 * Math::cos(angle) + v3 * Math::sin(angle); - } - - //construct matrix - Transform2D res(v.angle(), p1.lerp(p2, p_c)); - res.scale_basis(s1.lerp(s2, p_c)); - return res; +Transform2D Transform2D::interpolate_with(const Transform2D &p_transform, real_t p_weight) const { + return Transform2D( + Math::lerp_angle(get_rotation(), p_transform.get_rotation(), p_weight), + get_scale().lerp(p_transform.get_scale(), p_weight), + Math::lerp_angle(get_skew(), p_transform.get_skew(), p_weight), + get_origin().lerp(p_transform.get_origin(), p_weight)); } -void Transform2D::operator*=(const real_t p_val) { +void Transform2D::operator*=(real_t p_val) { columns[0] *= p_val; columns[1] *= p_val; columns[2] *= p_val; } -Transform2D Transform2D::operator*(const real_t p_val) const { +Transform2D Transform2D::operator*(real_t p_val) const { Transform2D ret(*this); ret *= p_val; return ret; } +void Transform2D::operator/=(real_t p_val) { + columns[0] /= p_val; + columns[1] /= p_val; + columns[2] /= p_val; +} + +Transform2D Transform2D::operator/(real_t p_val) const { + Transform2D ret(*this); + ret /= p_val; + return ret; +} + Transform2D::operator String() const { return "[X: " + columns[0].operator String() + ", Y: " + columns[1].operator String() + diff --git a/src/variant/transform3d.cpp b/src/variant/transform3d.cpp index d71e91911..765bc62e7 100644 --- a/src/variant/transform3d.cpp +++ b/src/variant/transform3d.cpp @@ -78,20 +78,20 @@ void Transform3D::rotate_basis(const Vector3 &p_axis, real_t p_angle) { basis.rotate(p_axis, p_angle); } -Transform3D Transform3D::looking_at(const Vector3 &p_target, const Vector3 &p_up) const { +Transform3D Transform3D::looking_at(const Vector3 &p_target, const Vector3 &p_up, bool p_use_model_front) const { #ifdef MATH_CHECKS ERR_FAIL_COND_V_MSG(origin.is_equal_approx(p_target), Transform3D(), "The transform's origin and target can't be equal."); #endif Transform3D t = *this; - t.basis = Basis::looking_at(p_target - origin, p_up); + t.basis = Basis::looking_at(p_target - origin, p_up, p_use_model_front); return t; } -void Transform3D::set_look_at(const Vector3 &p_eye, const Vector3 &p_target, const Vector3 &p_up) { +void Transform3D::set_look_at(const Vector3 &p_eye, const Vector3 &p_target, const Vector3 &p_up, bool p_use_model_front) { #ifdef MATH_CHECKS ERR_FAIL_COND_MSG(p_eye.is_equal_approx(p_target), "The eye and target vectors can't be equal."); #endif - basis = Basis::looking_at(p_target - p_eye, p_up); + basis = Basis::looking_at(p_target - p_eye, p_up, p_use_model_front); origin = p_eye; } @@ -198,17 +198,28 @@ Transform3D Transform3D::operator*(const Transform3D &p_transform) const { return t; } -void Transform3D::operator*=(const real_t p_val) { +void Transform3D::operator*=(real_t p_val) { origin *= p_val; basis *= p_val; } -Transform3D Transform3D::operator*(const real_t p_val) const { +Transform3D Transform3D::operator*(real_t p_val) const { Transform3D ret(*this); ret *= p_val; return ret; } +void Transform3D::operator/=(real_t p_val) { + basis /= p_val; + origin /= p_val; +} + +Transform3D Transform3D::operator/(real_t p_val) const { + Transform3D ret(*this); + ret /= p_val; + return ret; +} + Transform3D::operator String() const { return "[X: " + basis.get_column(0).operator String() + ", Y: " + basis.get_column(1).operator String() + @@ -228,9 +239,9 @@ Transform3D::Transform3D(const Vector3 &p_x, const Vector3 &p_y, const Vector3 & basis.set_column(2, p_z); } -Transform3D::Transform3D(real_t xx, real_t xy, real_t xz, real_t yx, real_t yy, real_t yz, real_t zx, real_t zy, real_t zz, real_t ox, real_t oy, real_t oz) { - basis = Basis(xx, xy, xz, yx, yy, yz, zx, zy, zz); - origin = Vector3(ox, oy, oz); +Transform3D::Transform3D(real_t p_xx, real_t p_xy, real_t p_xz, real_t p_yx, real_t p_yy, real_t p_yz, real_t p_zx, real_t p_zy, real_t p_zz, real_t p_ox, real_t p_oy, real_t p_oz) { + basis = Basis(p_xx, p_xy, p_xz, p_yx, p_yy, p_yz, p_zx, p_zy, p_zz); + origin = Vector3(p_ox, p_oy, p_oz); } } // namespace godot diff --git a/src/variant/variant.cpp b/src/variant/variant.cpp index 1f57d48aa..cf8323abb 100644 --- a/src/variant/variant.cpp +++ b/src/variant/variant.cpp @@ -35,6 +35,7 @@ #include #include #include +#include #include @@ -49,6 +50,7 @@ void Variant::init_bindings() { from_type_constructor[i] = internal::gdextension_interface_get_variant_from_type_constructor((GDExtensionVariantType)i); to_type_constructor[i] = internal::gdextension_interface_get_variant_to_type_constructor((GDExtensionVariantType)i); } + VariantInternal::init_bindings(); StringName::init_bindings(); String::init_bindings(); diff --git a/src/variant/variant_internal.cpp b/src/variant/variant_internal.cpp new file mode 100644 index 000000000..fbfd1cfbb --- /dev/null +++ b/src/variant/variant_internal.cpp @@ -0,0 +1,43 @@ +/**************************************************************************/ +/* variant_internal.cpp */ +/**************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* https://godotengine.org */ +/**************************************************************************/ +/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */ +/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* */ +/* Permission is hereby granted, free of charge, to any person obtaining */ +/* a copy of this software and associated documentation files (the */ +/* "Software"), to deal in the Software without restriction, including */ +/* without limitation the rights to use, copy, modify, merge, publish, */ +/* distribute, sublicense, and/or sell copies of the Software, and to */ +/* permit persons to whom the Software is furnished to do so, subject to */ +/* the following conditions: */ +/* */ +/* The above copyright notice and this permission notice shall be */ +/* included in all copies or substantial portions of the Software. */ +/* */ +/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ +/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ +/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */ +/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ +/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ +/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ +/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +/**************************************************************************/ + +#include + +namespace godot { + +GDExtensionVariantGetInternalPtrFunc VariantInternal::get_internal_func[Variant::VARIANT_MAX]{}; + +void VariantInternal::init_bindings() { + for (int i = 1; i < Variant::VARIANT_MAX; i++) { + get_internal_func[i] = internal::gdextension_interface_variant_get_ptr_internal_getter((GDExtensionVariantType)i); + } +} + +} // namespace godot diff --git a/src/variant/vector2.cpp b/src/variant/vector2.cpp index 12201f1fd..cb190db12 100644 --- a/src/variant/vector2.cpp +++ b/src/variant/vector2.cpp @@ -39,7 +39,7 @@ real_t Vector2::angle() const { return Math::atan2(y, x); } -Vector2 Vector2::from_angle(const real_t p_angle) { +Vector2 Vector2::from_angle(real_t p_angle) { return Vector2(Math::cos(p_angle), Math::sin(p_angle)); } @@ -111,7 +111,7 @@ Vector2 Vector2::round() const { return Vector2(Math::round(x), Math::round(y)); } -Vector2 Vector2::rotated(const real_t p_by) const { +Vector2 Vector2::rotated(real_t p_by) const { real_t sine = Math::sin(p_by); real_t cosi = Math::cos(p_by); return Vector2( @@ -119,7 +119,7 @@ Vector2 Vector2::rotated(const real_t p_by) const { x * sine + y * cosi); } -Vector2 Vector2::posmod(const real_t p_mod) const { +Vector2 Vector2::posmod(real_t p_mod) const { return Vector2(Math::fposmod(x, p_mod), Math::fposmod(y, p_mod)); } @@ -155,7 +155,7 @@ Vector2 Vector2::snappedf(real_t p_step) const { Math::snapped(y, p_step)); } -Vector2 Vector2::limit_length(const real_t p_len) const { +Vector2 Vector2::limit_length(real_t p_len) const { const real_t l = length(); Vector2 v = *this; if (l > 0 && p_len < l) { @@ -166,7 +166,7 @@ Vector2 Vector2::limit_length(const real_t p_len) const { return v; } -Vector2 Vector2::move_toward(const Vector2 &p_to, const real_t p_delta) const { +Vector2 Vector2::move_toward(const Vector2 &p_to, real_t p_delta) const { Vector2 v = *this; Vector2 vd = p_to - v; real_t len = vd.length(); @@ -176,9 +176,9 @@ Vector2 Vector2::move_toward(const Vector2 &p_to, const real_t p_delta) const { // slide returns the component of the vector along the given plane, specified by its normal vector. Vector2 Vector2::slide(const Vector2 &p_normal) const { #ifdef MATH_CHECKS - ERR_FAIL_COND_V_MSG(!p_normal.is_normalized(), Vector2(), "The normal Vector2 must be normalized."); + ERR_FAIL_COND_V_MSG(!p_normal.is_normalized(), Vector2(), "The normal Vector2 " + p_normal.operator String() + "must be normalized."); #endif - return *this - p_normal * this->dot(p_normal); + return *this - p_normal * dot(p_normal); } Vector2 Vector2::bounce(const Vector2 &p_normal) const { @@ -187,9 +187,9 @@ Vector2 Vector2::bounce(const Vector2 &p_normal) const { Vector2 Vector2::reflect(const Vector2 &p_normal) const { #ifdef MATH_CHECKS - ERR_FAIL_COND_V_MSG(!p_normal.is_normalized(), Vector2(), "The normal Vector2 must be normalized."); + ERR_FAIL_COND_V_MSG(!p_normal.is_normalized(), Vector2(), "The normal Vector2 " + p_normal.operator String() + "must be normalized."); #endif - return 2.0f * p_normal * this->dot(p_normal) - *this; + return 2.0f * p_normal * dot(p_normal) - *this; } bool Vector2::is_equal_approx(const Vector2 &p_v) const { @@ -205,7 +205,7 @@ bool Vector2::is_finite() const { } Vector2::operator String() const { - return "(" + String::num_real(x, false) + ", " + String::num_real(y, false) + ")"; + return "(" + String::num_real(x, true) + ", " + String::num_real(y, true) + ")"; } Vector2::operator Vector2i() const { diff --git a/src/variant/vector2i.cpp b/src/variant/vector2i.cpp index 4baff3bb3..d39cb7b4e 100644 --- a/src/variant/vector2i.cpp +++ b/src/variant/vector2i.cpp @@ -35,18 +35,6 @@ namespace godot { -Vector2i Vector2i::snapped(const Vector2i &p_step) const { - return Vector2i( - Math::snapped(x, p_step.x), - Math::snapped(y, p_step.y)); -} - -Vector2i Vector2i::snappedi(int32_t p_step) const { - return Vector2i( - Math::snapped(x, p_step), - Math::snapped(y, p_step)); -} - Vector2i Vector2i::clamp(const Vector2i &p_min, const Vector2i &p_max) const { return Vector2i( CLAMP(x, p_min.x, p_max.x), @@ -59,20 +47,24 @@ Vector2i Vector2i::clampi(int32_t p_min, int32_t p_max) const { CLAMP(y, p_min, p_max)); } -int64_t Vector2i::length_squared() const { - return x * (int64_t)x + y * (int64_t)y; +Vector2i Vector2i::snapped(const Vector2i &p_step) const { + return Vector2i( + Math::snapped(x, p_step.x), + Math::snapped(y, p_step.y)); } -double Vector2i::length() const { - return Math::sqrt((double)length_squared()); +Vector2i Vector2i::snappedi(int32_t p_step) const { + return Vector2i( + Math::snapped(x, p_step), + Math::snapped(y, p_step)); } -int64_t Vector2i::distance_squared_to(const Vector2i &p_to) const { - return (p_to - *this).length_squared(); +int64_t Vector2i::length_squared() const { + return x * (int64_t)x + y * (int64_t)y; } -double Vector2i::distance_to(const Vector2i &p_to) const { - return (p_to - *this).length(); +double Vector2i::length() const { + return Math::sqrt((double)length_squared()); } Vector2i Vector2i::operator+(const Vector2i &p_v) const { @@ -97,39 +89,39 @@ Vector2i Vector2i::operator*(const Vector2i &p_v1) const { return Vector2i(x * p_v1.x, y * p_v1.y); } -Vector2i Vector2i::operator*(const int32_t &rvalue) const { - return Vector2i(x * rvalue, y * rvalue); +Vector2i Vector2i::operator*(int32_t p_rvalue) const { + return Vector2i(x * p_rvalue, y * p_rvalue); } -void Vector2i::operator*=(const int32_t &rvalue) { - x *= rvalue; - y *= rvalue; +void Vector2i::operator*=(int32_t p_rvalue) { + x *= p_rvalue; + y *= p_rvalue; } Vector2i Vector2i::operator/(const Vector2i &p_v1) const { return Vector2i(x / p_v1.x, y / p_v1.y); } -Vector2i Vector2i::operator/(const int32_t &rvalue) const { - return Vector2i(x / rvalue, y / rvalue); +Vector2i Vector2i::operator/(int32_t p_rvalue) const { + return Vector2i(x / p_rvalue, y / p_rvalue); } -void Vector2i::operator/=(const int32_t &rvalue) { - x /= rvalue; - y /= rvalue; +void Vector2i::operator/=(int32_t p_rvalue) { + x /= p_rvalue; + y /= p_rvalue; } Vector2i Vector2i::operator%(const Vector2i &p_v1) const { return Vector2i(x % p_v1.x, y % p_v1.y); } -Vector2i Vector2i::operator%(const int32_t &rvalue) const { - return Vector2i(x % rvalue, y % rvalue); +Vector2i Vector2i::operator%(int32_t p_rvalue) const { + return Vector2i(x % p_rvalue, y % p_rvalue); } -void Vector2i::operator%=(const int32_t &rvalue) { - x %= rvalue; - y %= rvalue; +void Vector2i::operator%=(int32_t p_rvalue) { + x %= p_rvalue; + y %= p_rvalue; } Vector2i Vector2i::operator-() const { diff --git a/src/variant/vector3.cpp b/src/variant/vector3.cpp index d2ad6a9fa..fe42c189d 100644 --- a/src/variant/vector3.cpp +++ b/src/variant/vector3.cpp @@ -37,11 +37,11 @@ namespace godot { -void Vector3::rotate(const Vector3 &p_axis, const real_t p_angle) { +void Vector3::rotate(const Vector3 &p_axis, real_t p_angle) { *this = Basis(p_axis, p_angle).xform(*this); } -Vector3 Vector3::rotated(const Vector3 &p_axis, const real_t p_angle) const { +Vector3 Vector3::rotated(const Vector3 &p_axis, real_t p_angle) const { Vector3 r = *this; r.rotate(p_axis, p_angle); return r; @@ -61,31 +61,31 @@ Vector3 Vector3::clampf(real_t p_min, real_t p_max) const { CLAMP(z, p_min, p_max)); } -void Vector3::snap(const Vector3 p_step) { +void Vector3::snap(const Vector3 &p_step) { x = Math::snapped(x, p_step.x); y = Math::snapped(y, p_step.y); z = Math::snapped(z, p_step.z); } +Vector3 Vector3::snapped(const Vector3 &p_step) const { + Vector3 v = *this; + v.snap(p_step); + return v; +} + void Vector3::snapf(real_t p_step) { x = Math::snapped(x, p_step); y = Math::snapped(y, p_step); z = Math::snapped(z, p_step); } -Vector3 Vector3::snapped(const Vector3 p_step) const { - Vector3 v = *this; - v.snap(p_step); - return v; -} - Vector3 Vector3::snappedf(real_t p_step) const { Vector3 v = *this; v.snapf(p_step); return v; } -Vector3 Vector3::limit_length(const real_t p_len) const { +Vector3 Vector3::limit_length(real_t p_len) const { const real_t l = length(); Vector3 v = *this; if (l > 0 && p_len < l) { @@ -96,7 +96,7 @@ Vector3 Vector3::limit_length(const real_t p_len) const { return v; } -Vector3 Vector3::move_toward(const Vector3 &p_to, const real_t p_delta) const { +Vector3 Vector3::move_toward(const Vector3 &p_to, real_t p_delta) const { Vector3 v = *this; Vector3 vd = p_to - v; real_t len = vd.length(); @@ -122,23 +122,25 @@ Vector2 Vector3::octahedron_encode() const { Vector3 Vector3::octahedron_decode(const Vector2 &p_oct) { Vector2 f(p_oct.x * 2.0f - 1.0f, p_oct.y * 2.0f - 1.0f); Vector3 n(f.x, f.y, 1.0f - Math::abs(f.x) - Math::abs(f.y)); - float t = CLAMP(-n.z, 0.0f, 1.0f); + const real_t t = CLAMP(-n.z, 0.0f, 1.0f); n.x += n.x >= 0 ? -t : t; n.y += n.y >= 0 ? -t : t; return n.normalized(); } -Vector2 Vector3::octahedron_tangent_encode(const float sign) const { - Vector2 res = this->octahedron_encode(); +Vector2 Vector3::octahedron_tangent_encode(float p_sign) const { + const real_t bias = 1.0f / (real_t)32767.0f; + Vector2 res = octahedron_encode(); + res.y = MAX(res.y, bias); res.y = res.y * 0.5f + 0.5f; - res.y = sign >= 0.0f ? res.y : 1 - res.y; + res.y = p_sign >= 0.0f ? res.y : 1 - res.y; return res; } -Vector3 Vector3::octahedron_tangent_decode(const Vector2 &p_oct, float *sign) { +Vector3 Vector3::octahedron_tangent_decode(const Vector2 &p_oct, float *r_sign) { Vector2 oct_compressed = p_oct; oct_compressed.y = oct_compressed.y * 2 - 1; - *sign = oct_compressed.y >= 0.0f ? 1.0f : -1.0f; + *r_sign = oct_compressed.y >= 0.0f ? 1.0f : -1.0f; oct_compressed.y = Math::abs(oct_compressed.y); Vector3 res = Vector3::octahedron_decode(oct_compressed); return res; @@ -165,7 +167,7 @@ bool Vector3::is_finite() const { } Vector3::operator String() const { - return "(" + String::num_real(x, false) + ", " + String::num_real(y, false) + ", " + String::num_real(z, false) + ")"; + return "(" + String::num_real(x, true) + ", " + String::num_real(y, true) + ", " + String::num_real(z, true) + ")"; } Vector3::operator Vector3i() const { diff --git a/src/variant/vector3i.cpp b/src/variant/vector3i.cpp index 7b25d8979..a1e7213b9 100644 --- a/src/variant/vector3i.cpp +++ b/src/variant/vector3i.cpp @@ -35,20 +35,6 @@ namespace godot { -Vector3i Vector3i::snapped(const Vector3i &p_step) const { - return Vector3i( - Math::snapped(x, p_step.x), - Math::snapped(y, p_step.y), - Math::snapped(z, p_step.z)); -} - -Vector3i Vector3i::snappedi(int32_t p_step) const { - return Vector3i( - Math::snapped(x, p_step), - Math::snapped(y, p_step), - Math::snapped(z, p_step)); -} - Vector3i::Axis Vector3i::min_axis_index() const { return x < y ? (x < z ? Vector3i::AXIS_X : Vector3i::AXIS_Z) : (y < z ? Vector3i::AXIS_Y : Vector3i::AXIS_Z); } @@ -71,6 +57,20 @@ Vector3i Vector3i::clampi(int32_t p_min, int32_t p_max) const { CLAMP(z, p_min, p_max)); } +Vector3i Vector3i::snapped(const Vector3i &p_step) const { + return Vector3i( + Math::snapped(x, p_step.x), + Math::snapped(y, p_step.y), + Math::snapped(z, p_step.z)); +} + +Vector3i Vector3i::snappedi(int32_t p_step) const { + return Vector3i( + Math::snapped(x, p_step), + Math::snapped(y, p_step), + Math::snapped(z, p_step)); +} + Vector3i::operator String() const { return "(" + itos(x) + ", " + itos(y) + ", " + itos(z) + ")"; } diff --git a/src/variant/vector4.cpp b/src/variant/vector4.cpp index 2f1bb5926..9b58c9400 100644 --- a/src/variant/vector4.cpp +++ b/src/variant/vector4.cpp @@ -117,7 +117,7 @@ Vector4 Vector4::abs() const { } Vector4 Vector4::sign() const { - return Vector4(Math::sign(x), Math::sign(y), Math::sign(z), Math::sign(w)); + return Vector4(SIGN(x), SIGN(y), SIGN(z), SIGN(w)); } Vector4 Vector4::floor() const { @@ -132,15 +132,16 @@ Vector4 Vector4::round() const { return Vector4(Math::round(x), Math::round(y), Math::round(z), Math::round(w)); } -Vector4 Vector4::lerp(const Vector4 &p_to, const real_t p_weight) const { - return Vector4( - x + (p_weight * (p_to.x - x)), - y + (p_weight * (p_to.y - y)), - z + (p_weight * (p_to.z - z)), - w + (p_weight * (p_to.w - w))); +Vector4 Vector4::lerp(const Vector4 &p_to, real_t p_weight) const { + Vector4 res = *this; + res.x = Math::lerp(res.x, p_to.x, p_weight); + res.y = Math::lerp(res.y, p_to.y, p_weight); + res.z = Math::lerp(res.z, p_to.z, p_weight); + res.w = Math::lerp(res.w, p_to.w, p_weight); + return res; } -Vector4 Vector4::cubic_interpolate(const Vector4 &p_b, const Vector4 &p_pre_a, const Vector4 &p_post_b, const real_t p_weight) const { +Vector4 Vector4::cubic_interpolate(const Vector4 &p_b, const Vector4 &p_pre_a, const Vector4 &p_post_b, real_t p_weight) const { Vector4 res = *this; res.x = Math::cubic_interpolate(res.x, p_b.x, p_pre_a.x, p_post_b.x, p_weight); res.y = Math::cubic_interpolate(res.y, p_b.y, p_pre_a.y, p_post_b.y, p_weight); @@ -149,7 +150,7 @@ Vector4 Vector4::cubic_interpolate(const Vector4 &p_b, const Vector4 &p_pre_a, c return res; } -Vector4 Vector4::cubic_interpolate_in_time(const Vector4 &p_b, const Vector4 &p_pre_a, const Vector4 &p_post_b, const real_t p_weight, const real_t &p_b_t, const real_t &p_pre_a_t, const real_t &p_post_b_t) const { +Vector4 Vector4::cubic_interpolate_in_time(const Vector4 &p_b, const Vector4 &p_pre_a, const Vector4 &p_post_b, real_t p_weight, real_t p_b_t, real_t p_pre_a_t, real_t p_post_b_t) const { Vector4 res = *this; res.x = Math::cubic_interpolate_in_time(res.x, p_b.x, p_pre_a.x, p_post_b.x, p_weight, p_b_t, p_pre_a_t, p_post_b_t); res.y = Math::cubic_interpolate_in_time(res.y, p_b.y, p_pre_a.y, p_post_b.y, p_weight, p_b_t, p_pre_a_t, p_post_b_t); @@ -158,7 +159,7 @@ Vector4 Vector4::cubic_interpolate_in_time(const Vector4 &p_b, const Vector4 &p_ return res; } -Vector4 Vector4::posmod(const real_t p_mod) const { +Vector4 Vector4::posmod(real_t p_mod) const { return Vector4(Math::fposmod(x, p_mod), Math::fposmod(y, p_mod), Math::fposmod(z, p_mod), Math::fposmod(w, p_mod)); } @@ -213,9 +214,13 @@ Vector4 Vector4::clampf(real_t p_min, real_t p_max) const { } Vector4::operator String() const { - return "(" + String::num_real(x, false) + ", " + String::num_real(y, false) + ", " + String::num_real(z, false) + ", " + String::num_real(w, false) + ")"; + return "(" + String::num_real(x, true) + ", " + String::num_real(y, true) + ", " + String::num_real(z, true) + ", " + String::num_real(w, true) + ")"; } static_assert(sizeof(Vector4) == 4 * sizeof(real_t)); +Vector4::operator Vector4i() const { + return Vector4i(x, y, z, w); +} + } // namespace godot diff --git a/src/variant/vector4i.cpp b/src/variant/vector4i.cpp index b0e330ca2..d138610d9 100644 --- a/src/variant/vector4i.cpp +++ b/src/variant/vector4i.cpp @@ -35,22 +35,6 @@ namespace godot { -Vector4i Vector4i::snapped(const Vector4i &p_step) const { - return Vector4i( - Math::snapped(x, p_step.x), - Math::snapped(y, p_step.y), - Math::snapped(z, p_step.z), - Math::snapped(w, p_step.w)); -} - -Vector4i Vector4i::snappedi(int32_t p_step) const { - return Vector4i( - Math::snapped(x, p_step), - Math::snapped(y, p_step), - Math::snapped(z, p_step), - Math::snapped(w, p_step)); -} - Vector4i::Axis Vector4i::min_axis_index() const { uint32_t min_index = 0; int32_t min_value = x; @@ -91,6 +75,22 @@ Vector4i Vector4i::clampi(int32_t p_min, int32_t p_max) const { CLAMP(w, p_min, p_max)); } +Vector4i Vector4i::snapped(const Vector4i &p_step) const { + return Vector4i( + Math::snapped(x, p_step.x), + Math::snapped(y, p_step.y), + Math::snapped(z, p_step.z), + Math::snapped(w, p_step.w)); +} + +Vector4i Vector4i::snappedi(int32_t p_step) const { + return Vector4i( + Math::snapped(x, p_step), + Math::snapped(y, p_step), + Math::snapped(z, p_step), + Math::snapped(w, p_step)); +} + Vector4i::operator String() const { return "(" + itos(x) + ", " + itos(y) + ", " + itos(z) + ", " + itos(w) + ")"; } diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index ab7397fa2..ebbcbb7b4 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -1,40 +1,47 @@ -# Testing Extension -# This is only linked to the template_release config. -# so it requires the template_release version of godot to run. - -add_library( godot-cpp-test SHARED EXCLUDE_FROM_ALL ) - -target_sources( godot-cpp-test - PRIVATE - src/example.cpp - src/example.h - src/register_types.cpp - src/register_types.h - src/tests.h +#[=======================================================================[.rst: +Integration Testing +------------------- + +The Test target used to validate changes in the GitHub CI. +]=======================================================================] + +message(STATUS "Testing Integration targets are enabled.") + +set(TARGET_NAME "godot-cpp-test") + +add_library(${TARGET_NAME} SHARED EXCLUDE_FROM_ALL) + +target_sources( + ${TARGET_NAME} + PRIVATE src/example.cpp src/example.h src/register_types.cpp src/register_types.h src/tests.h ) -set( TEST_TARGET "template_debug" CACHE STRING "Which godot-cpp::target to link against" ) -set_property( CACHE TEST_TARGET PROPERTY STRINGS "template_debug;template_release;editor" ) +# conditionally add doc data to compile output +if(GODOTCPP_TARGET MATCHES "editor|template_debug") + file(GLOB_RECURSE DOC_XML LIST_DIRECTORIES NO CONFIGURE_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/doc_classes/*.xml") + target_doc_sources( ${TARGET_NAME} ${DOC_XML} ) +endif() -target_link_libraries( godot-cpp-test - PRIVATE - godot-cpp::${TEST_TARGET} ) +set(OUTPUT_DIR "${CMAKE_CURRENT_SOURCE_DIR}/project/bin/") -### Get useful properties of the library -get_target_property( GODOT_PLATFORM godot-cpp::${TEST_TARGET} GODOT_PLATFORM ) -get_target_property( GODOT_TARGET godot-cpp::${TEST_TARGET} GODOT_TARGET ) -get_target_property( GODOT_ARCH godot-cpp::${TEST_TARGET} GODOT_ARCH ) +# Link to godot-cpp target +target_link_libraries(${TARGET_NAME} PRIVATE godot-cpp) -set( OUTPUT_DIR "${CMAKE_CURRENT_SOURCE_DIR}/project/bin/" ) +### Get useful properties from godot-cpp target +get_target_property(GODOTCPP_SUFFIX godot-cpp GODOTCPP_SUFFIX) -set_target_properties( godot-cpp-test - PROPERTIES +# gersemi: off +set_target_properties( + ${TARGET_NAME} + PROPERTIES CXX_STANDARD 17 CXX_EXTENSIONS OFF - CXX_VISIBILITY_PRESET ${GODOT_SYMBOL_VISIBILITY} + CXX_VISIBILITY_PRESET ${GODOTCPP_SYMBOL_VISIBILITY} POSITION_INDEPENDENT_CODE ON BUILD_RPATH_USE_ORIGIN ON + + # Try to ensure only static libraries are selected to be linked to. LINK_SEARCH_START_STATIC ON LINK_SEARCH_END_STATIC ON @@ -45,23 +52,18 @@ set_target_properties( godot-cpp-test PDB_OUTPUT_DIRECTORY "$<1:${OUTPUT_DIR}>" #MSVC Only, ignored on other platforms PREFIX "lib" - OUTPUT_NAME "gdexample.${GODOT_PLATFORM}.${GODOT_TARGET}.${GODOT_ARCH}" -) - -if( CMAKE_SYSTEM_NAME STREQUAL Darwin ) - get_target_property( OSX_ARCH godot-cpp::${TEST_TARGET} OSX_ARCHITECTURES ) - - set( OUTPUT_DIR "${OUTPUT_DIR}/libgdexample.macos.${TEST_TARGET}.framework") + OUTPUT_NAME "gdexample${GODOTCPP_SUFFIX}" + # TODO rename the file for both CMake and SCons - set_target_properties( godot-cpp-test - PROPERTIES - LIBRARY_OUTPUT_DIRECTORY "$<1:${OUTPUT_DIR}>" - RUNTIME_OUTPUT_DIRECTORY "$<1:${OUTPUT_DIR}>" - - OUTPUT_NAME "gdexample.macos.${TEST_TARGET}" - SUFFIX "" + # Some IDE's respect this property to logically group targets + FOLDER "godot-cpp" +) +# gersemi: on - #macos options - OSX_ARCHITECTURES "${OSX_ARCH}" +# CMAKE_SYSTEM_NAME refers to the target system +if(CMAKE_SYSTEM_NAME STREQUAL Darwin) + set_target_properties( + ${TARGET_NAME} + PROPERTIES SUFFIX "" OUTPUT_DIR "${OUTPUT_DIR}/libgdexample.macos.${GODOTCPP_TARGET}.framework" ) -endif () +endif() diff --git a/test/build_profile.json b/test/build_profile.json index 3587651c1..57d847a11 100644 --- a/test/build_profile.json +++ b/test/build_profile.json @@ -1,9 +1,13 @@ { "enabled_classes": [ "Control", + "InputEventKey", "Label", + "MultiplayerAPI", + "MultiplayerPeer", "OS", "TileMap", - "InputEventKey" + "TileSet", + "Viewport" ] } diff --git a/test/project/example.gd.uid b/test/project/example.gd.uid new file mode 100644 index 000000000..b1c36967a --- /dev/null +++ b/test/project/example.gd.uid @@ -0,0 +1 @@ +uid://1htvqeulgew6 diff --git a/test/project/example.gdextension.uid b/test/project/example.gdextension.uid new file mode 100644 index 000000000..fa1a310e2 --- /dev/null +++ b/test/project/example.gdextension.uid @@ -0,0 +1 @@ +uid://dhm7q8lygqyol diff --git a/test/project/main.gd b/test/project/main.gd index e5a3b95cc..b69ad75a0 100644 --- a/test/project/main.gd +++ b/test/project/main.gd @@ -271,6 +271,9 @@ func _ready(): # Test that we can access an engine singleton. assert_equal(example.test_use_engine_singleton(), OS.get_name()) + assert_equal(example.test_get_internal(1), 1) + assert_equal(example.test_get_internal(true), -1) + # Test that notifications happen on both parent and child classes. var example_child = $ExampleChild assert_equal(example_child.get_value1(), 11) diff --git a/test/project/main.gd.uid b/test/project/main.gd.uid new file mode 100644 index 000000000..1266fc06f --- /dev/null +++ b/test/project/main.gd.uid @@ -0,0 +1 @@ +uid://bujp6xsb8pfqk diff --git a/test/project/main.tscn b/test/project/main.tscn index e786025a6..89988fd3b 100644 --- a/test/project/main.tscn +++ b/test/project/main.tscn @@ -1,7 +1,7 @@ [gd_scene load_steps=3 format=3 uid="uid://dmx2xuigcpvt4"] -[ext_resource type="Script" path="res://main.gd" id="1_qesh5"] -[ext_resource type="Script" path="res://example.gd" id="2_jju25"] +[ext_resource type="Script" uid="uid://bujp6xsb8pfqk" path="res://main.gd" id="1_qesh5"] +[ext_resource type="Script" uid="uid://1htvqeulgew6" path="res://example.gd" id="2_jju25"] [node name="Node" type="Node"] script = ExtResource("1_qesh5") diff --git a/test/project/project.godot b/test/project/project.godot index df3dd70f7..9b711dd65 100644 --- a/test/project/project.godot +++ b/test/project/project.godot @@ -12,7 +12,7 @@ config_version=5 config/name="GDExtension Test Project" run/main_scene="res://main.tscn" -config/features=PackedStringArray("4.3") +config/features=PackedStringArray("4.4") config/icon="res://icon.png" [native_extensions] diff --git a/test/project/test_base.gd.uid b/test/project/test_base.gd.uid new file mode 100644 index 000000000..15057856a --- /dev/null +++ b/test/project/test_base.gd.uid @@ -0,0 +1 @@ +uid://dwbwwljpx3cp diff --git a/test/src/example.cpp b/test/src/example.cpp index 22739b29b..f51c1c175 100644 --- a/test/src/example.cpp +++ b/test/src/example.cpp @@ -12,6 +12,7 @@ #include #include #include +#include #include using namespace godot; @@ -243,6 +244,8 @@ void Example::_bind_methods() { ClassDB::bind_method(D_METHOD("callable_bind"), &Example::callable_bind); ClassDB::bind_method(D_METHOD("test_post_initialize"), &Example::test_post_initialize); + ClassDB::bind_method(D_METHOD("test_get_internal", "a"), &Example::test_get_internal); + GDVIRTUAL_BIND(_do_something_virtual, "name", "value"); ClassDB::bind_method(D_METHOD("test_virtual_implemented_in_script"), &Example::test_virtual_implemented_in_script); GDVIRTUAL_BIND(_do_something_virtual_with_control, "control"); @@ -741,6 +744,14 @@ String Example::test_library_path() { return library_path; } +int64_t Example::test_get_internal(const Variant &p_input) const { + if (p_input.get_type() != Variant::INT) { + return -1; + } + + return *VariantInternal::get_int(&p_input); +} + void ExampleRuntime::_bind_methods() { ClassDB::bind_method(D_METHOD("set_prop_value", "value"), &ExampleRuntime::set_prop_value); ClassDB::bind_method(D_METHOD("get_prop_value"), &ExampleRuntime::get_prop_value); diff --git a/test/src/example.h b/test/src/example.h index a7ae54c0e..b40fcab16 100644 --- a/test/src/example.h +++ b/test/src/example.h @@ -3,8 +3,7 @@ * This is free and unencumbered software released into the public domain. */ -#ifndef EXAMPLE_CLASS_H -#define EXAMPLE_CLASS_H +#pragma once // We don't need windows.h in this example plugin but many others do, and it can // lead to annoying situations due to the ton of macros it defines. @@ -21,7 +20,9 @@ #include #include #include +#include #include +#include #include #include @@ -185,6 +186,8 @@ class Example : public Control { bool test_post_initialize() const; + int64_t test_get_internal(const Variant &p_input) const; + // Static method. static int test_static(int p_a, int p_b); static void test_static2(); @@ -285,5 +288,3 @@ class ExamplePrzykΕ‚ad : public RefCounted { public: String get_the_word() const; }; - -#endif // EXAMPLE_CLASS_H diff --git a/test/src/register_types.h b/test/src/register_types.h index 5f124da77..d19fd01a9 100644 --- a/test/src/register_types.h +++ b/test/src/register_types.h @@ -3,8 +3,7 @@ * This is free and unencumbered software released into the public domain. */ -#ifndef EXAMPLE_REGISTER_TYPES_H -#define EXAMPLE_REGISTER_TYPES_H +#pragma once #include @@ -12,5 +11,3 @@ using namespace godot; void initialize_example_module(ModuleInitializationLevel p_level); void uninitialize_example_module(ModuleInitializationLevel p_level); - -#endif // EXAMPLE_REGISTER_TYPES_H diff --git a/test/src/tests.h b/test/src/tests.h index 55835fc16..a2c39be03 100644 --- a/test/src/tests.h +++ b/test/src/tests.h @@ -3,8 +3,7 @@ * This is free and unencumbered software released into the public domain. */ -#ifndef TESTS_H -#define TESTS_H +#pragma once #include #include @@ -25,5 +24,3 @@ #include #include #include - -#endif // TESTS_H diff --git a/tools/godotcpp.py b/tools/godotcpp.py index 77a0740fc..3646264ba 100644 --- a/tools/godotcpp.py +++ b/tools/godotcpp.py @@ -10,7 +10,9 @@ from SCons.Variables import BoolVariable, EnumVariable, PathVariable from SCons.Variables.BoolVariable import _text2bool -from binding_generator import scons_emit_files, scons_generate_bindings +from binding_generator import _generate_bindings, _get_file_list, get_file_list +from build_profile import generate_trimmed_api +from doc_source_generator import scons_generate_doc_source def add_sources(sources, dir, extension): @@ -129,6 +131,38 @@ def no_verbose(env): env.Append(GENCOMSTR=[generated_file_message]) +def scons_emit_files(target, source, env): + profile_filepath = env.get("build_profile", "") + if profile_filepath: + profile_filepath = normalize_path(profile_filepath, env) + + # Always clean all files + env.Clean(target, [env.File(f) for f in get_file_list(str(source[0]), target[0].abspath, True, True)]) + + api = generate_trimmed_api(str(source[0]), profile_filepath) + files = [env.File(f) for f in _get_file_list(api, target[0].abspath, True, True)] + env["godot_cpp_gen_dir"] = target[0].abspath + return files, source + + +def scons_generate_bindings(target, source, env): + profile_filepath = env.get("build_profile", "") + if profile_filepath: + profile_filepath = normalize_path(profile_filepath, env) + + api = generate_trimmed_api(str(source[0]), profile_filepath) + + _generate_bindings( + api, + str(source[0]), + env["generate_template_get_node"], + "32" if "32" in env["arch"] else "64", + env["precision"], + env["godot_cpp_gen_dir"], + ) + return None + + platforms = ["linux", "macos", "windows", "android", "ios", "web"] # CPU architecture options. @@ -345,51 +379,6 @@ def options(opts, env): tool.options(opts) -def make_doc_source(target, source, env): - import zlib - - dst = str(target[0]) - g = open(dst, "w", encoding="utf-8") - buf = "" - docbegin = "" - docend = "" - for src in source: - src_path = str(src) - if not src_path.endswith(".xml"): - continue - with open(src_path, "r", encoding="utf-8") as f: - content = f.read() - buf += content - - buf = (docbegin + buf + docend).encode("utf-8") - decomp_size = len(buf) - - # Use maximum zlib compression level to further reduce file size - # (at the cost of initial build times). - buf = zlib.compress(buf, zlib.Z_BEST_COMPRESSION) - - g.write("/* THIS FILE IS GENERATED DO NOT EDIT */\n") - g.write("\n") - g.write("#include \n") - g.write("\n") - - g.write('static const char *_doc_data_hash = "' + str(hash(buf)) + '";\n') - g.write("static const int _doc_data_uncompressed_size = " + str(decomp_size) + ";\n") - g.write("static const int _doc_data_compressed_size = " + str(len(buf)) + ";\n") - g.write("static const unsigned char _doc_data_compressed[] = {\n") - for i in range(len(buf)): - g.write("\t" + str(buf[i]) + ",\n") - g.write("};\n") - g.write("\n") - - g.write( - "static godot::internal::DocDataRegistration _doc_data_registration(_doc_data_hash, _doc_data_uncompressed_size, _doc_data_compressed_size, _doc_data_compressed);\n" - ) - g.write("\n") - - g.close() - - def generate(env): # Default num_jobs to local cpu count if not user specified. # SCons has a peculiarity where user-specified options won't be overridden @@ -522,7 +511,7 @@ def generate(env): env.Append( BUILDERS={ "GodotCPPBindings": Builder(action=Action(scons_generate_bindings, "$GENCOMSTR"), emitter=scons_emit_files), - "GodotCPPDocData": Builder(action=make_doc_source), + "GodotCPPDocData": Builder(action=scons_generate_doc_source), } ) env.AddMethod(_godot_cpp, "GodotCPP") diff --git a/tools/linux.py b/tools/linux.py index 9e85d8803..ae8019877 100644 --- a/tools/linux.py +++ b/tools/linux.py @@ -5,6 +5,7 @@ def options(opts): opts.Add(BoolVariable("use_llvm", "Use the LLVM compiler - only effective when targeting Linux", False)) + opts.Add(BoolVariable("use_static_cpp", "Link libgcc and libstdc++ statically for better portability", True)) def exists(env): @@ -37,6 +38,10 @@ def generate(env): env.Append(CCFLAGS=["-march=rv64gc"]) env.Append(LINKFLAGS=["-march=rv64gc"]) + # Link statically for portability + if env["use_static_cpp"]: + env.Append(LINKFLAGS=["-static-libgcc", "-static-libstdc++"]) + env.Append(CPPDEFINES=["LINUX_ENABLED", "UNIX_ENABLED"]) # Refer to https://github.com/godotengine/godot/blob/master/platform/linuxbsd/detect.py diff --git a/tools/macos.py b/tools/macos.py index f88e47ff1..541249cb4 100644 --- a/tools/macos.py +++ b/tools/macos.py @@ -63,14 +63,6 @@ def generate(env): env.Append(CCFLAGS=["-isysroot", env["macos_sdk_path"]]) env.Append(LINKFLAGS=["-isysroot", env["macos_sdk_path"]]) - env.Append( - LINKFLAGS=[ - "-framework", - "Cocoa", - "-Wl,-undefined,dynamic_lookup", - ] - ) - env.Append(CPPDEFINES=["MACOS_ENABLED", "UNIX_ENABLED"]) # Refer to https://github.com/godotengine/godot/blob/master/platform/macos/detect.py