Mass replaced godot to pandemonium.

This commit is contained in:
Relintai 2023-10-23 14:07:57 +02:00
parent 3ba1d209c4
commit e08a32544b
73 changed files with 1135 additions and 1135 deletions

View File

@ -124,5 +124,5 @@ ObjCBlockIndentWidth: 4
### Java specific config ###
Language: Java
# BreakAfterJavaFieldAnnotations: false
JavaImportGroups: ['org.godotengine', 'android', 'androidx', 'com.android', 'com.google', 'java', 'javax']
JavaImportGroups: ['org.pandemoniumengine', 'android', 'androidx', 'com.android', 'com.google', 'java', 'javax']
...

2
.gitattributes vendored
View File

@ -3,4 +3,4 @@
*.gd eol=lf
*.tscn eol=lf
*.cfg eol=lf
*.godot eol=lf
*.pandemonium eol=lf

View File

@ -1,5 +1,5 @@
name: Setup Godot build cache
description: Setup Godot build cache.
name: Setup Pandemonium build cache
description: Setup Pandemonium build cache.
inputs:
cache-name:
description: The cache base name (job name by default).
@ -15,8 +15,8 @@ runs:
uses: actions/cache@v3
with:
path: ${{inputs.scons-cache}}
key: ${{inputs.cache-name}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
key: ${{inputs.cache-name}}-${{env.PANDEMONIUM_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
restore-keys: |
${{inputs.cache-name}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
${{inputs.cache-name}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}
${{inputs.cache-name}}-${{env.GODOT_BASE_BRANCH}}
${{inputs.cache-name}}-${{env.PANDEMONIUM_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
${{inputs.cache-name}}-${{env.PANDEMONIUM_BASE_BRANCH}}-${{github.ref}}
${{inputs.cache-name}}-${{env.PANDEMONIUM_BASE_BRANCH}}

View File

@ -3,7 +3,7 @@ on: [push, pull_request]
env:
# Only used for the cache key. Increment version to force clean build.
GODOT_BASE_BRANCH: 3.x
PANDEMONIUM_BASE_BRANCH: 3.x
concurrency:
group: ci-${{github.actor}}-${{github.head_ref || github.run_number}}-${{github.ref}}
@ -20,50 +20,50 @@ jobs:
- name: 🐧 Linux (GCC)
os: ubuntu-18.04
platform: linux
artifact-name: godot-cpp-linux-glibc2.27-x86_64-release
artifact-path: bin/libgodot-cpp.linux.release.64.a
pandemonium_zip: Godot_v3.5-stable_linux_server.64.zip
executable: Godot_v3.5-stable_linux_server.64
artifact-name: pandemonium-cpp-linux-glibc2.27-x86_64-release
artifact-path: bin/libpandemonium-cpp.linux.release.64.a
pandemonium_zip: Pandemonium_v3.5-stable_linux_server.64.zip
executable: Pandemonium_v3.5-stable_linux_server.64
cache-name: linux-x86_64
- name: 🏁 Windows (x86_64, MSVC)
os: windows-2019
platform: windows
artifact-name: godot-cpp-windows-msvc2019-x86_64-release
artifact-path: bin/libgodot-cpp.windows.release.64.lib
artifact-name: pandemonium-cpp-windows-msvc2019-x86_64-release
artifact-path: bin/libpandemonium-cpp.windows.release.64.lib
cache-name: windows-x86_64-msvc
- name: 🏁 Windows (x86_64, MinGW)
os: windows-2019
platform: windows
artifact-name: godot-cpp-linux-mingw-x86_64-release
artifact-path: bin/libgodot-cpp.windows.release.64.a
artifact-name: pandemonium-cpp-linux-mingw-x86_64-release
artifact-path: bin/libpandemonium-cpp.windows.release.64.a
flags: use_mingw=yes
cache-name: windows-x86_64-mingw
- name: 🍎 macOS (universal)
os: macos-11
platform: osx
artifact-name: godot-cpp-macos-universal-release
artifact-path: bin/libgodot-cpp.osx.release.64.a
artifact-name: pandemonium-cpp-macos-universal-release
artifact-path: bin/libpandemonium-cpp.osx.release.64.a
flags: macos_arch=universal
pandemonium_zip: Godot_v3.5-stable_osx.universal.zip
executable: Godot.app/Contents/MacOS/Godot
pandemonium_zip: Pandemonium_v3.5-stable_osx.universal.zip
executable: Pandemonium.app/Contents/MacOS/Pandemonium
cache-name: macos-unversal
- name: 🤖 Android (arm64)
os: ubuntu-18.04
platform: android
artifact-name: godot-cpp-android-arm64-release
artifact-path: bin/libgodot-cpp.android.release.arm64v8.a
artifact-name: pandemonium-cpp-android-arm64-release
artifact-path: bin/libpandemonium-cpp.android.release.arm64v8.a
flags: ANDROID_NDK_ROOT=$ANDROID_NDK_LATEST_HOME android_arch=arm64v8
cache-name: android-arm64
- name: 🍏 iOS (arm64)
os: macos-11
platform: ios
artifact-name: godot-cpp-ios-arm64-release
artifact-path: bin/libgodot-cpp.ios.release.arm64.a
artifact-name: pandemonium-cpp-ios-arm64-release
artifact-path: bin/libpandemonium-cpp.ios.release.arm64.a
cache-name: ios-arm64
env:
@ -75,8 +75,8 @@ jobs:
with:
submodules: recursive
- name: Setup Godot build cache
uses: ./.github/actions/godot-cache
- name: Setup Pandemonium build cache
uses: ./.github/actions/pandemonium-cache
with:
cache-name: ${{ matrix.cache-name }}
continue-on-error: true
@ -100,16 +100,16 @@ jobs:
if: ${{ matrix.platform == 'windows' }}
uses: egor-tensin/setup-mingw@v2
- name: Build godot-cpp (debug)
- name: Build pandemonium-cpp (debug)
run: |
scons platform=${{ matrix.platform }} target=debug ${{ matrix.flags }}
- name: Build test without rebuilding godot-cpp (debug)
- name: Build test without rebuilding pandemonium-cpp (debug)
run: |
cd test
scons platform=${{ matrix.platform }} target=debug ${{ matrix.flags }} build_library=no
- name: Build test and godot-cpp (release)
- name: Build test and pandemonium-cpp (release)
run: |
cd test
scons platform=${{ matrix.platform }} target=release ${{ matrix.flags }}
@ -117,7 +117,7 @@ jobs:
- name: Run test GDNative library
if: ${{ matrix.platform == 'linux' || matrix.platform == 'osx' }}
run: |
curl -LO https://downloads.tuxfamily.org/godotengine/3.5/${{ matrix.pandemonium_zip }}
curl -LO https://downloads.tuxfamily.org/pandemoniumengine/3.5/${{ matrix.pandemonium_zip }}
unzip ${{ matrix.pandemonium_zip }}
./${{ matrix.executable }} --path test -s script.gd

2
.gitignore vendored
View File

@ -163,7 +163,7 @@ cscope.files
cscope.out
cscope.in.out
cscope.po.out
godot.creator.*
pandemonium.creator.*
# Visual Studio 2017 and Visual Studio Code workspace folder
/.vs

View File

@ -1,16 +1,16 @@
# cmake arguments
# CMAKE_BUILD_TYPE: Compilation target (Debug or Release defaults to Debug)
#
# godot-cpp cmake arguments
# GODOT_HEADERS_DIR: This is where the gdnative include folder is (pandemonium_source/modules/gdn/include)
# GODOT_CUSTOM_API_FILE: This is if you have another path for the pandemonium_api.json
# pandemonium-cpp cmake arguments
# PANDEMONIUM_HEADERS_DIR: This is where the gdnative include folder is (pandemonium_source/modules/gdn/include)
# PANDEMONIUM_CUSTOM_API_FILE: This is if you have another path for the pandemonium_api.json
#
# Android cmake arguments
# CMAKE_TOOLCHAIN_FILE: The path to the android cmake toolchain ($ANDROID_NDK/build/cmake/android.toolchain.cmake)
# ANDROID_NDK: The path to the android ndk root folder
# ANDROID_TOOLCHAIN_NAME: The android toolchain (arm-linux-androideabi-4.9 or aarch64-linux-android-4.9 or x86-4.9 or x86_64-4.9)
# ANDROID_PLATFORM: The android platform version (android-23)
# More info here: https://godot.readthedocs.io/en/latest/development/compiling/compiling_for_android.html
# More info here: https://pandemonium.readthedocs.io/en/latest/development/compiling/compiling_for_android.html
#
# Examples
#
@ -34,7 +34,7 @@
# Todo
# Test build for Windows, Mac and mingw.
project(godot-cpp)
project(pandemonium-cpp)
cmake_minimum_required(VERSION 3.6)
option(GENERATE_TEMPLATE_GET_NODE "Generate a template version of the Node class's get_node." ON)
@ -74,27 +74,27 @@ if(NOT DEFINED BITS)
endif(CMAKE_SIZEOF_VOID_P EQUAL 8)
endif()
# Input from user for godot headers and the api file
set(GODOT_HEADERS_DIR "pandemonium_headers" CACHE STRING "")
set(GODOT_CUSTOM_API_FILE "pandemonium_headers/api.json" CACHE STRING "")
# Input from user for pandemonium headers and the api file
set(PANDEMONIUM_HEADERS_DIR "pandemonium_headers" CACHE STRING "")
set(PANDEMONIUM_CUSTOM_API_FILE "pandemonium_headers/api.json" CACHE STRING "")
set(GODOT_COMPILE_FLAGS )
set(GODOT_LINKER_FLAGS )
set(PANDEMONIUM_COMPILE_FLAGS )
set(PANDEMONIUM_LINKER_FLAGS )
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
# using Visual Studio C++
set(GODOT_COMPILE_FLAGS "/EHsc /WX") # /GF /MP
set(PANDEMONIUM_COMPILE_FLAGS "/EHsc /WX") # /GF /MP
if(CMAKE_BUILD_TYPE MATCHES Debug)
set(GODOT_COMPILE_FLAGS "${GODOT_COMPILE_FLAGS} /MDd") # /Od /RTC1 /Zi
set(PANDEMONIUM_COMPILE_FLAGS "${PANDEMONIUM_COMPILE_FLAGS} /MDd") # /Od /RTC1 /Zi
else()
set(GODOT_COMPILE_FLAGS "${GODOT_COMPILE_FLAGS} /MD /O2") # /Oy /GL /Gy
set(PANDEMONIUM_COMPILE_FLAGS "${PANDEMONIUM_COMPILE_FLAGS} /MD /O2") # /Oy /GL /Gy
STRING(REGEX REPLACE "/RTC(su|[1su])" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
string(REPLACE "/RTC1" "" CMAKE_CXX_FLAGS_DEBUG ${CMAKE_CXX_FLAGS_DEBUG})
endif(CMAKE_BUILD_TYPE MATCHES Debug)
# Disable conversion warning, trunkation, unreferenced var, signed missmatch
set(GODOT_COMPILE_FLAGS "${GODOT_COMPILE_FLAGS} /wd4244 /wd4305 /wd4101 /wd4018 /wd4267")
set(PANDEMONIUM_COMPILE_FLAGS "${PANDEMONIUM_COMPILE_FLAGS} /wd4244 /wd4305 /wd4101 /wd4018 /wd4267")
# Todo: Check if needed.
add_definitions(-DWIN32_LEAN_AND_MEAN -D_CRT_SECURE_NO_WARNINGS)
@ -105,33 +105,33 @@ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
#endif()
else() # GCC/Clang
set(GODOT_LINKER_FLAGS "-static-libgcc -static-libstdc++ -Wl,-R,'$$ORIGIN'")
set(PANDEMONIUM_LINKER_FLAGS "-static-libgcc -static-libstdc++ -Wl,-R,'$$ORIGIN'")
if(NOT CMAKE_SYSTEM_NAME MATCHES "Windows")
set(GODOT_COMPILE_FLAGS "-fPIC")
set(PANDEMONIUM_COMPILE_FLAGS "-fPIC")
endif()
set(GODOT_COMPILE_FLAGS "${GODOT_COMPILE_FLAGS} -g -Wwrite-strings")
set(GODOT_COMPILE_FLAGS "${GODOT_COMPILE_FLAGS} -Wchar-subscripts -Wcomment -Wdisabled-optimization")
set(GODOT_COMPILE_FLAGS "${GODOT_COMPILE_FLAGS} -Wformat -Wformat=2 -Wformat-security -Wformat-y2k")
set(GODOT_COMPILE_FLAGS "${GODOT_COMPILE_FLAGS} -Wimport -Winit-self -Winline -Winvalid-pch -Werror")
set(GODOT_COMPILE_FLAGS "${GODOT_COMPILE_FLAGS} -Wmissing-braces -Wmissing-format-attribute")
set(GODOT_COMPILE_FLAGS "${GODOT_COMPILE_FLAGS} -Wmissing-include-dirs -Wmissing-noreturn -Wpacked -Wpointer-arith")
set(GODOT_COMPILE_FLAGS "${GODOT_COMPILE_FLAGS} -Wredundant-decls -Wreturn-type -Wsequence-point")
set(GODOT_COMPILE_FLAGS "${GODOT_COMPILE_FLAGS} -Wswitch -Wswitch-enum -Wtrigraphs")
set(GODOT_COMPILE_FLAGS "${GODOT_COMPILE_FLAGS} -Wuninitialized -Wunknown-pragmas -Wunreachable-code -Wunused-label")
set(GODOT_COMPILE_FLAGS "${GODOT_COMPILE_FLAGS} -Wunused-value -Wvariadic-macros -Wvolatile-register-var -Wno-error=attributes")
set(PANDEMONIUM_COMPILE_FLAGS "${PANDEMONIUM_COMPILE_FLAGS} -g -Wwrite-strings")
set(PANDEMONIUM_COMPILE_FLAGS "${PANDEMONIUM_COMPILE_FLAGS} -Wchar-subscripts -Wcomment -Wdisabled-optimization")
set(PANDEMONIUM_COMPILE_FLAGS "${PANDEMONIUM_COMPILE_FLAGS} -Wformat -Wformat=2 -Wformat-security -Wformat-y2k")
set(PANDEMONIUM_COMPILE_FLAGS "${PANDEMONIUM_COMPILE_FLAGS} -Wimport -Winit-self -Winline -Winvalid-pch -Werror")
set(PANDEMONIUM_COMPILE_FLAGS "${PANDEMONIUM_COMPILE_FLAGS} -Wmissing-braces -Wmissing-format-attribute")
set(PANDEMONIUM_COMPILE_FLAGS "${PANDEMONIUM_COMPILE_FLAGS} -Wmissing-include-dirs -Wmissing-noreturn -Wpacked -Wpointer-arith")
set(PANDEMONIUM_COMPILE_FLAGS "${PANDEMONIUM_COMPILE_FLAGS} -Wredundant-decls -Wreturn-type -Wsequence-point")
set(PANDEMONIUM_COMPILE_FLAGS "${PANDEMONIUM_COMPILE_FLAGS} -Wswitch -Wswitch-enum -Wtrigraphs")
set(PANDEMONIUM_COMPILE_FLAGS "${PANDEMONIUM_COMPILE_FLAGS} -Wuninitialized -Wunknown-pragmas -Wunreachable-code -Wunused-label")
set(PANDEMONIUM_COMPILE_FLAGS "${PANDEMONIUM_COMPILE_FLAGS} -Wunused-value -Wvariadic-macros -Wvolatile-register-var -Wno-error=attributes")
# -Wshadow -Wextra -Wall -Weffc++ -Wfloat-equal -Wstack-protector -Wunused-parameter -Wsign-compare -Wunused-variable -Wcast-align
# -Wunused-function -Wstrict-aliasing -Wstrict-aliasing=2 -Wmissing-field-initializers
if(NOT CMAKE_SYSTEM_NAME STREQUAL "Android")
set(GODOT_COMPILE_FLAGS "${GODOT_COMPILE_FLAGS} -Wno-ignored-attributes")
set(PANDEMONIUM_COMPILE_FLAGS "${PANDEMONIUM_COMPILE_FLAGS} -Wno-ignored-attributes")
endif()
if(CMAKE_BUILD_TYPE MATCHES Debug)
set(GODOT_COMPILE_FLAGS "${GODOT_COMPILE_FLAGS} -fno-omit-frame-pointer -O0")
set(PANDEMONIUM_COMPILE_FLAGS "${PANDEMONIUM_COMPILE_FLAGS} -fno-omit-frame-pointer -O0")
else()
set(GODOT_COMPILE_FLAGS "${GODOT_COMPILE_FLAGS} -O3")
set(PANDEMONIUM_COMPILE_FLAGS "${PANDEMONIUM_COMPILE_FLAGS} -O3")
endif(CMAKE_BUILD_TYPE MATCHES Debug)
endif()
@ -144,14 +144,14 @@ else()
endif()
message(STATUS "Generating Bindings")
execute_process(COMMAND "${Python3_EXECUTABLE}" "-c" "import binding_generator; binding_generator.print_file_list(\"${GODOT_CUSTOM_API_FILE}\", \"${CMAKE_CURRENT_BINARY_DIR}\", headers=True)"
execute_process(COMMAND "${Python3_EXECUTABLE}" "-c" "import binding_generator; binding_generator.print_file_list(\"${PANDEMONIUM_CUSTOM_API_FILE}\", \"${CMAKE_CURRENT_BINARY_DIR}\", headers=True)"
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
RESULT_VARIABLE HEADERS_FILE_LIST_RESULT
OUTPUT_VARIABLE HEADERS_FILE_LIST
)
set(HEADERS_FILE_LIST ${HEADERS_FILE_LIST})
execute_process(COMMAND "${Python3_EXECUTABLE}" "-c" "import binding_generator; binding_generator.print_file_list(\"${GODOT_CUSTOM_API_FILE}\", \"${CMAKE_CURRENT_BINARY_DIR}\", sources=True)"
execute_process(COMMAND "${Python3_EXECUTABLE}" "-c" "import binding_generator; binding_generator.print_file_list(\"${PANDEMONIUM_CUSTOM_API_FILE}\", \"${CMAKE_CURRENT_BINARY_DIR}\", sources=True)"
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
RESULT_VARIABLE SOURCES_FILE_LIST_RESULT
OUTPUT_VARIABLE SOURCES_FILE_LIST
@ -159,10 +159,10 @@ execute_process(COMMAND "${Python3_EXECUTABLE}" "-c" "import binding_generator;
set(SOURCES_FILE_LIST ${SOURCES_FILE_LIST})
add_custom_command(OUTPUT ${HEADERS_FILE_LIST} ${SOURCES_FILE_LIST}
COMMAND "${Python3_EXECUTABLE}" "-c" "import binding_generator; binding_generator.generate_bindings(\"${GODOT_CUSTOM_API_FILE}\", \"${GENERATE_BINDING_PARAMETERS}\", \"${CMAKE_CURRENT_BINARY_DIR}\")"
COMMAND "${Python3_EXECUTABLE}" "-c" "import binding_generator; binding_generator.generate_bindings(\"${PANDEMONIUM_CUSTOM_API_FILE}\", \"${GENERATE_BINDING_PARAMETERS}\", \"${CMAKE_CURRENT_BINARY_DIR}\")"
VERBATIM
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
MAIN_DEPENDENCY ${GODOT_CUSTOM_API_FILE}
MAIN_DEPENDENCY ${PANDEMONIUM_CUSTOM_API_FILE}
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/binding_generator.py
COMMENT Generating Bindings
)
@ -171,7 +171,7 @@ add_custom_command(OUTPUT ${HEADERS_FILE_LIST} ${SOURCES_FILE_LIST}
file(GLOB_RECURSE SOURCES src/*.c**)
file(GLOB_RECURSE HEADERS include/*.h**)
# Define our godot-cpp library
# Define our pandemonium-cpp library
add_library(${PROJECT_NAME}
${SOURCES}
${SOURCES_FILE_LIST}
@ -185,17 +185,17 @@ target_include_directories(${PROJECT_NAME}
${CMAKE_CURRENT_BINARY_DIR}/include/gen/
)
# Put godot headers as SYSTEM PUBLIC to exclude warnings from irrelevant headers
# Put pandemonium headers as SYSTEM PUBLIC to exclude warnings from irrelevant headers
target_include_directories(${PROJECT_NAME}
SYSTEM PUBLIC
${GODOT_HEADERS_DIR}
${PANDEMONIUM_HEADERS_DIR}
)
# Add the compile flags
set_property(TARGET ${PROJECT_NAME} APPEND_STRING PROPERTY COMPILE_FLAGS ${GODOT_COMPILE_FLAGS})
set_property(TARGET ${PROJECT_NAME} APPEND_STRING PROPERTY LINK_FLAGS ${GODOT_LINKER_FLAGS})
set_property(TARGET ${PROJECT_NAME} APPEND_STRING PROPERTY COMPILE_FLAGS ${PANDEMONIUM_COMPILE_FLAGS})
set_property(TARGET ${PROJECT_NAME} APPEND_STRING PROPERTY LINK_FLAGS ${PANDEMONIUM_LINKER_FLAGS})
# Create the correct name (godot.os.build_type.system_bits)
# Create the correct name (pandemonium.os.build_type.system_bits)
string(TOLOWER "${CMAKE_SYSTEM_NAME}" SYSTEM_NAME)
string(TOLOWER "${CMAKE_BUILD_TYPE}" BUILD_TYPE)
@ -203,8 +203,8 @@ string(TOLOWER "${CMAKE_BUILD_TYPE}" BUILD_TYPE)
if(ANDROID)
# Added the android abi after system name
set(SYSTEM_NAME ${SYSTEM_NAME}.${ANDROID_ABI})
# Android does not have the bits at the end if you look at the main godot repo build
set_property(TARGET ${PROJECT_NAME} PROPERTY OUTPUT_NAME "godot-cpp.${SYSTEM_NAME}.${BUILD_TYPE}")
# Android does not have the bits at the end if you look at the main pandemonium repo build
set_property(TARGET ${PROJECT_NAME} PROPERTY OUTPUT_NAME "pandemonium-cpp.${SYSTEM_NAME}.${BUILD_TYPE}")
else()
set_property(TARGET ${PROJECT_NAME} PROPERTY OUTPUT_NAME "godot-cpp.${SYSTEM_NAME}.${BUILD_TYPE}.${BITS}")
set_property(TARGET ${PROJECT_NAME} PROPERTY OUTPUT_NAME "pandemonium-cpp.${SYSTEM_NAME}.${BUILD_TYPE}.${BITS}")
endif()

108
README.md
View File

@ -1,6 +1,6 @@
# godot-cpp
# pandemonium-cpp
This repository contains the *C++ bindings* for the [**Godot Engine**](https://github.com/godotengine/godot)'s GDNative API.
This repository contains the *C++ bindings* for the [**Pandemonium Engine**](https://github.com/pandemoniumengine/pandemonium)'s GDNative API.
- [**Versioning**](#versioning)
- [**Contributing**](#contributing)
@ -9,8 +9,8 @@ This repository contains the *C++ bindings* for the [**Godot Engine**](https://
## Versioning
This repositories follows the same branch versioning as the main [Godot Engine
repository](https://github.com/godotengine/godot):
This repositories follows the same branch versioning as the main [Pandemonium Engine
repository](https://github.com/pandemoniumengine/pandemonium):
- `master` tracks the current development branch.
- `3.x` tracks the development of the next 3.x minor release.
@ -18,15 +18,15 @@ repository](https://github.com/godotengine/godot):
in the corresponding branch.
Stable releases are also tagged on this repository:
[**Tags**](https://github.com/godotengine/godot-cpp/tags).
[**Tags**](https://github.com/pandemoniumengine/pandemonium-cpp/tags).
**For any project built against a stable release of Godot, we recommend using
**For any project built against a stable release of Pandemonium, we recommend using
this repository as a Git submodule, checking out the specific tag matching your
Godot version.**
Pandemonium version.**
> As the `master` and `3.x` branches are constantly getting updates, if you are
> using `godot-cpp` against a more current version of Godot, see the instructions
> in [**pandemonium_headers**](https://github.com/godotengine/pandemonium_headers) for
> using `pandemonium-cpp` against a more current version of Pandemonium, see the instructions
> in [**pandemonium_headers**](https://github.com/pandemoniumengine/pandemonium_headers) for
> updating the relevant files.
## Contributing
@ -34,15 +34,15 @@ Godot version.**
We greatly appreciate help in maintaining and extending this project. If you
wish to help out, ensure you have an account on GitHub and create a "fork" of
this repository. Rémi "Akien" Verschelde wrote an excellent bit of documentation
for the main Godot project on this:
[Pull request workflow](https://docs.godotengine.org/en/stable/community/contributing/pr_workflow.html)
for the main Pandemonium project on this:
[Pull request workflow](https://docs.pandemoniumengine.org/en/stable/community/contributing/pr_workflow.html)
Please install clang-format and copy the files in `misc/hooks` into `.git/hooks`
so formatting is done before your changes are submitted.
## Getting Started
| **Build latest version of Godot** | [**GitHub**](https://github.com/godotengine/godot) | [**Docs**](https://godot.readthedocs.io/en/latest/development/compiling/index.html) |
| **Build latest version of Pandemonium** | [**GitHub**](https://github.com/pandemoniumengine/pandemonium) | [**Docs**](https://pandemonium.readthedocs.io/en/latest/development/compiling/index.html) |
| --- | --- | --- |
### Setting up a new project
@ -50,27 +50,27 @@ so formatting is done before your changes are submitted.
We recommend using Git for managing your project. The instructions below assume
you're using Git. Alternatively, you can download the source code directly from
GitHub. In this case, you need to download both
[godot-cpp](https://github.com/godotengine/godot-cpp) and
[pandemonium_headers](https://github.com/godotengine/pandemonium_headers).
[pandemonium-cpp](https://github.com/pandemoniumengine/pandemonium-cpp) and
[pandemonium_headers](https://github.com/pandemoniumengine/pandemonium_headers).
```bash
mkdir SimpleLibrary
cd SimpleLibrary
mkdir bin
mkdir src
git clone --recursive https://github.com/godotengine/godot-cpp
git clone --recursive https://github.com/pandemoniumengine/pandemonium-cpp
```
If you wish to use a specific branch, add the -b option to the clone command:
```bash
git clone --recursive https://github.com/godotengine/godot-cpp -b 3.0
git clone --recursive https://github.com/pandemoniumengine/pandemonium-cpp -b 3.0
```
If your project is an existing repository, use a Git submodule instead:
```bash
git submodule add https://github.com/godotengine/godot-cpp
git submodule add https://github.com/pandemoniumengine/pandemonium-cpp
git submodule update --init --recursive
```
@ -78,7 +78,7 @@ Right now, our directory structure should look like this:
```text
SimpleLibrary/
├─godot-cpp/
├─pandemonium-cpp/
| └─pandemonium_headers/
├─bin/
└─src/
@ -87,18 +87,18 @@ SimpleLibrary/
### Updating the `api.json` file
Our `api.json` file contains metadata for all the classes that are part of the
Godot core. This metadata is required to generate the C++ binding classes for
Pandemonium core. This metadata is required to generate the C++ binding classes for
use in GDNative modules.
This file is supplied with our
[pandemonium_headers](https://github.com/godotengine/pandemonium_headers) repository
for your convenience. However, if you're running a custom build of Godot and
[pandemonium_headers](https://github.com/pandemoniumengine/pandemonium_headers) repository
for your convenience. However, if you're running a custom build of Pandemonium and
need access to classes that have recent changes, you must generate a new
`api.json` file. You do this by starting your Godot executable with the
`api.json` file. You do this by starting your Pandemonium executable with the
following parameters:
```bash
godot --gdnative-generate-json-api api.json
pandemonium --gdnative-generate-json-api api.json
```
Now copy the `api.json` file into your folder structure to make it easier to
@ -112,7 +112,7 @@ is required to tell SCons where to find your file.
The final step is to compile our C++ bindings library:
```bash
cd godot-cpp
cd pandemonium-cpp
scons platform=<your platform> generate_bindings=yes
cd ..
```
@ -121,7 +121,7 @@ Replace `<your platform>` with either `windows`, `linux`, `osx` or `android`. If
you leave out `platform`, the target platform will automatically be detected
from the host platform.
The resulting library will be created in `godot-cpp/bin/`, take note of its name
The resulting library will be created in `pandemonium-cpp/bin/`, take note of its name
as it'll differ depending on the target platform.
#### Compiling for Android
@ -156,21 +156,21 @@ You can optionally add the following options to the SCons command line:
Create `init.cpp` under `SimpleLibrary/src/` and add the following code:
```cpp
#include <Godot.hpp>
#include <Pandemonium.hpp>
#include <Reference.hpp>
using namespace godot;
using namespace pandemonium;
class SimpleClass : public Reference {
GODOT_CLASS(SimpleClass, Reference);
PANDEMONIUM_CLASS(SimpleClass, Reference);
public:
SimpleClass() { }
/** `_init` must exist as it is called by Godot. */
/** `_init` must exist as it is called by Pandemonium. */
void _init() { }
void test_void_method() {
Godot::print("This is test");
Pandemonium::print("This is test");
}
Variant method(Variant arg) {
@ -194,7 +194,7 @@ public:
/** Registering a signal: **/
// register_signal<SimpleClass>("signal_name");
// register_signal<SimpleClass>("signal_name", "string_argument", GODOT_VARIANT_TYPE_STRING)
// register_signal<SimpleClass>("signal_name", "string_argument", PANDEMONIUM_VARIANT_TYPE_STRING)
}
String _name;
@ -211,19 +211,19 @@ public:
/** GDNative Initialize **/
extern "C" void GDN_EXPORT pandemonium_gdnative_init(pandemonium_gdnative_init_options *o) {
godot::Godot::gdnative_init(o);
pandemonium::Pandemonium::gdnative_init(o);
}
/** GDNative Terminate **/
extern "C" void GDN_EXPORT pandemonium_gdnative_terminate(pandemonium_gdnative_terminate_options *o) {
godot::Godot::gdnative_terminate(o);
pandemonium::Pandemonium::gdnative_terminate(o);
}
/** NativeScript Initialize **/
extern "C" void GDN_EXPORT pandemonium_nativescript_init(void *handle) {
godot::Godot::nativescript_init(handle);
pandemonium::Pandemonium::nativescript_init(handle);
godot::register_class<SimpleClass>();
pandemonium::register_class<SimpleClass>();
}
```
@ -235,11 +235,11 @@ Once you've compiled the GDNative C++ bindings (see above), you can compile the
```bash
cd SimpleLibrary
clang++ -fPIC -o src/init.o -c src/init.cpp -g -O3 -std=c++14 -Igodot-cpp/include -Igodot-cpp/include/core -Igodot-cpp/include/gen -Igodot-cpp/pandemonium_headers
clang++ -o bin/libtest.so -shared src/init.o -Lgodot-cpp/bin -l<name of the godot-cpp>
clang++ -fPIC -o src/init.o -c src/init.cpp -g -O3 -std=c++14 -Ipandemonium-cpp/include -Ipandemonium-cpp/include/core -Ipandemonium-cpp/include/gen -Ipandemonium-cpp/pandemonium_headers
clang++ -o bin/libtest.so -shared src/init.o -Lpandemonium-cpp/bin -l<name of the pandemonium-cpp>
```
You'll need to replace `<name of the godot-cpp>` with the file that was created in [**Compiling the cpp bindings library**](#compiling-the-cpp-bindings-library).
You'll need to replace `<name of the pandemonium-cpp>` with the file that was created in [**Compiling the cpp bindings library**](#compiling-the-cpp-bindings-library).
This creates the file `libtest.so` in your `SimpleLibrary/bin` directory.
@ -247,11 +247,11 @@ This creates the file `libtest.so` in your `SimpleLibrary/bin` directory.
```bash
cd SimpleLibrary
cl /Fosrc/init.obj /c src/init.cpp /nologo -EHsc -DNDEBUG /MDd /Igodot-cpp\include /Igodot-cpp\include\core /Igodot-cpp\include\gen /Igodot-cpp\pandemonium_headers
link /nologo /dll /out:bin\libtest.dll /implib:bin\libsimple.lib src\init.obj godot-cpp\bin\<name of the godot-cpp>
cl /Fosrc/init.obj /c src/init.cpp /nologo -EHsc -DNDEBUG /MDd /Ipandemonium-cpp\include /Ipandemonium-cpp\include\core /Ipandemonium-cpp\include\gen /Ipandemonium-cpp\pandemonium_headers
link /nologo /dll /out:bin\libtest.dll /implib:bin\libsimple.lib src\init.obj pandemonium-cpp\bin\<name of the pandemonium-cpp>
```
You'll need to replace `<name of the godot-cpp>` with the file that was created
You'll need to replace `<name of the pandemonium-cpp>` with the file that was created
in [**Compiling the cpp bindingslibrary**](#compiling-the-cpp-bindings-library).
Replace `/MDd` with `/MD` to create a release build, which will run faster and
be smaller.
@ -270,11 +270,11 @@ submit a pull request :slightly_smiling_face:
```bash
cd SimpleLibrary
aarch64-linux-android29-clang++ -fPIC -o src/init.o -c src/init.cpp -g -O3 -std=c++14 -Igodot-cpp/include -Igodot-cpp/include/core -Igodot-cpp/include/gen -Igodot-cpp/pandemonium_headers
aarch64-linux-android29-clang++ -o bin/libtest.so -shared src/init.o -Lgodot-cpp/bin -l<name of the godot-cpp>
aarch64-linux-android29-clang++ -fPIC -o src/init.o -c src/init.cpp -g -O3 -std=c++14 -Ipandemonium-cpp/include -Ipandemonium-cpp/include/core -Ipandemonium-cpp/include/gen -Ipandemonium-cpp/pandemonium_headers
aarch64-linux-android29-clang++ -o bin/libtest.so -shared src/init.o -Lpandemonium-cpp/bin -l<name of the pandemonium-cpp>
```
You'll need to replace `<name of the godot-cpp>` with the file that was created in [**Compiling the cpp bindings library**](#compiling-the-cpp-bindings-library). The command above targets `arm64v8`. To target `armv7`, use `armv7a-linux-androideabi29-clang++` instead of `aarch64-linux-android29-clang++`.
You'll need to replace `<name of the pandemonium-cpp>` with the file that was created in [**Compiling the cpp bindings library**](#compiling-the-cpp-bindings-library). The command above targets `arm64v8`. To target `armv7`, use `armv7a-linux-androideabi29-clang++` instead of `aarch64-linux-android29-clang++`.
This creates the file `libtest.so` in your `SimpleLibrary/bin` directory.
@ -284,30 +284,30 @@ GDNative isn't supported on iOS yet. This is because iOS only allows linking
static libraries, not dynamic libraries. In theory, it would be possible to link
a GDNative library statically, but some of GDNative's convenience would be lost
in the process as one would have to recompile the engine on every change. See
[issue #30](https://github.com/godotengine/pandemonium_headers/issues/30) in the
Godot headers repository for more information.
[issue #30](https://github.com/pandemoniumengine/pandemonium_headers/issues/30) in the
Pandemonium headers repository for more information.
#### HTML5
GDNative is supported on [specific exports](https://docs.godotengine.org/en/latest/tutorials/export/exporting_for_web.html#export-options) for the HTML5 platform since Godot `3.3`. Linking webassembly modules is currently underspecified in the standard, but [emscripten](https://emscripten.org/), which Godot uses to build the HTML5 version, implements its own linking system.
GDNative is supported on [specific exports](https://docs.pandemoniumengine.org/en/latest/tutorials/export/exporting_for_web.html#export-options) for the HTML5 platform since Pandemonium `3.3`. Linking webassembly modules is currently underspecified in the standard, but [emscripten](https://emscripten.org/), which Pandemonium uses to build the HTML5 version, implements its own linking system.
To build GDNative libraries, you will need a recent version of [Emscripten](https://emscripten.org/).
```bash
cd SimpleLibrary
emcc -o bin/libtest.wasm -g -O3 -s SIDE_MODULE=1 src/init.cpp godot-cpp/bin/<name of the godot-cpp> -Igodot-cpp/include -Igodot-cpp/include/core -Igodot-cpp/include/gen -Igodot-cpp/pandemonium_headers
emcc -o bin/libtest.wasm -g -O3 -s SIDE_MODULE=1 src/init.cpp pandemonium-cpp/bin/<name of the pandemonium-cpp> -Ipandemonium-cpp/include -Ipandemonium-cpp/include/core -Ipandemonium-cpp/include/gen -Ipandemonium-cpp/pandemonium_headers
```
You'll need to replace `<name of the godot-cpp>` with the file that was created in [**Compiling the cpp bindings library**](#compiling-the-cpp-bindings-library).
You'll need to replace `<name of the pandemonium-cpp>` with the file that was created in [**Compiling the cpp bindings library**](#compiling-the-cpp-bindings-library).
This creates the file `libtest.so` in your `SimpleLibrary/bin` directory.
### Creating `.gdnlib` and `.gdns` files
Follow the instructions in
[pandemonium_headers/README.md](https://github.com/godotengine/pandemonium_headers/blob/master/README.md#how-do-i-use-native-scripts-from-the-editor)
[pandemonium_headers/README.md](https://github.com/pandemoniumengine/pandemonium_headers/blob/master/README.md#how-do-i-use-native-scripts-from-the-editor)
to create the `.gdns` file. This file contains paths to GDNative libraries for
various platforms. This makes the library usable from Godot in a
various platforms. This makes the library usable from Pandemonium in a
platform-independent manner.
### Implementing with GDScript
@ -319,9 +319,9 @@ var simpleclass = load("res://simpleclass.gdns").new()
simpleclass.method("Test argument")
```
### Using Godot classes in C++
### Using Pandemonium classes in C++
Godot expects you to manage its classes the same way the engine does. These rules apply to all Godot classes, including your NativeScripts, but not to any normal C++ classes used in your library.
Pandemonium expects you to manage its classes the same way the engine does. These rules apply to all Pandemonium classes, including your NativeScripts, but not to any normal C++ classes used in your library.
- Instantiate Objects using `_new()`, not C++'s `new` operator.
@ -359,7 +359,7 @@ MeshInstance *m = Object::cast_to<MeshInstance>(get_node("ChildNode"));
if (m) { ... }
```
- **Never** use Godot types in static or global variables. The Godot API isn't loaded until after their constructors are called.
- **Never** use Pandemonium types in static or global variables. The Pandemonium API isn't loaded until after their constructors are called.
```cpp
String s; // crashes

View File

@ -128,7 +128,7 @@ opts.Add(EnumVariable("target", "Compilation target", "debug", allowed_values=("
opts.Add(
PathVariable(
"headers_dir",
"Path to the directory containing Godot headers",
"Path to the directory containing Pandemonium headers",
"pandemonium_headers",
PathVariable.PathIsDir,
)
@ -171,7 +171,7 @@ opts.Add(
)
)
opts.Add(BoolVariable("build_library", "Build the godot-cpp library.", True))
opts.Add(BoolVariable("build_library", "Build the pandemonium-cpp library.", True))
opts.Update(env)
Help(opts.GenerateHelpText(env))
@ -514,7 +514,7 @@ env["arch_suffix"] = arch_suffix
library = None
env["OBJSUFFIX"] = ".{}.{}.{}{}".format(env["platform"], env["target"], arch_suffix, env["OBJSUFFIX"])
library_name = "libgodot-cpp.{}.{}.{}{}".format(env["platform"], env["target"], arch_suffix, env["LIBSUFFIX"])
library_name = "libpandemonium-cpp.{}.{}.{}{}".format(env["platform"], env["target"], arch_suffix, env["LIBSUFFIX"])
if env["build_library"]:
library = env.StaticLibrary(target=env.File("bin/%s" % library_name), source=sources)

View File

@ -128,8 +128,8 @@ def make_gdnative_type(t, ref_allowed):
def generate_class_header(used_classes, c, use_template_get_node):
source = []
source.append("#ifndef GODOT_CPP_" + strip_name(c["name"]).upper() + "_HPP")
source.append("#define GODOT_CPP_" + strip_name(c["name"]).upper() + "_HPP")
source.append("#ifndef PANDEMONIUM_CPP_" + strip_name(c["name"]).upper() + "_HPP")
source.append("#define PANDEMONIUM_CPP_" + strip_name(c["name"]).upper() + "_HPP")
source.append("")
source.append("")
@ -141,7 +141,7 @@ def generate_class_header(used_classes, c, use_template_get_node):
class_name = strip_name(c["name"])
# Ref<T> is not included in object.h in Godot either,
# Ref<T> is not included in object.h in Pandemonium either,
# so don't include it here because it's not needed
if class_name != "Object" and class_name != "Reference":
source.append("#include <core/Ref.hpp>")
@ -169,7 +169,7 @@ def generate_class_header(used_classes, c, use_template_get_node):
if c["base_class"] != "":
source.append('#include "' + strip_name(c["base_class"]) + '.hpp"')
source.append("namespace godot {")
source.append("namespace pandemonium {")
source.append("")
for used_type in used_classes:
@ -229,7 +229,7 @@ def generate_class_header(used_classes, c, use_template_get_node):
source.append("\t}")
source.append("")
# godot::api->pandemonium_global_get_singleton((char *) \"" + strip_name(c["name"]) + "\");"
# pandemonium::api->pandemonium_global_get_singleton((char *) \"" + strip_name(c["name"]) + "\");"
# class name:
# Two versions needed needed because when the user implements a custom class,
@ -244,7 +244,7 @@ def generate_class_header(used_classes, c, use_template_get_node):
)
source.append(
"\tstatic inline Object *___get_from_variant(Variant a) { pandemonium_object *o = (pandemonium_object*) a; return (o) ? (Object *) godot::nativescript_api->pandemonium_nativescript_get_instance_binding_data(godot::_RegisterState::language_index, o) : nullptr; }"
"\tstatic inline Object *___get_from_variant(Variant a) { pandemonium_object *o = (pandemonium_object*) a; return (o) ? (Object *) pandemonium::nativescript_api->pandemonium_nativescript_get_instance_binding_data(pandemonium::_RegisterState::language_index, o) : nullptr; }"
)
enum_values = []
@ -271,7 +271,7 @@ def generate_class_header(used_classes, c, use_template_get_node):
source.append("\n\t// methods")
if class_name == "Object":
source.append("#ifndef GODOT_CPP_NO_OBJECT_CAST")
source.append("#ifndef PANDEMONIUM_CPP_NO_OBJECT_CAST")
source.append("\ttemplate<class T>")
source.append("\tstatic T *cast_to(const Object *obj);")
source.append("#endif")
@ -422,11 +422,11 @@ def generate_class_implementation(icalls, used_classes, c, use_template_get_node
source.append("")
source.append("")
source.append("#include <core/GodotGlobal.hpp>")
source.append("#include <core/PandemoniumGlobal.hpp>")
source.append("#include <core/CoreTypes.hpp>")
source.append("#include <core/Ref.hpp>")
source.append("#include <core/Godot.hpp>")
source.append("#include <core/Pandemonium.hpp>")
source.append("")
source.append('#include "__icalls.hpp"')
@ -442,7 +442,7 @@ def generate_class_implementation(icalls, used_classes, c, use_template_get_node
source.append("")
source.append("")
source.append("namespace godot {")
source.append("namespace pandemonium {")
core_object_name = "this"
@ -456,7 +456,7 @@ def generate_class_implementation(icalls, used_classes, c, use_template_get_node
# FIXME Test if inlining has a huge impact on binary size
source.append(class_name + "::" + class_name + "() {")
source.append('\t_owner = godot::api->pandemonium_global_get_singleton((char *) "' + strip_name(c["name"]) + '");')
source.append('\t_owner = pandemonium::api->pandemonium_global_get_singleton((char *) "' + strip_name(c["name"]) + '");')
source.append("}")
source.append("")
@ -475,7 +475,7 @@ def generate_class_implementation(icalls, used_classes, c, use_template_get_node
source.append(
"\t___mb.mb_"
+ method["name"]
+ ' = godot::api->pandemonium_method_bind_get_method("'
+ ' = pandemonium::api->pandemonium_method_bind_get_method("'
+ c["name"]
+ '", "'
+ ("get_node" if use_template_get_node and method["name"] == "get_node_internal" else method["name"])
@ -483,9 +483,9 @@ def generate_class_implementation(icalls, used_classes, c, use_template_get_node
)
source.append("\tpandemonium_string_name class_name;")
source.append('\tgodot::api->pandemonium_string_name_new_data_char(&class_name, "' + c["name"] + '");')
source.append("\t_detail_class_tag = godot::api->pandemonium_get_class_tag(&class_name);")
source.append("\tgodot::api->pandemonium_string_name_destroy(&class_name);")
source.append('\tpandemonium::api->pandemonium_string_name_new_data_char(&class_name, "' + c["name"] + '");')
source.append("\t_detail_class_tag = pandemonium::api->pandemonium_get_class_tag(&class_name);")
source.append("\tpandemonium::api->pandemonium_string_name_destroy(&class_name);")
source.append("}")
source.append("")
@ -496,7 +496,7 @@ def generate_class_implementation(icalls, used_classes, c, use_template_get_node
source.append(
"\treturn ("
+ class_name
+ ' *) godot::nativescript_api->pandemonium_nativescript_get_instance_binding_data(godot::_RegisterState::language_index, godot::api->pandemonium_get_class_constructor((char *)"'
+ ' *) pandemonium::nativescript_api->pandemonium_nativescript_get_instance_binding_data(pandemonium::_RegisterState::language_index, pandemonium::api->pandemonium_get_class_constructor((char *)"'
+ c["name"]
+ '")());'
)
@ -526,7 +526,7 @@ def generate_class_implementation(icalls, used_classes, c, use_template_get_node
if method["name"] == "free":
# dirty hack because Object::free is marked virtual but doesn't actually exist...
source.append("\tgodot::api->pandemonium_object_destroy(_owner);")
source.append("\tpandemonium::api->pandemonium_object_destroy(_owner);")
source.append("}")
source.append("")
continue
@ -560,7 +560,7 @@ def generate_class_implementation(icalls, used_classes, c, use_template_get_node
source.append("\tVariant __given_args[" + str(len(method["arguments"])) + "];")
for i, argument in enumerate(method["arguments"]):
source.append("\tgodot::api->pandemonium_variant_new_nil((pandemonium_variant *) &__given_args[" + str(i) + "]);")
source.append("\tpandemonium::api->pandemonium_variant_new_nil((pandemonium_variant *) &__given_args[" + str(i) + "]);")
source.append("")
@ -599,7 +599,7 @@ def generate_class_implementation(icalls, used_classes, c, use_template_get_node
source.append("\tVariant __result;")
source.append(
"\t*(pandemonium_variant *) &__result = godot::api->pandemonium_method_bind_call(___mb.mb_"
"\t*(pandemonium_variant *) &__result = pandemonium::api->pandemonium_method_bind_call(___mb.mb_"
+ method["name"]
+ ", ((const Object *) "
+ core_object_name
@ -618,7 +618,7 @@ def generate_class_implementation(icalls, used_classes, c, use_template_get_node
source.append("")
for i, argument in enumerate(method["arguments"]):
source.append("\tgodot::api->pandemonium_variant_destroy((pandemonium_variant *) &__given_args[" + str(i) + "]);")
source.append("\tpandemonium::api->pandemonium_variant_destroy((pandemonium_variant *) &__given_args[" + str(i) + "]);")
source.append("")
@ -677,8 +677,8 @@ def generate_class_implementation(icalls, used_classes, c, use_template_get_node
def generate_icall_header(icalls):
source = []
source.append("#ifndef GODOT_CPP__ICALLS_HPP")
source.append("#define GODOT_CPP__ICALLS_HPP")
source.append("#ifndef PANDEMONIUM_CPP__ICALLS_HPP")
source.append("#define PANDEMONIUM_CPP__ICALLS_HPP")
source.append("")
@ -686,13 +686,13 @@ def generate_icall_header(icalls):
source.append("#include <stdint.h>")
source.append("")
source.append("#include <core/GodotGlobal.hpp>")
source.append("#include <core/PandemoniumGlobal.hpp>")
source.append("#include <core/CoreTypes.hpp>")
source.append('#include "Object.hpp"')
source.append("")
source.append("")
source.append("namespace godot {")
source.append("namespace pandemonium {")
source.append("")
for icall in icalls:
@ -749,7 +749,7 @@ def generate_icall_header(icalls):
source.append("")
source.append(
"\tgodot::api->pandemonium_method_bind_ptrcall(mb, inst->_owner, args, "
"\tpandemonium::api->pandemonium_method_bind_ptrcall(mb, inst->_owner, args, "
+ ("nullptr" if ret_type == "void" else "&ret")
+ ");"
)
@ -758,7 +758,7 @@ def generate_icall_header(icalls):
if is_class_type(ret_type):
source.append("\tif (ret) {")
source.append(
"\t\treturn (Object *) godot::nativescript_api->pandemonium_nativescript_get_instance_binding_data(godot::_RegisterState::language_index, ret);"
"\t\treturn (Object *) pandemonium::nativescript_api->pandemonium_nativescript_get_instance_binding_data(pandemonium::_RegisterState::language_index, ret);"
)
source.append("\t}")
source.append("")
@ -790,7 +790,7 @@ def generate_type_registry(classes):
source.append("")
source.append("")
source.append("namespace godot {")
source.append("namespace pandemonium {")
source.append("void ___register_types()")
source.append("{")
@ -807,7 +807,7 @@ def generate_type_registry(classes):
base_class_type_hash = "0"
source.append(
'\tgodot::_TagDB::register_global_type("'
'\tpandemonium::_TagDB::register_global_type("'
+ c["name"]
+ '", '
+ class_type_hash
@ -833,7 +833,7 @@ def generate_init_method_bindings(classes):
source.append("")
source.append("")
source.append("namespace godot {")
source.append("namespace pandemonium {")
source.append("void ___init_method_bindings()")
source.append("{")

View File

@ -2,11 +2,11 @@
/* AABB.hpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/* PANDEMONIUM ENGINE */
/* https://pandemoniumengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
/* Copyright (c) 2014-2022 Pandemonium Engine contributors (cf. AUTHORS.md). */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@ -35,7 +35,7 @@
#include <cstdlib>
namespace godot {
namespace pandemonium {
class Plane;
@ -105,6 +105,6 @@ public:
}
};
} // namespace godot
} // namespace pandemonium
#endif // RECT3_H

View File

@ -2,11 +2,11 @@
/* Array.hpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/* PANDEMONIUM ENGINE */
/* https://pandemoniumengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
/* Copyright (c) 2014-2022 Pandemonium Engine contributors (cf. AUTHORS.md). */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@ -33,7 +33,7 @@
#include <gdn/array.h>
namespace godot {
namespace pandemonium {
class String;
@ -186,6 +186,6 @@ public:
~Array();
};
} // namespace godot
} // namespace pandemonium
#endif // ARRAY_H

View File

@ -2,11 +2,11 @@
/* Basis.hpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/* PANDEMONIUM ENGINE */
/* https://pandemoniumengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
/* Copyright (c) 2014-2022 Pandemonium Engine contributors (cf. AUTHORS.md). */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@ -37,7 +37,7 @@
#include "Vector3.hpp"
namespace godot {
namespace pandemonium {
class Quaternion;
@ -453,6 +453,6 @@ public:
operator Quaternion() const;
};
} // namespace godot
} // namespace pandemonium
#endif // BASIS_H

View File

@ -2,11 +2,11 @@
/* Color.hpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/* PANDEMONIUM ENGINE */
/* https://pandemoniumengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
/* Copyright (c) 2014-2022 Pandemonium Engine contributors (cf. AUTHORS.md). */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@ -38,7 +38,7 @@
#include "Defs.hpp"
#include "String.hpp"
namespace godot {
namespace pandemonium {
struct Color {
private:
@ -166,6 +166,6 @@ public:
}
};
} // namespace godot
} // namespace pandemonium
#endif // COLOR_H

View File

@ -2,11 +2,11 @@
/* CoreTypes.hpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/* PANDEMONIUM ENGINE */
/* https://pandemoniumengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
/* Copyright (c) 2014-2022 Pandemonium Engine contributors (cf. AUTHORS.md). */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */

View File

@ -2,11 +2,11 @@
/* Defs.hpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/* PANDEMONIUM ENGINE */
/* https://pandemoniumengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
/* Copyright (c) 2014-2022 Pandemonium Engine contributors (cf. AUTHORS.md). */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@ -31,7 +31,7 @@
#ifndef DEFS_H
#define DEFS_H
namespace godot {
namespace pandemonium {
enum class Error {
OK,
@ -85,9 +85,9 @@ enum class Error {
ERR_PRINTER_ON_FIRE, /// the parallel port printer is engulfed in flames
};
} // namespace godot
} // namespace pandemonium
#include <GodotGlobal.hpp>
#include <PandemoniumGlobal.hpp>
// alloca() is non-standard. When using MSVC, it's in malloc.h.
#if defined(__linux__) || defined(__APPLE__)
@ -98,7 +98,7 @@ enum class Error {
typedef float real_t;
// This epsilon should match the one used by Godot for consistency.
// This epsilon should match the one used by Pandemonium for consistency.
// Using `f` when `real_t` is float.
#define CMP_EPSILON 0.00001f
#define CMP_EPSILON2 (CMP_EPSILON * CMP_EPSILON)
@ -132,7 +132,7 @@ typedef float real_t;
// ERR/WARN macros
#ifndef WARN_PRINT
#define WARN_PRINT(msg) godot::Godot::print_warning(msg, __func__, __FILE__, __LINE__)
#define WARN_PRINT(msg) pandemonium::Pandemonium::print_warning(msg, __func__, __FILE__, __LINE__)
#endif
#ifndef WARN_PRINTS
@ -140,7 +140,7 @@ typedef float real_t;
#endif
#ifndef ERR_PRINT
#define ERR_PRINT(msg) godot::Godot::print_error(msg, __func__, __FILE__, __LINE__)
#define ERR_PRINT(msg) pandemonium::Pandemonium::print_error(msg, __func__, __FILE__, __LINE__)
#endif
#ifndef ERR_PRINTS
@ -148,19 +148,19 @@ typedef float real_t;
#endif
#ifndef FATAL_PRINT
#define FATAL_PRINT(msg) ERR_PRINT(godot::String("FATAL: ") + (msg))
#define FATAL_PRINT(msg) ERR_PRINT(pandemonium::String("FATAL: ") + (msg))
#endif
#ifndef ERR_MSG_INDEX
#define ERR_MSG_INDEX(index, size) (godot::String("Index ") + #index + "=" + godot::String::num_int64(index) + " out of size (" + #size + "=" + godot::String::num_int64(size) + ")")
#define ERR_MSG_INDEX(index, size) (pandemonium::String("Index ") + #index + "=" + pandemonium::String::num_int64(index) + " out of size (" + #size + "=" + pandemonium::String::num_int64(size) + ")")
#endif
#ifndef ERR_MSG_NULL
#define ERR_MSG_NULL(param) (godot::String("Parameter '") + #param + "' is null.")
#define ERR_MSG_NULL(param) (pandemonium::String("Parameter '") + #param + "' is null.")
#endif
#ifndef ERR_MSG_COND
#define ERR_MSG_COND(cond) (godot::String("Condition '") + #cond + "' is true.")
#define ERR_MSG_COND(cond) (pandemonium::String("Condition '") + #cond + "' is true.")
#endif
#ifndef ERR_FAIL_INDEX

View File

@ -2,11 +2,11 @@
/* Dictionary.hpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/* PANDEMONIUM ENGINE */
/* https://pandemoniumengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
/* Copyright (c) 2014-2022 Pandemonium Engine contributors (cf. AUTHORS.md). */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@ -36,7 +36,7 @@
#include <gdn/dictionary.h>
namespace godot {
namespace pandemonium {
class Variant;
@ -85,6 +85,6 @@ public:
~Dictionary();
};
} // namespace godot
} // namespace pandemonium
#endif // DICTIONARY_H

View File

@ -1,12 +1,12 @@
/*************************************************************************/
/* Godot.hpp */
/* Pandemonium.hpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/* PANDEMONIUM ENGINE */
/* https://pandemoniumengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
/* Copyright (c) 2014-2022 Pandemonium Engine contributors (cf. AUTHORS.md). */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@ -28,8 +28,8 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#ifndef GODOT_HPP
#define GODOT_HPP
#ifndef PANDEMONIUM_HPP
#define PANDEMONIUM_HPP
#include <cstdlib>
#include <cstring>
@ -45,62 +45,62 @@
#include "Object.hpp"
#include "GodotGlobal.hpp"
#include "PandemoniumGlobal.hpp"
#include <type_traits>
namespace godot {
namespace pandemonium {
namespace detail {
// Godot classes are wrapped by heap-allocated instances mimicking them through the C API.
// Pandemonium classes are wrapped by heap-allocated instances mimicking them through the C API.
// They all inherit `_Wrapped`.
template <class T>
T *get_wrapper(pandemonium_object *obj) {
return (T *)godot::nativescript_api->pandemonium_nativescript_get_instance_binding_data(godot::_RegisterState::language_index, obj);
return (T *)pandemonium::nativescript_api->pandemonium_nativescript_get_instance_binding_data(pandemonium::_RegisterState::language_index, obj);
}
// Custom class instances are not obtainable by just casting the pointer to the base class they inherit,
// partly because in Godot, scripts are not instances of the classes themselves, they are only attached to them.
// partly because in Pandemonium, scripts are not instances of the classes themselves, they are only attached to them.
// Yet we want to "fake" it as if they were the same entity.
template <class T>
T *get_custom_class_instance(const Object *obj) {
return (obj) ? (T *)godot::nativescript_api->pandemonium_nativescript_get_userdata(obj->_owner) : nullptr;
return (obj) ? (T *)pandemonium::nativescript_api->pandemonium_nativescript_get_userdata(obj->_owner) : nullptr;
}
template <class T>
inline T *create_custom_class_instance() {
// Usually, script instances hold a reference to their NativeScript resource.
// that resource is obtained from a `.gdns` file, which in turn exists because
// of the resource system of Godot. We can't cleanly hardcode that here,
// of the resource system of Pandemonium. We can't cleanly hardcode that here,
// so the easiest for now (though not really clean) is to create new resource instances,
// individually attached to the script instances.
// We cannot use wrappers because of https://github.com/godotengine/godot/issues/39181
// godot::NativeScript *script = godot::NativeScript::_new();
// script->set_library(get_wrapper<godot::GDNativeLibrary>((pandemonium_object *)godot::gdnlib));
// We cannot use wrappers because of https://github.com/pandemoniumengine/pandemonium/issues/39181
// pandemonium::NativeScript *script = pandemonium::NativeScript::_new();
// script->set_library(get_wrapper<pandemonium::GDNativeLibrary>((pandemonium_object *)pandemonium::gdnlib));
// script->set_class_name(T::___get_class_name());
static_assert(T::___CLASS_IS_SCRIPT, "This function must only be used on custom classes");
// So we use the C API directly.
static pandemonium_class_constructor script_constructor = godot::api->pandemonium_get_class_constructor("NativeScript");
static pandemonium_method_bind *mb_set_library = godot::api->pandemonium_method_bind_get_method("NativeScript", "set_library");
static pandemonium_method_bind *mb_set_class_name = godot::api->pandemonium_method_bind_get_method("NativeScript", "set_class_name");
static pandemonium_class_constructor script_constructor = pandemonium::api->pandemonium_get_class_constructor("NativeScript");
static pandemonium_method_bind *mb_set_library = pandemonium::api->pandemonium_method_bind_get_method("NativeScript", "set_library");
static pandemonium_method_bind *mb_set_class_name = pandemonium::api->pandemonium_method_bind_get_method("NativeScript", "set_class_name");
pandemonium_object *script = script_constructor();
{
const void *args[] = { godot::gdnlib };
godot::api->pandemonium_method_bind_ptrcall(mb_set_library, script, args, nullptr);
const void *args[] = { pandemonium::gdnlib };
pandemonium::api->pandemonium_method_bind_ptrcall(mb_set_library, script, args, nullptr);
}
{
const String class_name = T::___get_class_name();
const void *args[] = { &class_name };
godot::api->pandemonium_method_bind_ptrcall(mb_set_class_name, script, args, nullptr);
pandemonium::api->pandemonium_method_bind_ptrcall(mb_set_class_name, script, args, nullptr);
}
// Now to instanciate T, we initially did this, however in case of Reference it returns a variant with refcount
// already initialized, which woud cause inconsistent behavior compared to other classes (we still have to return a pointer).
//Variant instance_variant = script->new_();
//T *instance = godot::get_custom_class_instance<T>(instance_variant);
//T *instance = pandemonium::get_custom_class_instance<T>(instance_variant);
// So we should do this instead, however while convenient, it uses unnecessary wrapper objects.
// Object *base_obj = T::___new_pandemonium_base();
@ -108,15 +108,15 @@ inline T *create_custom_class_instance() {
// return get_custom_class_instance<T>(base_obj);
// Again using the C API to do exactly what we have to do.
static pandemonium_class_constructor base_constructor = godot::api->pandemonium_get_class_constructor(T::___get_pandemonium_class_name());
static pandemonium_method_bind *mb_set_script = godot::api->pandemonium_method_bind_get_method("Object", "set_script");
static pandemonium_class_constructor base_constructor = pandemonium::api->pandemonium_get_class_constructor(T::___get_pandemonium_class_name());
static pandemonium_method_bind *mb_set_script = pandemonium::api->pandemonium_method_bind_get_method("Object", "set_script");
pandemonium_object *base_obj = base_constructor();
{
const void *args[] = { script };
godot::api->pandemonium_method_bind_ptrcall(mb_set_script, base_obj, args, nullptr);
pandemonium::api->pandemonium_method_bind_ptrcall(mb_set_script, base_obj, args, nullptr);
}
return (T *)godot::nativescript_api->pandemonium_nativescript_get_userdata(base_obj);
return (T *)pandemonium::nativescript_api->pandemonium_nativescript_get_userdata(base_obj);
}
} // namespace detail
@ -127,13 +127,13 @@ inline T *create_custom_class_instance() {
// Base: Name of the direct base class, with namespace if necessary
//
// ___get_class_name: Name of the class
// ___get_pandemonium_class_name: Name of the Godot base class this class inherits from (i.e not direct)
// ___get_pandemonium_class_name: Name of the Pandemonium base class this class inherits from (i.e not direct)
// _new: Creates a new instance of the class
// ___get_id: Gets the unique ID of the class. Godot and custom classes are both within that set.
// ___get_id: Gets the unique ID of the class. Pandemonium and custom classes are both within that set.
// ___get_base_id: Gets the ID of the direct base class, as returned by ___get_id
// ___get_base_class_name: Name of the direct base class
// ___get_from_variant: Converts a Variant into an Object*. Will be non-null if the class matches.
#define GODOT_CLASS(Name, Base) \
#define PANDEMONIUM_CLASS(Name, Base) \
\
public: \
inline static const char *___get_class_name() { return #Name; } \
@ -142,20 +142,20 @@ public:
return Base::___get_pandemonium_class_name(); \
} \
inline static Name *_new() { \
return godot::detail::create_custom_class_instance<Name>(); \
return pandemonium::detail::create_custom_class_instance<Name>(); \
} \
inline static size_t ___get_id() { return typeid(Name).hash_code(); } \
inline static size_t ___get_base_id() { return Base::___get_id(); } \
inline static const char *___get_base_class_name() { return Base::___get_class_name(); } \
inline static godot::Object *___get_from_variant(godot::Variant a) { \
return (godot::Object *)godot::detail::get_custom_class_instance<Name>( \
godot::Object::___get_from_variant(a)); \
inline static pandemonium::Object *___get_from_variant(pandemonium::Variant a) { \
return (pandemonium::Object *)pandemonium::detail::get_custom_class_instance<Name>( \
pandemonium::Object::___get_from_variant(a)); \
} \
\
private:
// Legacy compatibility
#define GODOT_SUBCLASS(Name, Base) GODOT_CLASS(Name, Base)
#define PANDEMONIUM_SUBCLASS(Name, Base) PANDEMONIUM_CLASS(Name, Base)
template <class T>
struct _ArgCast {
@ -207,10 +207,10 @@ void register_class() {
_TagDB::register_type(T::___get_id(), T::___get_base_id());
godot::nativescript_api->pandemonium_nativescript_register_class(godot::_RegisterState::nativescript_handle,
pandemonium::nativescript_api->pandemonium_nativescript_register_class(pandemonium::_RegisterState::nativescript_handle,
T::___get_class_name(), T::___get_base_class_name(), create, destroy);
godot::nativescript_api->pandemonium_nativescript_set_type_tag(godot::_RegisterState::nativescript_handle,
pandemonium::nativescript_api->pandemonium_nativescript_set_type_tag(pandemonium::_RegisterState::nativescript_handle,
T::___get_class_name(), (const void *)T::___get_id());
T::_register_methods();
@ -228,10 +228,10 @@ void register_tool_class() {
_TagDB::register_type(T::___get_id(), T::___get_base_id());
godot::nativescript_api->pandemonium_nativescript_register_tool_class(godot::_RegisterState::nativescript_handle,
pandemonium::nativescript_api->pandemonium_nativescript_register_tool_class(pandemonium::_RegisterState::nativescript_handle,
T::___get_class_name(), T::___get_base_class_name(), create, destroy);
godot::nativescript_api->pandemonium_nativescript_set_type_tag(godot::_RegisterState::nativescript_handle,
pandemonium::nativescript_api->pandemonium_nativescript_set_type_tag(pandemonium::_RegisterState::nativescript_handle,
T::___get_class_name(), (const void *)T::___get_id());
T::_register_methods();
@ -299,7 +299,7 @@ struct _WrappedMethod<T, void, As...> {
template <class T, class R, class... As>
pandemonium_variant __wrapped_method(pandemonium_object *, void *method_data, void *user_data, int /*num_args*/, pandemonium_variant **args) {
pandemonium_variant v;
godot::api->pandemonium_variant_new_nil(&v);
pandemonium::api->pandemonium_variant_new_nil(&v);
T *obj = (T *)user_data;
_WrappedMethod<T, R, As...> *method = (_WrappedMethod<T, R, As...> *)method_data;
@ -315,7 +315,7 @@ pandemonium_variant __wrapped_method(pandemonium_object *, void *method_data, vo
template <class T, class R, class... As>
void *___make_wrapper_function(R (T::*f)(As...)) {
using MethodType = _WrappedMethod<T, R, As...>;
MethodType *p = (MethodType *)godot::api->pandemonium_alloc(sizeof(MethodType));
MethodType *p = (MethodType *)pandemonium::api->pandemonium_alloc(sizeof(MethodType));
p->f = f;
return (void *)p;
}
@ -339,13 +339,13 @@ template <class M>
void register_method(const char *name, M method_ptr, pandemonium_method_rpc_mode rpc_type = PANDEMONIUM_METHOD_RPC_MODE_DISABLED) {
pandemonium_instance_method method = {};
method.method_data = ___make_wrapper_function(method_ptr);
method.free_func = godot::api->pandemonium_free;
method.free_func = pandemonium::api->pandemonium_free;
method.method = (__pandemonium_wrapper_method)___get_wrapper_function(method_ptr);
pandemonium_method_attributes attr = {};
attr.rpc_type = rpc_type;
godot::nativescript_api->pandemonium_nativescript_register_method(godot::_RegisterState::nativescript_handle,
pandemonium::nativescript_api->pandemonium_nativescript_register_method(pandemonium::_RegisterState::nativescript_handle,
___get_method_class_name(method_ptr), name, attr, method);
}
@ -379,7 +379,7 @@ struct _PropertyGetFunc {
T *obj = (T *)user_data;
pandemonium_variant var;
godot::api->pandemonium_variant_new_nil(&var);
pandemonium::api->pandemonium_variant_new_nil(&var);
Variant *v = (Variant *)&var;
@ -410,7 +410,7 @@ struct _PropertyDefaultGetFunc {
T *obj = (T *)user_data;
pandemonium_variant var;
godot::api->pandemonium_variant_new_nil(&var);
pandemonium::api->pandemonium_variant_new_nil(&var);
Variant *v = (Variant *)&var;
@ -455,24 +455,24 @@ void register_property(const char *name, P(T::*var), P default_value,
attr.hint_string = *_hint_string;
_PropertyDefaultSetFunc<T, P> *wrapped_set =
(_PropertyDefaultSetFunc<T, P> *)godot::api->pandemonium_alloc(sizeof(_PropertyDefaultSetFunc<T, P>));
(_PropertyDefaultSetFunc<T, P> *)pandemonium::api->pandemonium_alloc(sizeof(_PropertyDefaultSetFunc<T, P>));
wrapped_set->f = var;
_PropertyDefaultGetFunc<T, P> *wrapped_get =
(_PropertyDefaultGetFunc<T, P> *)godot::api->pandemonium_alloc(sizeof(_PropertyDefaultGetFunc<T, P>));
(_PropertyDefaultGetFunc<T, P> *)pandemonium::api->pandemonium_alloc(sizeof(_PropertyDefaultGetFunc<T, P>));
wrapped_get->f = var;
pandemonium_property_set_func set_func = {};
set_func.method_data = (void *)wrapped_set;
set_func.free_func = godot::api->pandemonium_free;
set_func.free_func = pandemonium::api->pandemonium_free;
set_func.set_func = &_PropertyDefaultSetFunc<T, P>::_wrapped_setter;
pandemonium_property_get_func get_func = {};
get_func.method_data = (void *)wrapped_get;
get_func.free_func = godot::api->pandemonium_free;
get_func.free_func = pandemonium::api->pandemonium_free;
get_func.get_func = &_PropertyDefaultGetFunc<T, P>::_wrapped_getter;
godot::nativescript_api->pandemonium_nativescript_register_property(godot::_RegisterState::nativescript_handle,
pandemonium::nativescript_api->pandemonium_nativescript_register_property(pandemonium::_RegisterState::nativescript_handle,
T::___get_class_name(), name, &attr, set_func, get_func);
}
@ -499,23 +499,23 @@ void register_property(const char *name, void (T::*setter)(P), P (T::*getter)(),
attr.usage = usage;
attr.hint_string = *_hint_string;
_PropertySetFunc<T, P> *wrapped_set = (_PropertySetFunc<T, P> *)godot::api->pandemonium_alloc(sizeof(_PropertySetFunc<T, P>));
_PropertySetFunc<T, P> *wrapped_set = (_PropertySetFunc<T, P> *)pandemonium::api->pandemonium_alloc(sizeof(_PropertySetFunc<T, P>));
wrapped_set->f = setter;
_PropertyGetFunc<T, P> *wrapped_get = (_PropertyGetFunc<T, P> *)godot::api->pandemonium_alloc(sizeof(_PropertyGetFunc<T, P>));
_PropertyGetFunc<T, P> *wrapped_get = (_PropertyGetFunc<T, P> *)pandemonium::api->pandemonium_alloc(sizeof(_PropertyGetFunc<T, P>));
wrapped_get->f = getter;
pandemonium_property_set_func set_func = {};
set_func.method_data = (void *)wrapped_set;
set_func.free_func = godot::api->pandemonium_free;
set_func.free_func = pandemonium::api->pandemonium_free;
set_func.set_func = &_PropertySetFunc<T, P>::_wrapped_setter;
pandemonium_property_get_func get_func = {};
get_func.method_data = (void *)wrapped_get;
get_func.free_func = godot::api->pandemonium_free;
get_func.free_func = pandemonium::api->pandemonium_free;
get_func.get_func = &_PropertyGetFunc<T, P>::_wrapped_getter;
godot::nativescript_api->pandemonium_nativescript_register_property(godot::_RegisterState::nativescript_handle,
pandemonium::nativescript_api->pandemonium_nativescript_register_property(pandemonium::_RegisterState::nativescript_handle,
T::___get_class_name(), name, &attr, set_func, get_func);
}
@ -538,7 +538,7 @@ void register_signal(String name, Dictionary args) {
// Need to check because malloc(0) is platform-dependent. Zero arguments will leave args to nullptr.
if (signal.num_args != 0) {
signal.args = (pandemonium_signal_argument *)godot::api->pandemonium_alloc(sizeof(pandemonium_signal_argument) * signal.num_args);
signal.args = (pandemonium_signal_argument *)pandemonium::api->pandemonium_alloc(sizeof(pandemonium_signal_argument) * signal.num_args);
memset((void *)signal.args, 0, sizeof(pandemonium_signal_argument) * signal.num_args);
}
@ -547,7 +547,7 @@ void register_signal(String name, Dictionary args) {
// String name = entry[0];
String name = args.keys()[i];
pandemonium_string *_key = (pandemonium_string *)&name;
godot::api->pandemonium_string_new_copy(&signal.args[i].name, _key);
pandemonium::api->pandemonium_string_new_copy(&signal.args[i].name, _key);
// if (entry.size() > 1) {
// signal.args[i].type = entry[1];
@ -555,15 +555,15 @@ void register_signal(String name, Dictionary args) {
signal.args[i].type = args.values()[i];
}
godot::nativescript_api->pandemonium_nativescript_register_signal(godot::_RegisterState::nativescript_handle,
pandemonium::nativescript_api->pandemonium_nativescript_register_signal(pandemonium::_RegisterState::nativescript_handle,
T::___get_class_name(), &signal);
for (int i = 0; i < signal.num_args; i++) {
godot::api->pandemonium_string_destroy(&signal.args[i].name);
pandemonium::api->pandemonium_string_destroy(&signal.args[i].name);
}
if (signal.args) {
godot::api->pandemonium_free(signal.args);
pandemonium::api->pandemonium_free(signal.args);
}
}
@ -579,20 +579,20 @@ void register_signal(String name) {
pandemonium_signal signal = {};
signal.name = *(pandemonium_string *)&name;
godot::nativescript_api->pandemonium_nativescript_register_signal(godot::_RegisterState::nativescript_handle,
pandemonium::nativescript_api->pandemonium_nativescript_register_signal(pandemonium::_RegisterState::nativescript_handle,
T::___get_class_name(), &signal);
}
#ifndef GODOT_CPP_NO_OBJECT_CAST
#ifndef PANDEMONIUM_CPP_NO_OBJECT_CAST
template <class T>
T *Object::cast_to(const Object *obj) {
if (!obj)
return nullptr;
if (T::___CLASS_IS_SCRIPT) {
size_t have_tag = (size_t)godot::nativescript_api->pandemonium_nativescript_get_type_tag(obj->_owner);
size_t have_tag = (size_t)pandemonium::nativescript_api->pandemonium_nativescript_get_type_tag(obj->_owner);
if (have_tag) {
if (!godot::_TagDB::is_type_known((size_t)have_tag)) {
if (!pandemonium::_TagDB::is_type_known((size_t)have_tag)) {
have_tag = 0;
}
}
@ -601,11 +601,11 @@ T *Object::cast_to(const Object *obj) {
have_tag = obj->_type_tag;
}
if (godot::_TagDB::is_type_compatible(T::___get_id(), have_tag)) {
if (pandemonium::_TagDB::is_type_compatible(T::___get_id(), have_tag)) {
return detail::get_custom_class_instance<T>(obj);
}
} else {
if (godot::api->pandemonium_object_cast_to(obj->_owner, (void *)T::___get_id())) {
if (pandemonium::api->pandemonium_object_cast_to(obj->_owner, (void *)T::___get_id())) {
return (T *)obj;
}
}
@ -614,6 +614,6 @@ T *Object::cast_to(const Object *obj) {
}
#endif
} // namespace godot
} // namespace pandemonium
#endif // GODOT_HPP
#endif // PANDEMONIUM_HPP

View File

@ -1,12 +1,12 @@
/*************************************************************************/
/* GodotGlobal.hpp */
/* PandemoniumGlobal.hpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/* PANDEMONIUM ENGINE */
/* https://pandemoniumengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
/* Copyright (c) 2014-2022 Pandemonium Engine contributors (cf. AUTHORS.md). */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@ -28,15 +28,15 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#ifndef GODOT_GLOBAL_HPP
#define GODOT_GLOBAL_HPP
#ifndef PANDEMONIUM_GLOBAL_HPP
#define PANDEMONIUM_GLOBAL_HPP
#include <gdnative_api_struct.gen.h>
#include "Array.hpp"
#include "String.hpp"
namespace godot {
namespace pandemonium {
class Array;
class String;
@ -51,7 +51,7 @@ extern "C" const pandemonium_gdnative_ext_net_api_struct *net_api;
extern "C" const void *gdnlib;
class Godot {
class Pandemonium {
public:
static void print(const String &message);
static void print_warning(const String &description, const String &function, const String &file, int line);
@ -75,6 +75,6 @@ struct _RegisterState {
static int language_index;
};
} // namespace godot
} // namespace pandemonium
#endif

View File

@ -1,12 +1,12 @@
/*************************************************************************/
/* GodotProfiling.hpp */
/* PandemoniumProfiling.hpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/* PANDEMONIUM ENGINE */
/* https://pandemoniumengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
/* Copyright (c) 2014-2022 Pandemonium Engine contributors (cf. AUTHORS.md). */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@ -28,12 +28,12 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#ifndef GODOT_PROFILING_HPP
#define GODOT_PROFILING_HPP
#ifndef PANDEMONIUM_PROFILING_HPP
#define PANDEMONIUM_PROFILING_HPP
#include "Defs.hpp"
namespace godot {
namespace pandemonium {
class FunctionProfiling {
char signature[1024];
@ -44,12 +44,12 @@ public:
~FunctionProfiling();
};
} // namespace godot
} // namespace pandemonium
#ifdef DEBUG_ENABLED
#define GODOT_PROFILING_FUNCTION FunctionProfiling __function_profiling(__FUNCTION__, __LINE__);
#define PANDEMONIUM_PROFILING_FUNCTION FunctionProfiling __function_profiling(__FUNCTION__, __LINE__);
#else
#define GODOT_PROFILING_FUNCTION
#define PANDEMONIUM_PROFILING_FUNCTION
#endif
#endif

View File

@ -2,11 +2,11 @@
/* Math.hpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/* PANDEMONIUM ENGINE */
/* https://pandemoniumengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
/* Copyright (c) 2014-2022 Pandemonium Engine contributors (cf. AUTHORS.md). */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@ -28,17 +28,17 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#ifndef GODOT_MATH_H
#define GODOT_MATH_H
#ifndef PANDEMONIUM_MATH_H
#define PANDEMONIUM_MATH_H
#include "Defs.hpp"
#include <cmath>
namespace godot {
namespace pandemonium {
namespace Mathp {
// Functions reproduced as in Godot's source code `math_funcs.h`.
// Some are overloads to automatically support changing real_t into either double or float in the way Godot does.
// Functions reproduced as in Pandemonium's source code `math_funcs.h`.
// Some are overloads to automatically support changing real_t into either double or float in the way Pandemonium does.
inline double fmod(double p_x, double p_y) {
return ::fmod(p_x, p_y);
@ -297,6 +297,6 @@ inline unsigned int next_power_of_2(unsigned int x) {
}
} // namespace Math
} // namespace godot
} // namespace pandemonium
#endif // GODOT_MATH_H
#endif // PANDEMONIUM_MATH_H

View File

@ -2,11 +2,11 @@
/* NodePath.hpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/* PANDEMONIUM ENGINE */
/* https://pandemoniumengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
/* Copyright (c) 2014-2022 Pandemonium Engine contributors (cf. AUTHORS.md). */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@ -33,7 +33,7 @@
#include <gdn/node_path.h>
namespace godot {
namespace pandemonium {
class String;
@ -79,6 +79,6 @@ public:
~NodePath();
};
} // namespace godot
} // namespace pandemonium
#endif // NODEPATH_H

View File

@ -2,11 +2,11 @@
/* Plane.hpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/* PANDEMONIUM ENGINE */
/* https://pandemoniumengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
/* Copyright (c) 2014-2022 Pandemonium Engine contributors (cf. AUTHORS.md). */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@ -35,7 +35,7 @@
#include <cmath>
namespace godot {
namespace pandemonium {
enum ClockDirection {
@ -93,6 +93,6 @@ public:
Plane(const Vector3 &p_point1, const Vector3 &p_point2, const Vector3 &p_point3, ClockDirection p_dir = CLOCKWISE);
};
} // namespace godot
} // namespace pandemonium
#endif // PLANE_H

View File

@ -2,11 +2,11 @@
/* PoolArrays.hpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/* PANDEMONIUM ENGINE */
/* https://pandemoniumengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
/* Copyright (c) 2014-2022 Pandemonium Engine contributors (cf. AUTHORS.md). */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@ -34,7 +34,7 @@
#include "Defs.hpp"
#include "Color.hpp"
#include "GodotGlobal.hpp"
#include "PandemoniumGlobal.hpp"
#include "String.hpp"
#include "Vector2.hpp"
#include "Vector2i.hpp"
@ -42,7 +42,7 @@
#include <gdn/pool_arrays.h>
namespace godot {
namespace pandemonium {
class Array;
@ -66,15 +66,15 @@ public:
}
inline Read(const Read &p_other) {
_read_access = godot::api->pandemonium_pool_byte_array_read_access_copy(p_other._read_access);
_read_access = pandemonium::api->pandemonium_pool_byte_array_read_access_copy(p_other._read_access);
}
inline ~Read() {
godot::api->pandemonium_pool_byte_array_read_access_destroy(_read_access);
pandemonium::api->pandemonium_pool_byte_array_read_access_destroy(_read_access);
}
inline const uint8_t *ptr() const {
return godot::api->pandemonium_pool_byte_array_read_access_ptr(_read_access);
return pandemonium::api->pandemonium_pool_byte_array_read_access_ptr(_read_access);
}
inline const uint8_t &operator[](int p_idx) const {
@ -82,7 +82,7 @@ public:
}
inline void operator=(const Read &p_other) {
godot::api->pandemonium_pool_byte_array_read_access_operator_assign(_read_access, p_other._read_access);
pandemonium::api->pandemonium_pool_byte_array_read_access_operator_assign(_read_access, p_other._read_access);
}
};
@ -96,15 +96,15 @@ public:
}
inline Write(const Write &p_other) {
_write_access = godot::api->pandemonium_pool_byte_array_write_access_copy(p_other._write_access);
_write_access = pandemonium::api->pandemonium_pool_byte_array_write_access_copy(p_other._write_access);
}
inline ~Write() {
godot::api->pandemonium_pool_byte_array_write_access_destroy(_write_access);
pandemonium::api->pandemonium_pool_byte_array_write_access_destroy(_write_access);
}
inline uint8_t *ptr() const {
return godot::api->pandemonium_pool_byte_array_write_access_ptr(_write_access);
return pandemonium::api->pandemonium_pool_byte_array_write_access_ptr(_write_access);
}
inline uint8_t &operator[](int p_idx) const {
@ -112,7 +112,7 @@ public:
}
inline void operator=(const Write &p_other) {
godot::api->pandemonium_pool_byte_array_write_access_operator_assign(_write_access, p_other._write_access);
pandemonium::api->pandemonium_pool_byte_array_write_access_operator_assign(_write_access, p_other._write_access);
}
};
@ -168,15 +168,15 @@ public:
}
inline Read(const Read &p_other) {
_read_access = godot::api->pandemonium_pool_int_array_read_access_copy(p_other._read_access);
_read_access = pandemonium::api->pandemonium_pool_int_array_read_access_copy(p_other._read_access);
}
inline ~Read() {
godot::api->pandemonium_pool_int_array_read_access_destroy(_read_access);
pandemonium::api->pandemonium_pool_int_array_read_access_destroy(_read_access);
}
inline const int *ptr() const {
return godot::api->pandemonium_pool_int_array_read_access_ptr(_read_access);
return pandemonium::api->pandemonium_pool_int_array_read_access_ptr(_read_access);
}
inline const int &operator[](int p_idx) const {
@ -184,7 +184,7 @@ public:
}
inline void operator=(const Read &p_other) {
godot::api->pandemonium_pool_int_array_read_access_operator_assign(_read_access, p_other._read_access);
pandemonium::api->pandemonium_pool_int_array_read_access_operator_assign(_read_access, p_other._read_access);
}
};
@ -198,15 +198,15 @@ public:
}
inline Write(const Write &p_other) {
_write_access = godot::api->pandemonium_pool_int_array_write_access_copy(p_other._write_access);
_write_access = pandemonium::api->pandemonium_pool_int_array_write_access_copy(p_other._write_access);
}
inline ~Write() {
godot::api->pandemonium_pool_int_array_write_access_destroy(_write_access);
pandemonium::api->pandemonium_pool_int_array_write_access_destroy(_write_access);
}
inline int *ptr() const {
return godot::api->pandemonium_pool_int_array_write_access_ptr(_write_access);
return pandemonium::api->pandemonium_pool_int_array_write_access_ptr(_write_access);
}
inline int &operator[](int p_idx) const {
@ -214,7 +214,7 @@ public:
}
inline void operator=(const Write &p_other) {
godot::api->pandemonium_pool_int_array_write_access_operator_assign(_write_access, p_other._write_access);
pandemonium::api->pandemonium_pool_int_array_write_access_operator_assign(_write_access, p_other._write_access);
}
};
@ -270,15 +270,15 @@ public:
}
inline Read(const Read &p_other) {
_read_access = godot::api->pandemonium_pool_real_array_read_access_copy(p_other._read_access);
_read_access = pandemonium::api->pandemonium_pool_real_array_read_access_copy(p_other._read_access);
}
inline ~Read() {
godot::api->pandemonium_pool_real_array_read_access_destroy(_read_access);
pandemonium::api->pandemonium_pool_real_array_read_access_destroy(_read_access);
}
inline const real_t *ptr() const {
return godot::api->pandemonium_pool_real_array_read_access_ptr(_read_access);
return pandemonium::api->pandemonium_pool_real_array_read_access_ptr(_read_access);
}
inline const real_t &operator[](int p_idx) const {
@ -286,7 +286,7 @@ public:
}
inline void operator=(const Read &p_other) {
godot::api->pandemonium_pool_real_array_read_access_operator_assign(_read_access, p_other._read_access);
pandemonium::api->pandemonium_pool_real_array_read_access_operator_assign(_read_access, p_other._read_access);
}
};
@ -300,15 +300,15 @@ public:
}
inline Write(const Write &p_other) {
_write_access = godot::api->pandemonium_pool_real_array_write_access_copy(p_other._write_access);
_write_access = pandemonium::api->pandemonium_pool_real_array_write_access_copy(p_other._write_access);
}
inline ~Write() {
godot::api->pandemonium_pool_real_array_write_access_destroy(_write_access);
pandemonium::api->pandemonium_pool_real_array_write_access_destroy(_write_access);
}
inline real_t *ptr() const {
return godot::api->pandemonium_pool_real_array_write_access_ptr(_write_access);
return pandemonium::api->pandemonium_pool_real_array_write_access_ptr(_write_access);
}
inline real_t &operator[](int p_idx) const {
@ -316,7 +316,7 @@ public:
}
inline void operator=(const Write &p_other) {
godot::api->pandemonium_pool_real_array_write_access_operator_assign(_write_access, p_other._write_access);
pandemonium::api->pandemonium_pool_real_array_write_access_operator_assign(_write_access, p_other._write_access);
}
};
@ -373,15 +373,15 @@ public:
}
inline Read(const Read &p_other) {
_read_access = godot::api->pandemonium_pool_string_array_read_access_copy(p_other._read_access);
_read_access = pandemonium::api->pandemonium_pool_string_array_read_access_copy(p_other._read_access);
}
inline ~Read() {
godot::api->pandemonium_pool_string_array_read_access_destroy(_read_access);
pandemonium::api->pandemonium_pool_string_array_read_access_destroy(_read_access);
}
inline const String *ptr() const {
return (const String *)godot::api->pandemonium_pool_string_array_read_access_ptr(_read_access);
return (const String *)pandemonium::api->pandemonium_pool_string_array_read_access_ptr(_read_access);
}
inline const String &operator[](int p_idx) const {
@ -389,7 +389,7 @@ public:
}
inline void operator=(const Read &p_other) {
godot::api->pandemonium_pool_string_array_read_access_operator_assign(_read_access, p_other._read_access);
pandemonium::api->pandemonium_pool_string_array_read_access_operator_assign(_read_access, p_other._read_access);
}
};
@ -403,15 +403,15 @@ public:
}
inline Write(const Write &p_other) {
_write_access = godot::api->pandemonium_pool_string_array_write_access_copy(p_other._write_access);
_write_access = pandemonium::api->pandemonium_pool_string_array_write_access_copy(p_other._write_access);
}
inline ~Write() {
godot::api->pandemonium_pool_string_array_write_access_destroy(_write_access);
pandemonium::api->pandemonium_pool_string_array_write_access_destroy(_write_access);
}
inline String *ptr() const {
return (String *)godot::api->pandemonium_pool_string_array_write_access_ptr(_write_access);
return (String *)pandemonium::api->pandemonium_pool_string_array_write_access_ptr(_write_access);
}
inline String &operator[](int p_idx) const {
@ -419,7 +419,7 @@ public:
}
inline void operator=(const Write &p_other) {
godot::api->pandemonium_pool_string_array_write_access_operator_assign(_write_access, p_other._write_access);
pandemonium::api->pandemonium_pool_string_array_write_access_operator_assign(_write_access, p_other._write_access);
}
};
@ -475,15 +475,15 @@ public:
}
inline Read(const Read &p_other) {
_read_access = godot::api->pandemonium_pool_vector2_array_read_access_copy(p_other._read_access);
_read_access = pandemonium::api->pandemonium_pool_vector2_array_read_access_copy(p_other._read_access);
}
inline ~Read() {
godot::api->pandemonium_pool_vector2_array_read_access_destroy(_read_access);
pandemonium::api->pandemonium_pool_vector2_array_read_access_destroy(_read_access);
}
inline const Vector2 *ptr() const {
return (const Vector2 *)godot::api->pandemonium_pool_vector2_array_read_access_ptr(_read_access);
return (const Vector2 *)pandemonium::api->pandemonium_pool_vector2_array_read_access_ptr(_read_access);
}
inline const Vector2 &operator[](int p_idx) const {
@ -491,7 +491,7 @@ public:
}
inline void operator=(const Read &p_other) {
godot::api->pandemonium_pool_vector2_array_read_access_operator_assign(_read_access, p_other._read_access);
pandemonium::api->pandemonium_pool_vector2_array_read_access_operator_assign(_read_access, p_other._read_access);
}
};
@ -505,15 +505,15 @@ public:
}
inline Write(const Write &p_other) {
_write_access = godot::api->pandemonium_pool_vector2_array_write_access_copy(p_other._write_access);
_write_access = pandemonium::api->pandemonium_pool_vector2_array_write_access_copy(p_other._write_access);
}
inline ~Write() {
godot::api->pandemonium_pool_vector2_array_write_access_destroy(_write_access);
pandemonium::api->pandemonium_pool_vector2_array_write_access_destroy(_write_access);
}
inline Vector2 *ptr() const {
return (Vector2 *)godot::api->pandemonium_pool_vector2_array_write_access_ptr(_write_access);
return (Vector2 *)pandemonium::api->pandemonium_pool_vector2_array_write_access_ptr(_write_access);
}
inline Vector2 &operator[](int p_idx) const {
@ -521,7 +521,7 @@ public:
}
inline void operator=(const Write &p_other) {
godot::api->pandemonium_pool_vector2_array_write_access_operator_assign(_write_access, p_other._write_access);
pandemonium::api->pandemonium_pool_vector2_array_write_access_operator_assign(_write_access, p_other._write_access);
}
};
@ -577,15 +577,15 @@ public:
}
inline Read(const Read &p_other) {
_read_access = godot::api->pandemonium_pool_vector2i_array_read_access_copy(p_other._read_access);
_read_access = pandemonium::api->pandemonium_pool_vector2i_array_read_access_copy(p_other._read_access);
}
inline ~Read() {
godot::api->pandemonium_pool_vector2i_array_read_access_destroy(_read_access);
pandemonium::api->pandemonium_pool_vector2i_array_read_access_destroy(_read_access);
}
inline const Vector2i *ptr() const {
return (const Vector2i *)godot::api->pandemonium_pool_vector2i_array_read_access_ptr(_read_access);
return (const Vector2i *)pandemonium::api->pandemonium_pool_vector2i_array_read_access_ptr(_read_access);
}
inline const Vector2i &operator[](int p_idx) const {
@ -593,7 +593,7 @@ public:
}
inline void operator=(const Read &p_other) {
godot::api->pandemonium_pool_vector2i_array_read_access_operator_assign(_read_access, p_other._read_access);
pandemonium::api->pandemonium_pool_vector2i_array_read_access_operator_assign(_read_access, p_other._read_access);
}
};
@ -607,15 +607,15 @@ public:
}
inline Write(const Write &p_other) {
_write_access = godot::api->pandemonium_pool_vector2i_array_write_access_copy(p_other._write_access);
_write_access = pandemonium::api->pandemonium_pool_vector2i_array_write_access_copy(p_other._write_access);
}
inline ~Write() {
godot::api->pandemonium_pool_vector2i_array_write_access_destroy(_write_access);
pandemonium::api->pandemonium_pool_vector2i_array_write_access_destroy(_write_access);
}
inline Vector2i *ptr() const {
return (Vector2i *)godot::api->pandemonium_pool_vector2i_array_write_access_ptr(_write_access);
return (Vector2i *)pandemonium::api->pandemonium_pool_vector2i_array_write_access_ptr(_write_access);
}
inline Vector2i &operator[](int p_idx) const {
@ -623,7 +623,7 @@ public:
}
inline void operator=(const Write &p_other) {
godot::api->pandemonium_pool_vector2i_array_write_access_operator_assign(_write_access, p_other._write_access);
pandemonium::api->pandemonium_pool_vector2i_array_write_access_operator_assign(_write_access, p_other._write_access);
}
};
@ -679,15 +679,15 @@ public:
}
inline Read(const Read &p_other) {
_read_access = godot::api->pandemonium_pool_vector3_array_read_access_copy(p_other._read_access);
_read_access = pandemonium::api->pandemonium_pool_vector3_array_read_access_copy(p_other._read_access);
}
inline ~Read() {
godot::api->pandemonium_pool_vector3_array_read_access_destroy(_read_access);
pandemonium::api->pandemonium_pool_vector3_array_read_access_destroy(_read_access);
}
inline const Vector3 *ptr() const {
return (const Vector3 *)godot::api->pandemonium_pool_vector3_array_read_access_ptr(_read_access);
return (const Vector3 *)pandemonium::api->pandemonium_pool_vector3_array_read_access_ptr(_read_access);
}
inline const Vector3 &operator[](int p_idx) const {
@ -695,7 +695,7 @@ public:
}
inline void operator=(const Read &p_other) {
godot::api->pandemonium_pool_vector3_array_read_access_operator_assign(_read_access, p_other._read_access);
pandemonium::api->pandemonium_pool_vector3_array_read_access_operator_assign(_read_access, p_other._read_access);
}
};
@ -709,15 +709,15 @@ public:
}
inline Write(const Write &p_other) {
_write_access = godot::api->pandemonium_pool_vector3_array_write_access_copy(p_other._write_access);
_write_access = pandemonium::api->pandemonium_pool_vector3_array_write_access_copy(p_other._write_access);
}
inline ~Write() {
godot::api->pandemonium_pool_vector3_array_write_access_destroy(_write_access);
pandemonium::api->pandemonium_pool_vector3_array_write_access_destroy(_write_access);
}
inline Vector3 *ptr() const {
return (Vector3 *)godot::api->pandemonium_pool_vector3_array_write_access_ptr(_write_access);
return (Vector3 *)pandemonium::api->pandemonium_pool_vector3_array_write_access_ptr(_write_access);
}
inline Vector3 &operator[](int p_idx) const {
@ -725,7 +725,7 @@ public:
}
inline void operator=(const Write &p_other) {
godot::api->pandemonium_pool_vector3_array_write_access_operator_assign(_write_access, p_other._write_access);
pandemonium::api->pandemonium_pool_vector3_array_write_access_operator_assign(_write_access, p_other._write_access);
}
};
@ -781,15 +781,15 @@ public:
}
inline Read(const Read &p_other) {
_read_access = godot::api->pandemonium_pool_color_array_read_access_copy(p_other._read_access);
_read_access = pandemonium::api->pandemonium_pool_color_array_read_access_copy(p_other._read_access);
}
inline ~Read() {
godot::api->pandemonium_pool_color_array_read_access_destroy(_read_access);
pandemonium::api->pandemonium_pool_color_array_read_access_destroy(_read_access);
}
inline const Color *ptr() const {
return (const Color *)godot::api->pandemonium_pool_color_array_read_access_ptr(_read_access);
return (const Color *)pandemonium::api->pandemonium_pool_color_array_read_access_ptr(_read_access);
}
inline const Color &operator[](int p_idx) const {
@ -797,7 +797,7 @@ public:
}
inline void operator=(const Read &p_other) {
godot::api->pandemonium_pool_color_array_read_access_operator_assign(_read_access, p_other._read_access);
pandemonium::api->pandemonium_pool_color_array_read_access_operator_assign(_read_access, p_other._read_access);
}
};
@ -811,15 +811,15 @@ public:
}
inline Write(const Write &p_other) {
_write_access = godot::api->pandemonium_pool_color_array_write_access_copy(p_other._write_access);
_write_access = pandemonium::api->pandemonium_pool_color_array_write_access_copy(p_other._write_access);
}
inline ~Write() {
godot::api->pandemonium_pool_color_array_write_access_destroy(_write_access);
pandemonium::api->pandemonium_pool_color_array_write_access_destroy(_write_access);
}
inline Color *ptr() const {
return (Color *)godot::api->pandemonium_pool_color_array_write_access_ptr(_write_access);
return (Color *)pandemonium::api->pandemonium_pool_color_array_write_access_ptr(_write_access);
}
inline Color &operator[](int p_idx) const {
@ -827,7 +827,7 @@ public:
}
inline void operator=(const Write &p_other) {
godot::api->pandemonium_pool_color_array_write_access_operator_assign(_write_access, p_other._write_access);
pandemonium::api->pandemonium_pool_color_array_write_access_operator_assign(_write_access, p_other._write_access);
}
};
@ -864,6 +864,6 @@ public:
~PoolColorArray();
};
} // namespace godot
} // namespace pandemonium
#endif // POOLARRAYS_H

View File

@ -2,11 +2,11 @@
/* Projection.hpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/* PANDEMONIUM ENGINE */
/* https://pandemoniumengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
/* Copyright (c) 2014-2022 Pandemonium Engine contributors (cf. AUTHORS.md). */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@ -40,7 +40,7 @@
#include <vector>
namespace {
using namespace godot;
using namespace pandemonium;
} // namespace
struct Projection {

View File

@ -2,11 +2,11 @@
/* Quaternion.hpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/* PANDEMONIUM ENGINE */
/* https://pandemoniumengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
/* Copyright (c) 2014-2022 Pandemonium Engine contributors (cf. AUTHORS.md). */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@ -37,7 +37,7 @@
// #include "Basis.h"
namespace godot {
namespace pandemonium {
class Quaternion {
public:
@ -120,6 +120,6 @@ public:
}
};
} // namespace godot
} // namespace pandemonium
#endif // QUAT_H

View File

@ -2,11 +2,11 @@
/* RID.hpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/* PANDEMONIUM ENGINE */
/* https://pandemoniumengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
/* Copyright (c) 2014-2022 Pandemonium Engine contributors (cf. AUTHORS.md). */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@ -33,7 +33,7 @@
#include <gdn/rid.h>
namespace godot {
namespace pandemonium {
class Object;
@ -62,6 +62,6 @@ public:
bool operator>=(const RID &p_other) const;
};
} // namespace godot
} // namespace pandemonium
#endif // RID_H

View File

@ -2,11 +2,11 @@
/* Rect2.hpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/* PANDEMONIUM ENGINE */
/* https://pandemoniumengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
/* Copyright (c) 2014-2022 Pandemonium Engine contributors (cf. AUTHORS.md). */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@ -37,7 +37,7 @@
#include <cstdlib>
namespace godot {
namespace pandemonium {
class String;
@ -155,6 +155,6 @@ struct Rect2 {
}
};
} // namespace godot
} // namespace pandemonium
#endif // RECT2_H

View File

@ -2,11 +2,11 @@
/* Rect2.hpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/* PANDEMONIUM ENGINE */
/* https://pandemoniumengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
/* Copyright (c) 2014-2022 Pandemonium Engine contributors (cf. AUTHORS.md). */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@ -37,7 +37,7 @@
#include <cstdlib>
namespace godot {
namespace pandemonium {
class String;
@ -61,6 +61,6 @@ struct Rect2i {
}
};
} // namespace godot
} // namespace pandemonium
#endif // RECT2_H

View File

@ -2,11 +2,11 @@
/* Ref.hpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/* PANDEMONIUM ENGINE */
/* https://pandemoniumengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
/* Copyright (c) 2014-2022 Pandemonium Engine contributors (cf. AUTHORS.md). */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@ -31,13 +31,13 @@
#ifndef REF_H
#define REF_H
#include "GodotGlobal.hpp"
#include "PandemoniumGlobal.hpp"
#include "Reference.hpp"
#include "Variant.hpp"
namespace godot {
namespace pandemonium {
// Replicates Godot's Ref<T> behavior
// Replicates Pandemonium's Ref<T> behavior
// Rewritten from f5234e70be7dec4930c2d5a0e829ff480d044b1d.
template <class T>
class Ref {
@ -202,7 +202,7 @@ public:
unref();
}
// Used exclusively in the bindings to recreate the Ref Godot encapsulates in return values,
// Used exclusively in the bindings to recreate the Ref Pandemonium encapsulates in return values,
// without adding to the refcount.
inline static Ref<T> __internal_constructor(Object *obj) {
Ref<T> r;
@ -211,6 +211,6 @@ public:
}
};
} // namespace godot
} // namespace pandemonium
#endif

View File

@ -2,11 +2,11 @@
/* String.hpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/* PANDEMONIUM ENGINE */
/* https://pandemoniumengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
/* Copyright (c) 2014-2022 Pandemonium Engine contributors (cf. AUTHORS.md). */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@ -33,7 +33,7 @@
#include <gdn/string.h>
namespace godot {
namespace pandemonium {
class NodePath;
class Variant;
@ -181,6 +181,6 @@ public:
String operator+(const char *a, const String &b);
String operator+(const wchar_t *a, const String &b);
} // namespace godot
} // namespace pandemonium
#endif // STRING_H

View File

@ -2,11 +2,11 @@
/* String.hpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/* PANDEMONIUM ENGINE */
/* https://pandemoniumengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
/* Copyright (c) 2014-2022 Pandemonium Engine contributors (cf. AUTHORS.md). */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@ -33,7 +33,7 @@
#include <gdn/string_name.h>
namespace godot {
namespace pandemonium {
class String;
@ -67,6 +67,6 @@ public:
bool operator>=(const StringName &s) const;
};
} // namespace godot
} // namespace pandemonium
#endif // STRING_H

View File

@ -2,11 +2,11 @@
/* TagDB.hpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/* PANDEMONIUM ENGINE */
/* https://pandemoniumengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
/* Copyright (c) 2014-2022 Pandemonium Engine contributors (cf. AUTHORS.md). */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@ -33,7 +33,7 @@
#include <stddef.h>
namespace godot {
namespace pandemonium {
namespace _TagDB {
@ -44,6 +44,6 @@ bool is_type_compatible(size_t type_tag, size_t base_type_tag);
} // namespace _TagDB
} // namespace godot
} // namespace pandemonium
#endif // TAGDB_HPP

View File

@ -2,11 +2,11 @@
/* Transform.hpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/* PANDEMONIUM ENGINE */
/* https://pandemoniumengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
/* Copyright (c) 2014-2022 Pandemonium Engine contributors (cf. AUTHORS.md). */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@ -36,7 +36,7 @@
#include "AABB.hpp"
#include "Plane.hpp"
namespace godot {
namespace pandemonium {
class Transform {
public:
@ -116,6 +116,6 @@ public:
inline Transform() {}
};
} // namespace godot
} // namespace pandemonium
#endif // TRANSFORM_H

View File

@ -2,11 +2,11 @@
/* Transform2D.hpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/* PANDEMONIUM ENGINE */
/* https://pandemoniumengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
/* Copyright (c) 2014-2022 Pandemonium Engine contributors (cf. AUTHORS.md). */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@ -33,7 +33,7 @@
#include "Vector2.hpp"
namespace godot {
namespace pandemonium {
typedef Vector2 Size2;
@ -131,6 +131,6 @@ struct Transform2D {
}
};
} // namespace godot
} // namespace pandemonium
#endif // TRANSFORM2D_H

View File

@ -2,11 +2,11 @@
/* Variant.hpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/* PANDEMONIUM ENGINE */
/* https://pandemoniumengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
/* Copyright (c) 2014-2022 Pandemonium Engine contributors (cf. AUTHORS.md). */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@ -56,7 +56,7 @@
#include "Vector4.hpp"
#include "Vector4i.hpp"
namespace godot {
namespace pandemonium {
class Dictionary;
@ -213,7 +213,7 @@ public:
Variant(const Plane &p_plane);
Variant(const godot::AABB &p_aabb);
Variant(const pandemonium::AABB &p_aabb);
Variant(const Quaternion &p_quaternion);
@ -229,7 +229,7 @@ public:
Variant(const NodePath &p_path);
Variant(const godot::RID &p_rid);
Variant(const pandemonium::RID &p_rid);
Variant(const Object *p_object);
@ -279,7 +279,7 @@ public:
operator Vector4() const;
operator Vector4i() const;
operator Plane() const;
operator godot::AABB() const;
operator pandemonium::AABB() const;
operator Quaternion() const;
operator Basis() const;
operator Transform() const;
@ -289,7 +289,7 @@ public:
operator Color() const;
operator NodePath() const;
operator godot::RID() const;
operator pandemonium::RID() const;
operator pandemonium_object *() const;
template <typename T>
@ -331,6 +331,6 @@ public:
~Variant();
};
} // namespace godot
} // namespace pandemonium
#endif // VARIANT_H

View File

@ -2,11 +2,11 @@
/* Vector2.hpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/* PANDEMONIUM ENGINE */
/* https://pandemoniumengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
/* Copyright (c) 2014-2022 Pandemonium Engine contributors (cf. AUTHORS.md). */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@ -37,7 +37,7 @@
#include <Mathp.hpp>
namespace godot {
namespace pandemonium {
class String;
@ -301,6 +301,6 @@ inline Vector2 polar2cartesian(Vector2 v) {
} // namespace Math
} // namespace godot
} // namespace pandemonium
#endif // VECTOR2_H

View File

@ -2,11 +2,11 @@
/* Vector2.hpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/* PANDEMONIUM ENGINE */
/* https://pandemoniumengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
/* Copyright (c) 2014-2022 Pandemonium Engine contributors (cf. AUTHORS.md). */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@ -37,7 +37,7 @@
#include <Mathp.hpp>
namespace godot {
namespace pandemonium {
class String;
@ -64,6 +64,6 @@ struct Vector2i {
operator String() const;
};
} // namespace godot
} // namespace pandemonium
#endif // VECTOR2_H

View File

@ -2,11 +2,11 @@
/* Vector3.hpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/* PANDEMONIUM ENGINE */
/* https://pandemoniumengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
/* Copyright (c) 2014-2022 Pandemonium Engine contributors (cf. AUTHORS.md). */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@ -37,7 +37,7 @@
#include <Mathp.hpp>
namespace godot {
namespace pandemonium {
class Basis;
class String;
@ -336,6 +336,6 @@ inline Vector3 vec3_cross(const Vector3 &p_a, const Vector3 &p_b) {
return p_a.cross(p_b);
}
} // namespace godot
} // namespace pandemonium
#endif // VECTOR3_H

View File

@ -2,11 +2,11 @@
/* Vector2.hpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/* PANDEMONIUM ENGINE */
/* https://pandemoniumengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
/* Copyright (c) 2014-2022 Pandemonium Engine contributors (cf. AUTHORS.md). */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@ -37,7 +37,7 @@
#include <Mathp.hpp>
namespace godot {
namespace pandemonium {
class String;
@ -67,6 +67,6 @@ struct Vector3i {
operator String() const;
};
} // namespace godot
} // namespace pandemonium
#endif // VECTOR2_H

View File

@ -2,11 +2,11 @@
/* Vector2.hpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/* PANDEMONIUM ENGINE */
/* https://pandemoniumengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
/* Copyright (c) 2014-2022 Pandemonium Engine contributors (cf. AUTHORS.md). */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@ -37,7 +37,7 @@
#include <Mathp.hpp>
namespace godot {
namespace pandemonium {
class String;
@ -70,6 +70,6 @@ struct Vector4 {
operator String() const;
};
} // namespace godot
} // namespace pandemonium
#endif // VECTOR2_H

View File

@ -2,11 +2,11 @@
/* Vector2.hpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/* PANDEMONIUM ENGINE */
/* https://pandemoniumengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
/* Copyright (c) 2014-2022 Pandemonium Engine contributors (cf. AUTHORS.md). */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@ -37,7 +37,7 @@
#include <Mathp.hpp>
namespace godot {
namespace pandemonium {
class String;
@ -70,6 +70,6 @@ struct Vector4i {
operator String() const;
};
} // namespace godot
} // namespace pandemonium
#endif // VECTOR2_H

View File

@ -2,11 +2,11 @@
/* Wrapped.hpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/* PANDEMONIUM ENGINE */
/* https://pandemoniumengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
/* Copyright (c) 2014-2022 Pandemonium Engine contributors (cf. AUTHORS.md). */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@ -33,7 +33,7 @@
#include <gdn/gdnative.h>
namespace godot {
namespace pandemonium {
// This is an internal base class used by the bindings. You should not need to access its members.
class _Wrapped {
@ -42,6 +42,6 @@ public:
size_t _type_tag;
};
} // namespace godot
} // namespace pandemonium
#endif // WRAPPED_HPP

View File

@ -1,6 +1,6 @@
# Git hooks for Godot Engine
# Git hooks for Pandemonium Engine
This folder contains git hooks meant to be installed locally by Godot Engine
This folder contains git hooks meant to be installed locally by Pandemonium Engine
contributors to make sure they comply with our requirements.
## List of hooks

View File

@ -11,7 +11,7 @@
# Link: https://github.com/githubbrowser/Pre-commit-hooks
# Contact: David Martin, david.martin.mailbox@googlemail.com
# Some quality of life modifications made for Godot Engine.
# Some quality of life modifications made for Pandemonium Engine.
##################################################################
# SETTINGS

View File

@ -2,11 +2,11 @@
/* AABB.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/* PANDEMONIUM ENGINE */
/* https://pandemoniumengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
/* Copyright (c) 2014-2022 Pandemonium Engine contributors (cf. AUTHORS.md). */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@ -34,7 +34,7 @@
#include <algorithm>
namespace godot {
namespace pandemonium {
bool AABB::intersects(const AABB &p_aabb) const {
if (position.x >= (p_aabb.position.x + p_aabb.size.x))
@ -601,4 +601,4 @@ AABB::operator String() const {
return String() + position + " - " + size;
}
} // namespace godot
} // namespace pandemonium

View File

@ -2,11 +2,11 @@
/* Array.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/* PANDEMONIUM ENGINE */
/* https://pandemoniumengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
/* Copyright (c) 2014-2022 Pandemonium Engine contributors (cf. AUTHORS.md). */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@ -29,60 +29,60 @@
/*************************************************************************/
#include "Array.hpp"
#include "GodotGlobal.hpp"
#include "PandemoniumGlobal.hpp"
#include "Variant.hpp"
#include "String.hpp"
#include <cstdlib>
namespace godot {
namespace pandemonium {
class Object;
Array::Array() {
godot::api->pandemonium_array_new(&_pandemonium_array);
pandemonium::api->pandemonium_array_new(&_pandemonium_array);
}
Array::Array(const Array &other) {
godot::api->pandemonium_array_new_copy(&_pandemonium_array, &other._pandemonium_array);
pandemonium::api->pandemonium_array_new_copy(&_pandemonium_array, &other._pandemonium_array);
}
Array &Array::operator=(const Array &other) {
godot::api->pandemonium_array_destroy(&_pandemonium_array);
godot::api->pandemonium_array_new_copy(&_pandemonium_array, &other._pandemonium_array);
pandemonium::api->pandemonium_array_destroy(&_pandemonium_array);
pandemonium::api->pandemonium_array_new_copy(&_pandemonium_array, &other._pandemonium_array);
return *this;
}
Array::Array(const PoolByteArray &a) {
godot::api->pandemonium_array_new_pool_byte_array(&_pandemonium_array, (pandemonium_pool_byte_array *)&a);
pandemonium::api->pandemonium_array_new_pool_byte_array(&_pandemonium_array, (pandemonium_pool_byte_array *)&a);
}
Array::Array(const PoolIntArray &a) {
godot::api->pandemonium_array_new_pool_int_array(&_pandemonium_array, (pandemonium_pool_int_array *)&a);
pandemonium::api->pandemonium_array_new_pool_int_array(&_pandemonium_array, (pandemonium_pool_int_array *)&a);
}
Array::Array(const PoolRealArray &a) {
godot::api->pandemonium_array_new_pool_real_array(&_pandemonium_array, (pandemonium_pool_real_array *)&a);
pandemonium::api->pandemonium_array_new_pool_real_array(&_pandemonium_array, (pandemonium_pool_real_array *)&a);
}
Array::Array(const PoolStringArray &a) {
godot::api->pandemonium_array_new_pool_string_array(&_pandemonium_array, (pandemonium_pool_string_array *)&a);
pandemonium::api->pandemonium_array_new_pool_string_array(&_pandemonium_array, (pandemonium_pool_string_array *)&a);
}
Array::Array(const PoolVector2Array &a) {
godot::api->pandemonium_array_new_pool_vector2_array(&_pandemonium_array, (pandemonium_pool_vector2_array *)&a);
pandemonium::api->pandemonium_array_new_pool_vector2_array(&_pandemonium_array, (pandemonium_pool_vector2_array *)&a);
}
Array::Array(const PoolVector3Array &a) {
godot::api->pandemonium_array_new_pool_vector3_array(&_pandemonium_array, (pandemonium_pool_vector3_array *)&a);
pandemonium::api->pandemonium_array_new_pool_vector3_array(&_pandemonium_array, (pandemonium_pool_vector3_array *)&a);
}
Array::Array(const PoolColorArray &a) {
godot::api->pandemonium_array_new_pool_color_array(&_pandemonium_array, (pandemonium_pool_color_array *)&a);
pandemonium::api->pandemonium_array_new_pool_color_array(&_pandemonium_array, (pandemonium_pool_color_array *)&a);
}
Variant &Array::operator[](const int idx) {
pandemonium_variant *v = godot::api->pandemonium_array_operator_index(&_pandemonium_array, idx);
pandemonium_variant *v = pandemonium::api->pandemonium_array_operator_index(&_pandemonium_array, idx);
// We assume it's ok to reinterpret because the value is a pointer whose data is already owned by the array,
// so can return a reference without constructing a Variant
return *reinterpret_cast<Variant *>(v);
@ -91,137 +91,137 @@ Variant &Array::operator[](const int idx) {
const Variant &Array::operator[](const int idx) const {
// Yes, I'm casting away the const... you can hate me now.
// since the result is
pandemonium_variant *v = godot::api->pandemonium_array_operator_index((pandemonium_array *)&_pandemonium_array, idx);
pandemonium_variant *v = pandemonium::api->pandemonium_array_operator_index((pandemonium_array *)&_pandemonium_array, idx);
return *reinterpret_cast<const Variant *>(v);
}
void Array::append(const Variant &v) {
godot::api->pandemonium_array_append(&_pandemonium_array, (pandemonium_variant *)&v);
pandemonium::api->pandemonium_array_append(&_pandemonium_array, (pandemonium_variant *)&v);
}
void Array::clear() {
godot::api->pandemonium_array_clear(&_pandemonium_array);
pandemonium::api->pandemonium_array_clear(&_pandemonium_array);
}
int Array::count(const Variant &v) {
return godot::api->pandemonium_array_count(&_pandemonium_array, (pandemonium_variant *)&v);
return pandemonium::api->pandemonium_array_count(&_pandemonium_array, (pandemonium_variant *)&v);
}
bool Array::empty() const {
return godot::api->pandemonium_array_empty(&_pandemonium_array);
return pandemonium::api->pandemonium_array_empty(&_pandemonium_array);
}
void Array::erase(const Variant &v) {
godot::api->pandemonium_array_erase(&_pandemonium_array, (pandemonium_variant *)&v);
pandemonium::api->pandemonium_array_erase(&_pandemonium_array, (pandemonium_variant *)&v);
}
Variant Array::front() const {
pandemonium_variant v = godot::api->pandemonium_array_front(&_pandemonium_array);
pandemonium_variant v = pandemonium::api->pandemonium_array_front(&_pandemonium_array);
return Variant(v);
}
Variant Array::back() const {
pandemonium_variant v = godot::api->pandemonium_array_back(&_pandemonium_array);
pandemonium_variant v = pandemonium::api->pandemonium_array_back(&_pandemonium_array);
return Variant(v);
}
int Array::find(const Variant &what, const int from) const {
return godot::api->pandemonium_array_find_from(&_pandemonium_array, (pandemonium_variant *)&what, from);
return pandemonium::api->pandemonium_array_find_from(&_pandemonium_array, (pandemonium_variant *)&what, from);
}
int Array::find_last(const Variant &what) const {
return godot::api->pandemonium_array_find_last(&_pandemonium_array, (pandemonium_variant *)&what);
return pandemonium::api->pandemonium_array_find_last(&_pandemonium_array, (pandemonium_variant *)&what);
}
bool Array::has(const Variant &what) const {
return godot::api->pandemonium_array_has(&_pandemonium_array, (pandemonium_variant *)&what);
return pandemonium::api->pandemonium_array_has(&_pandemonium_array, (pandemonium_variant *)&what);
}
uint32_t Array::hash() const {
return godot::api->pandemonium_array_hash(&_pandemonium_array);
return pandemonium::api->pandemonium_array_hash(&_pandemonium_array);
}
void Array::insert(const int pos, const Variant &value) {
godot::api->pandemonium_array_insert(&_pandemonium_array, pos, (pandemonium_variant *)&value);
pandemonium::api->pandemonium_array_insert(&_pandemonium_array, pos, (pandemonium_variant *)&value);
}
void Array::invert() {
godot::api->pandemonium_array_invert(&_pandemonium_array);
pandemonium::api->pandemonium_array_invert(&_pandemonium_array);
}
Variant Array::pop_back() {
pandemonium_variant v = godot::api->pandemonium_array_pop_back(&_pandemonium_array);
pandemonium_variant v = pandemonium::api->pandemonium_array_pop_back(&_pandemonium_array);
return Variant(v);
}
Variant Array::pop_front() {
pandemonium_variant v = godot::api->pandemonium_array_pop_front(&_pandemonium_array);
pandemonium_variant v = pandemonium::api->pandemonium_array_pop_front(&_pandemonium_array);
return Variant(v);
}
void Array::push_back(const Variant &v) {
godot::api->pandemonium_array_push_back(&_pandemonium_array, (pandemonium_variant *)&v);
pandemonium::api->pandemonium_array_push_back(&_pandemonium_array, (pandemonium_variant *)&v);
}
void Array::push_front(const Variant &v) {
godot::api->pandemonium_array_push_front(&_pandemonium_array, (pandemonium_variant *)&v);
pandemonium::api->pandemonium_array_push_front(&_pandemonium_array, (pandemonium_variant *)&v);
}
void Array::remove(const int idx) {
godot::api->pandemonium_array_remove(&_pandemonium_array, idx);
pandemonium::api->pandemonium_array_remove(&_pandemonium_array, idx);
}
int Array::size() const {
return godot::api->pandemonium_array_size(&_pandemonium_array);
return pandemonium::api->pandemonium_array_size(&_pandemonium_array);
}
void Array::resize(const int size) {
godot::api->pandemonium_array_resize(&_pandemonium_array, size);
pandemonium::api->pandemonium_array_resize(&_pandemonium_array, size);
}
int Array::rfind(const Variant &what, const int from) const {
return godot::api->pandemonium_array_rfind_from(&_pandemonium_array, (pandemonium_variant *)&what, from);
return pandemonium::api->pandemonium_array_rfind_from(&_pandemonium_array, (pandemonium_variant *)&what, from);
}
void Array::sort() {
godot::api->pandemonium_array_sort(&_pandemonium_array);
pandemonium::api->pandemonium_array_sort(&_pandemonium_array);
}
void Array::sort_custom(Object *obj, const String &func) {
godot::api->pandemonium_array_sort_custom(&_pandemonium_array, (pandemonium_object *)obj, (pandemonium_string *)&func);
pandemonium::api->pandemonium_array_sort_custom(&_pandemonium_array, (pandemonium_object *)obj, (pandemonium_string *)&func);
}
int Array::bsearch(const Variant &value, const bool before) {
return godot::api->pandemonium_array_bsearch(&_pandemonium_array, (pandemonium_variant *)&value, before);
return pandemonium::api->pandemonium_array_bsearch(&_pandemonium_array, (pandemonium_variant *)&value, before);
}
int Array::bsearch_custom(const Variant &value, const Object *obj,
const String &func, const bool before) {
return godot::api->pandemonium_array_bsearch_custom(&_pandemonium_array, (pandemonium_variant *)&value,
return pandemonium::api->pandemonium_array_bsearch_custom(&_pandemonium_array, (pandemonium_variant *)&value,
(pandemonium_object *)obj, (pandemonium_string *)&func, before);
}
Array Array::duplicate(const bool deep) const {
pandemonium_array arr = godot::api->pandemonium_array_duplicate_deep(&_pandemonium_array, deep);
pandemonium_array arr = pandemonium::api->pandemonium_array_duplicate_deep(&_pandemonium_array, deep);
return Array(arr);
}
Variant Array::max() const {
pandemonium_variant v = godot::api->pandemonium_array_max(&_pandemonium_array);
pandemonium_variant v = pandemonium::api->pandemonium_array_max(&_pandemonium_array);
return Variant(v);
}
Variant Array::min() const {
pandemonium_variant v = godot::api->pandemonium_array_min(&_pandemonium_array);
pandemonium_variant v = pandemonium::api->pandemonium_array_min(&_pandemonium_array);
return Variant(v);
}
void Array::shuffle() {
godot::api->pandemonium_array_shuffle(&_pandemonium_array);
pandemonium::api->pandemonium_array_shuffle(&_pandemonium_array);
}
Array::~Array() {
godot::api->pandemonium_array_destroy(&_pandemonium_array);
pandemonium::api->pandemonium_array_destroy(&_pandemonium_array);
}
} // namespace godot
} // namespace pandemonium

View File

@ -2,11 +2,11 @@
/* Basis.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/* PANDEMONIUM ENGINE */
/* https://pandemoniumengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
/* Copyright (c) 2014-2022 Pandemonium Engine contributors (cf. AUTHORS.md). */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@ -35,7 +35,7 @@
#include <algorithm>
namespace godot {
namespace pandemonium {
const Basis Basis::IDENTITY = Basis();
const Basis Basis::FLIP_X = Basis(-1, 0, 0, 0, 1, 0, 0, 0, 1);
@ -634,11 +634,11 @@ Basis::Basis(const Vector3 &p_euler) {
set_euler(p_euler);
}
} // namespace godot
} // namespace pandemonium
#include "Quaternion.hpp"
namespace godot {
namespace pandemonium {
Basis::Basis(const Quaternion &p_quaternion) {
real_t d = p_quaternion.length_squared();
@ -707,4 +707,4 @@ Basis::operator Quaternion() const {
return Quaternion(temp[0], temp[1], temp[2], temp[3]);
}
} // namespace godot
} // namespace pandemonium

View File

@ -2,11 +2,11 @@
/* Color.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/* PANDEMONIUM ENGINE */
/* https://pandemoniumengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
/* Copyright (c) 2014-2022 Pandemonium Engine contributors (cf. AUTHORS.md). */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@ -35,7 +35,7 @@
#include <gdn/color.h>
#include <cmath>
namespace godot {
namespace pandemonium {
#define MIN(a, b) (a < b ? a : b)
#define MAX(a, b) (a > b ? a : b)
@ -652,4 +652,4 @@ Color Color::operator-() const {
1.0 - a);
}
} // namespace godot
} // namespace pandemonium

View File

@ -2,11 +2,11 @@
/* Dictionary.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/* PANDEMONIUM ENGINE */
/* https://pandemoniumengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
/* Copyright (c) 2014-2022 Pandemonium Engine contributors (cf. AUTHORS.md). */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@ -30,81 +30,81 @@
#include "Dictionary.hpp"
#include "Array.hpp"
#include "GodotGlobal.hpp"
#include "PandemoniumGlobal.hpp"
#include "Variant.hpp"
namespace godot {
namespace pandemonium {
Dictionary::Dictionary() {
godot::api->pandemonium_dictionary_new(&_pandemonium_dictionary);
pandemonium::api->pandemonium_dictionary_new(&_pandemonium_dictionary);
}
Dictionary::Dictionary(const Dictionary &other) {
godot::api->pandemonium_dictionary_new_copy(&_pandemonium_dictionary, &other._pandemonium_dictionary);
pandemonium::api->pandemonium_dictionary_new_copy(&_pandemonium_dictionary, &other._pandemonium_dictionary);
}
Dictionary &Dictionary::operator=(const Dictionary &other) {
godot::api->pandemonium_dictionary_destroy(&_pandemonium_dictionary);
godot::api->pandemonium_dictionary_new_copy(&_pandemonium_dictionary, &other._pandemonium_dictionary);
pandemonium::api->pandemonium_dictionary_destroy(&_pandemonium_dictionary);
pandemonium::api->pandemonium_dictionary_new_copy(&_pandemonium_dictionary, &other._pandemonium_dictionary);
return *this;
}
void Dictionary::clear() {
godot::api->pandemonium_dictionary_clear(&_pandemonium_dictionary);
pandemonium::api->pandemonium_dictionary_clear(&_pandemonium_dictionary);
}
bool Dictionary::empty() const {
return godot::api->pandemonium_dictionary_empty(&_pandemonium_dictionary);
return pandemonium::api->pandemonium_dictionary_empty(&_pandemonium_dictionary);
}
void Dictionary::erase(const Variant &key) {
godot::api->pandemonium_dictionary_erase(&_pandemonium_dictionary, (pandemonium_variant *)&key);
pandemonium::api->pandemonium_dictionary_erase(&_pandemonium_dictionary, (pandemonium_variant *)&key);
}
bool Dictionary::has(const Variant &key) const {
return godot::api->pandemonium_dictionary_has(&_pandemonium_dictionary, (pandemonium_variant *)&key);
return pandemonium::api->pandemonium_dictionary_has(&_pandemonium_dictionary, (pandemonium_variant *)&key);
}
bool Dictionary::has_all(const Array &keys) const {
return godot::api->pandemonium_dictionary_has_all(&_pandemonium_dictionary, (pandemonium_array *)&keys);
return pandemonium::api->pandemonium_dictionary_has_all(&_pandemonium_dictionary, (pandemonium_array *)&keys);
}
uint32_t Dictionary::hash() const {
return godot::api->pandemonium_dictionary_hash(&_pandemonium_dictionary);
return pandemonium::api->pandemonium_dictionary_hash(&_pandemonium_dictionary);
}
Array Dictionary::keys() const {
pandemonium_array a = godot::api->pandemonium_dictionary_keys(&_pandemonium_dictionary);
pandemonium_array a = pandemonium::api->pandemonium_dictionary_keys(&_pandemonium_dictionary);
return Array(a);
}
Variant &Dictionary::operator[](const Variant &key) {
pandemonium_variant *v = godot::api->pandemonium_dictionary_operator_index(&_pandemonium_dictionary, (pandemonium_variant *)&key);
pandemonium_variant *v = pandemonium::api->pandemonium_dictionary_operator_index(&_pandemonium_dictionary, (pandemonium_variant *)&key);
return *reinterpret_cast<Variant *>(v);
}
const Variant &Dictionary::operator[](const Variant &key) const {
// oops I did it again
pandemonium_variant *v = godot::api->pandemonium_dictionary_operator_index((pandemonium_dictionary *)&_pandemonium_dictionary, (pandemonium_variant *)&key);
pandemonium_variant *v = pandemonium::api->pandemonium_dictionary_operator_index((pandemonium_dictionary *)&_pandemonium_dictionary, (pandemonium_variant *)&key);
return *reinterpret_cast<Variant *>(v);
}
int Dictionary::size() const {
return godot::api->pandemonium_dictionary_size(&_pandemonium_dictionary);
return pandemonium::api->pandemonium_dictionary_size(&_pandemonium_dictionary);
}
String Dictionary::to_json() const {
pandemonium_string s = godot::api->pandemonium_dictionary_to_json(&_pandemonium_dictionary);
pandemonium_string s = pandemonium::api->pandemonium_dictionary_to_json(&_pandemonium_dictionary);
return String(s);
}
Array Dictionary::values() const {
pandemonium_array a = godot::api->pandemonium_dictionary_values(&_pandemonium_dictionary);
pandemonium_array a = pandemonium::api->pandemonium_dictionary_values(&_pandemonium_dictionary);
return Array(a);
}
Dictionary::~Dictionary() {
godot::api->pandemonium_dictionary_destroy(&_pandemonium_dictionary);
pandemonium::api->pandemonium_dictionary_destroy(&_pandemonium_dictionary);
}
} // namespace godot
} // namespace pandemonium

View File

@ -1,12 +1,12 @@
/*************************************************************************/
/* GodotGlobal.cpp */
/* PandemoniumGlobal.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/* PANDEMONIUM ENGINE */
/* https://pandemoniumengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
/* Copyright (c) 2014-2022 Pandemonium Engine contributors (cf. AUTHORS.md). */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@ -28,7 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#include "GodotGlobal.hpp"
#include "PandemoniumGlobal.hpp"
#include "String.hpp"
#include "Array.hpp"
@ -36,7 +36,7 @@
#include "Wrapped.hpp"
static GDCALLINGCONV void *wrapper_create(void *data, const void *type_tag, pandemonium_object *instance) {
godot::_Wrapped *wrapper_memory = (godot::_Wrapped *)godot::api->pandemonium_alloc(sizeof(godot::_Wrapped));
pandemonium::_Wrapped *wrapper_memory = (pandemonium::_Wrapped *)pandemonium::api->pandemonium_alloc(sizeof(pandemonium::_Wrapped));
if (!wrapper_memory)
return NULL;
@ -48,10 +48,10 @@ static GDCALLINGCONV void *wrapper_create(void *data, const void *type_tag, pand
static GDCALLINGCONV void wrapper_destroy(void *data, void *wrapper) {
if (wrapper)
godot::api->pandemonium_free(wrapper);
pandemonium::api->pandemonium_free(wrapper);
}
namespace godot {
namespace pandemonium {
void *_RegisterState::nativescript_handle;
int _RegisterState::language_index;
@ -66,11 +66,11 @@ const pandemonium_gdnative_ext_net_api_struct *net_api = nullptr;
const void *gdnlib = NULL;
void Godot::print(const String &message) {
godot::api->pandemonium_print((pandemonium_string *)&message);
void Pandemonium::print(const String &message) {
pandemonium::api->pandemonium_print((pandemonium_string *)&message);
}
void Godot::print_warning(const String &description, const String &function, const String &file, int line) {
void Pandemonium::print_warning(const String &description, const String &function, const String &file, int line) {
int len;
char *c_desc = description.alloc_c_string();
@ -78,18 +78,18 @@ void Godot::print_warning(const String &description, const String &function, con
char *c_file = file.alloc_c_string();
if (c_desc != nullptr && c_func != nullptr && c_file != nullptr) {
godot::api->pandemonium_print_warning(c_desc, c_func, c_file, line);
pandemonium::api->pandemonium_print_warning(c_desc, c_func, c_file, line);
};
if (c_desc != nullptr)
godot::api->pandemonium_free(c_desc);
pandemonium::api->pandemonium_free(c_desc);
if (c_func != nullptr)
godot::api->pandemonium_free(c_func);
pandemonium::api->pandemonium_free(c_func);
if (c_file != nullptr)
godot::api->pandemonium_free(c_file);
pandemonium::api->pandemonium_free(c_file);
}
void Godot::print_error(const String &description, const String &function, const String &file, int line) {
void Pandemonium::print_error(const String &description, const String &function, const String &file, int line) {
int len;
char *c_desc = description.alloc_c_string();
@ -97,49 +97,49 @@ void Godot::print_error(const String &description, const String &function, const
char *c_file = file.alloc_c_string();
if (c_desc != nullptr && c_func != nullptr && c_file != nullptr) {
godot::api->pandemonium_print_error(c_desc, c_func, c_file, line);
pandemonium::api->pandemonium_print_error(c_desc, c_func, c_file, line);
};
if (c_desc != nullptr)
godot::api->pandemonium_free(c_desc);
pandemonium::api->pandemonium_free(c_desc);
if (c_func != nullptr)
godot::api->pandemonium_free(c_func);
pandemonium::api->pandemonium_free(c_func);
if (c_file != nullptr)
godot::api->pandemonium_free(c_file);
pandemonium::api->pandemonium_free(c_file);
}
void ___register_types();
void ___init_method_bindings();
void Godot::gdnative_init(pandemonium_gdnative_init_options *options) {
godot::api = options->api_struct;
godot::gdnlib = options->gd_native_library;
void Pandemonium::gdnative_init(pandemonium_gdnative_init_options *options) {
pandemonium::api = options->api_struct;
pandemonium::gdnlib = options->gd_native_library;
const pandemonium_gdnative_api_struct *core_extension = godot::api->next;
const pandemonium_gdnative_api_struct *core_extension = pandemonium::api->next;
/*
while (core_extension) {
if (core_extension->version.major == 1 && core_extension->version.minor == 1) {
godot::core_1_1_api = (const pandemonium_gdnative_core_1_1_api_struct *)core_extension;
pandemonium::core_1_1_api = (const pandemonium_gdnative_core_1_1_api_struct *)core_extension;
} else if (core_extension->version.major == 1 && core_extension->version.minor == 2) {
godot::core_1_2_api = (const pandemonium_gdnative_core_1_2_api_struct *)core_extension;
pandemonium::core_1_2_api = (const pandemonium_gdnative_core_1_2_api_struct *)core_extension;
}
core_extension = core_extension->next;
}
*/
// now find our extensions
for (int i = 0; i < godot::api->num_extensions; i++) {
switch (godot::api->extensions[i]->type) {
for (int i = 0; i < pandemonium::api->num_extensions; i++) {
switch (pandemonium::api->extensions[i]->type) {
case GDNATIVE_EXT_NATIVESCRIPT: {
godot::nativescript_api = (const pandemonium_gdnative_ext_nativescript_api_struct *)godot::api->extensions[i];
pandemonium::nativescript_api = (const pandemonium_gdnative_ext_nativescript_api_struct *)pandemonium::api->extensions[i];
/*
const pandemonium_gdnative_api_struct *extension = godot::nativescript_api->next;
const pandemonium_gdnative_api_struct *extension = pandemonium::nativescript_api->next;
while (extension) {
if (extension->version.major == 1 && extension->version.minor == 1) {
//godot::nativescript_1_1_api = (const pandemonium_gdnative_ext_nativescript_1_1_api_struct *)extension;
//pandemonium::nativescript_1_1_api = (const pandemonium_gdnative_ext_nativescript_1_1_api_struct *)extension;
}
extension = extension->next;
@ -147,23 +147,23 @@ void Godot::gdnative_init(pandemonium_gdnative_init_options *options) {
*/
} break;
case GDNATIVE_EXT_PLUGINSCRIPT: {
godot::pluginscript_api = (const pandemonium_gdnative_ext_pluginscript_api_struct *)godot::api->extensions[i];
pandemonium::pluginscript_api = (const pandemonium_gdnative_ext_pluginscript_api_struct *)pandemonium::api->extensions[i];
} break;
case GDNATIVE_EXT_ANDROID: {
godot::android_api = (const pandemonium_gdnative_ext_android_api_struct *)godot::api->extensions[i];
pandemonium::android_api = (const pandemonium_gdnative_ext_android_api_struct *)pandemonium::api->extensions[i];
} break;
case GDNATIVE_EXT_VIDEODECODER: {
godot::videodecoder_api = (const pandemonium_gdnative_ext_videodecoder_api_struct *)godot::api->extensions[i];
pandemonium::videodecoder_api = (const pandemonium_gdnative_ext_videodecoder_api_struct *)pandemonium::api->extensions[i];
} break;
case GDNATIVE_EXT_NET: {
godot::net_api = (const pandemonium_gdnative_ext_net_api_struct *)godot::api->extensions[i];
pandemonium::net_api = (const pandemonium_gdnative_ext_net_api_struct *)pandemonium::api->extensions[i];
/*
const pandemonium_gdnative_api_struct *extension = godot::net_api->next;
const pandemonium_gdnative_api_struct *extension = pandemonium::net_api->next;
while (extension) {
if (extension->version.major == 3 && extension->version.minor == 2) {
godot::net_3_2_api = (const pandemonium_gdnative_ext_net_3_2_api_struct *)extension;
pandemonium::net_3_2_api = (const pandemonium_gdnative_ext_net_3_2_api_struct *)extension;
}
extension = extension->next;
@ -181,27 +181,27 @@ void Godot::gdnative_init(pandemonium_gdnative_init_options *options) {
binding_funcs.alloc_instance_binding_data = wrapper_create;
binding_funcs.free_instance_binding_data = wrapper_destroy;
godot::_RegisterState::language_index = godot::nativescript_api->pandemonium_nativescript_register_instance_binding_data_functions(binding_funcs);
pandemonium::_RegisterState::language_index = pandemonium::nativescript_api->pandemonium_nativescript_register_instance_binding_data_functions(binding_funcs);
// register these now
___register_types();
___init_method_bindings();
}
void Godot::gdnative_terminate(pandemonium_gdnative_terminate_options *options) {
void Pandemonium::gdnative_terminate(pandemonium_gdnative_terminate_options *options) {
// reserved for future use.
}
void Godot::gdnative_profiling_add_data(const char *p_signature, uint64_t p_time) {
godot::nativescript_api->pandemonium_nativescript_profiling_add_data(p_signature, p_time);
void Pandemonium::gdnative_profiling_add_data(const char *p_signature, uint64_t p_time) {
pandemonium::nativescript_api->pandemonium_nativescript_profiling_add_data(p_signature, p_time);
}
void Godot::nativescript_init(void *handle) {
godot::_RegisterState::nativescript_handle = handle;
void Pandemonium::nativescript_init(void *handle) {
pandemonium::_RegisterState::nativescript_handle = handle;
}
void Godot::nativescript_terminate(void *handle) {
godot::nativescript_api->pandemonium_nativescript_unregister_instance_binding_data_functions(godot::_RegisterState::language_index);
void Pandemonium::nativescript_terminate(void *handle) {
pandemonium::nativescript_api->pandemonium_nativescript_unregister_instance_binding_data_functions(pandemonium::_RegisterState::language_index);
}
} // namespace godot
} // namespace pandemonium

View File

@ -1,11 +1,11 @@
#include "GodotProfiling.hpp"
#include "PandemoniumProfiling.hpp"
#include "OS.hpp"
#include <cstdio>
namespace godot {
namespace pandemonium {
FunctionProfiling::FunctionProfiling(const char *p_function, const int p_line) {
snprintf(signature, 1024, "::%d::%s", p_line, p_function);
@ -15,8 +15,8 @@ FunctionProfiling::FunctionProfiling(const char *p_function, const int p_line) {
FunctionProfiling::~FunctionProfiling() {
uint64_t t = OS::get_singleton()->get_ticks_usec() - ticks;
if (t > 0) {
Godot::gdnative_profiling_add_data(signature, t);
Pandemonium::gdnative_profiling_add_data(signature, t);
}
}
} // namespace godot
} // namespace pandemonium

View File

@ -2,11 +2,11 @@
/* NodePath.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/* PANDEMONIUM ENGINE */
/* https://pandemoniumengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
/* Copyright (c) 2014-2022 Pandemonium Engine contributors (cf. AUTHORS.md). */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@ -29,86 +29,86 @@
/*************************************************************************/
#include "NodePath.hpp"
#include "GodotGlobal.hpp"
#include "PandemoniumGlobal.hpp"
#include "String.hpp"
#include <gdn/node_path.h>
namespace godot {
namespace pandemonium {
NodePath::NodePath() {
String from = "";
godot::api->pandemonium_node_path_new(&_node_path, (pandemonium_string *)&from);
pandemonium::api->pandemonium_node_path_new(&_node_path, (pandemonium_string *)&from);
}
NodePath::NodePath(const NodePath &other) {
String from = other;
godot::api->pandemonium_node_path_new(&_node_path, (pandemonium_string *)&from);
pandemonium::api->pandemonium_node_path_new(&_node_path, (pandemonium_string *)&from);
}
NodePath::NodePath(const String &from) {
godot::api->pandemonium_node_path_new(&_node_path, (pandemonium_string *)&from);
pandemonium::api->pandemonium_node_path_new(&_node_path, (pandemonium_string *)&from);
}
NodePath::NodePath(const char *contents) {
String from = contents;
godot::api->pandemonium_node_path_new(&_node_path, (pandemonium_string *)&from);
pandemonium::api->pandemonium_node_path_new(&_node_path, (pandemonium_string *)&from);
}
String NodePath::get_name(const int idx) const {
pandemonium_string str = godot::api->pandemonium_node_path_get_name(&_node_path, idx);
pandemonium_string str = pandemonium::api->pandemonium_node_path_get_name(&_node_path, idx);
return String(str);
}
int NodePath::get_name_count() const {
return godot::api->pandemonium_node_path_get_name_count(&_node_path);
return pandemonium::api->pandemonium_node_path_get_name_count(&_node_path);
}
String NodePath::get_subname(const int idx) const {
pandemonium_string str = godot::api->pandemonium_node_path_get_subname(&_node_path, idx);
pandemonium_string str = pandemonium::api->pandemonium_node_path_get_subname(&_node_path, idx);
return String(str);
}
int NodePath::get_subname_count() const {
return godot::api->pandemonium_node_path_get_subname_count(&_node_path);
return pandemonium::api->pandemonium_node_path_get_subname_count(&_node_path);
}
bool NodePath::is_absolute() const {
return godot::api->pandemonium_node_path_is_absolute(&_node_path);
return pandemonium::api->pandemonium_node_path_is_absolute(&_node_path);
}
bool NodePath::is_empty() const {
return godot::api->pandemonium_node_path_is_empty(&_node_path);
return pandemonium::api->pandemonium_node_path_is_empty(&_node_path);
}
NodePath NodePath::get_as_property_path() const {
pandemonium_node_path path = godot::api->pandemonium_node_path_get_as_property_path(&_node_path);
pandemonium_node_path path = pandemonium::api->pandemonium_node_path_get_as_property_path(&_node_path);
return NodePath(path);
}
String NodePath::get_concatenated_subnames() const {
pandemonium_string str = godot::api->pandemonium_node_path_get_concatenated_subnames(&_node_path);
pandemonium_string str = pandemonium::api->pandemonium_node_path_get_concatenated_subnames(&_node_path);
return String(str);
}
NodePath::operator String() const {
pandemonium_string str = godot::api->pandemonium_node_path_as_string(&_node_path);
pandemonium_string str = pandemonium::api->pandemonium_node_path_as_string(&_node_path);
return String(str);
}
bool NodePath::operator==(const NodePath &other) {
return godot::api->pandemonium_node_path_operator_equal(&_node_path, &other._node_path);
return pandemonium::api->pandemonium_node_path_operator_equal(&_node_path, &other._node_path);
}
void NodePath::operator=(const NodePath &other) {
godot::api->pandemonium_node_path_destroy(&_node_path);
pandemonium::api->pandemonium_node_path_destroy(&_node_path);
String other_string = (String)other;
godot::api->pandemonium_node_path_new(&_node_path, (pandemonium_string *)&other_string);
pandemonium::api->pandemonium_node_path_new(&_node_path, (pandemonium_string *)&other_string);
}
NodePath::~NodePath() {
godot::api->pandemonium_node_path_destroy(&_node_path);
pandemonium::api->pandemonium_node_path_destroy(&_node_path);
}
} // namespace godot
} // namespace pandemonium

View File

@ -2,11 +2,11 @@
/* Plane.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/* PANDEMONIUM ENGINE */
/* https://pandemoniumengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
/* Copyright (c) 2014-2022 Pandemonium Engine contributors (cf. AUTHORS.md). */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@ -34,7 +34,7 @@
#include <cmath>
namespace godot {
namespace pandemonium {
void Plane::set_normal(const Vector3 &p_normal) {
this->normal = p_normal;
@ -201,4 +201,4 @@ bool Plane::operator!=(const Plane &p_plane) const {
return normal != p_plane.normal || d != p_plane.d;
}
} // namespace godot
} // namespace pandemonium

View File

@ -2,11 +2,11 @@
/* PoolArrays.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/* PANDEMONIUM ENGINE */
/* https://pandemoniumengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
/* Copyright (c) 2014-2022 Pandemonium Engine contributors (cf. AUTHORS.md). */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@ -31,7 +31,7 @@
#include "PoolArrays.hpp"
#include "Color.hpp"
#include "Defs.hpp"
#include "GodotGlobal.hpp"
#include "PandemoniumGlobal.hpp"
#include "String.hpp"
#include "Vector2.hpp"
#include "Vector2i.hpp"
@ -39,610 +39,610 @@
#include <gdn/pool_arrays.h>
namespace godot {
namespace pandemonium {
PoolByteArray::PoolByteArray() {
godot::api->pandemonium_pool_byte_array_new(&_pandemonium_array);
pandemonium::api->pandemonium_pool_byte_array_new(&_pandemonium_array);
}
PoolByteArray::PoolByteArray(const PoolByteArray &p_other) {
godot::api->pandemonium_pool_byte_array_new_copy(&_pandemonium_array, &p_other._pandemonium_array);
pandemonium::api->pandemonium_pool_byte_array_new_copy(&_pandemonium_array, &p_other._pandemonium_array);
}
PoolByteArray &PoolByteArray::operator=(const PoolByteArray &p_other) {
godot::api->pandemonium_pool_byte_array_destroy(&_pandemonium_array);
godot::api->pandemonium_pool_byte_array_new_copy(&_pandemonium_array, &p_other._pandemonium_array);
pandemonium::api->pandemonium_pool_byte_array_destroy(&_pandemonium_array);
pandemonium::api->pandemonium_pool_byte_array_new_copy(&_pandemonium_array, &p_other._pandemonium_array);
return *this;
}
PoolByteArray::PoolByteArray(const Array &array) {
godot::api->pandemonium_pool_byte_array_new_with_array(&_pandemonium_array, (pandemonium_array *)&array);
pandemonium::api->pandemonium_pool_byte_array_new_with_array(&_pandemonium_array, (pandemonium_array *)&array);
}
PoolByteArray::Read PoolByteArray::read() const {
Read read;
read._read_access = godot::api->pandemonium_pool_byte_array_read(&_pandemonium_array);
read._read_access = pandemonium::api->pandemonium_pool_byte_array_read(&_pandemonium_array);
return read;
}
PoolByteArray::Write PoolByteArray::write() {
Write write;
write._write_access = godot::api->pandemonium_pool_byte_array_write(&_pandemonium_array);
write._write_access = pandemonium::api->pandemonium_pool_byte_array_write(&_pandemonium_array);
return write;
}
void PoolByteArray::append(const uint8_t data) {
godot::api->pandemonium_pool_byte_array_append(&_pandemonium_array, data);
pandemonium::api->pandemonium_pool_byte_array_append(&_pandemonium_array, data);
}
void PoolByteArray::append_array(const PoolByteArray &array) {
godot::api->pandemonium_pool_byte_array_append_array(&_pandemonium_array, &array._pandemonium_array);
pandemonium::api->pandemonium_pool_byte_array_append_array(&_pandemonium_array, &array._pandemonium_array);
}
int PoolByteArray::insert(const int idx, const uint8_t data) {
return godot::api->pandemonium_pool_byte_array_insert(&_pandemonium_array, idx, data);
return pandemonium::api->pandemonium_pool_byte_array_insert(&_pandemonium_array, idx, data);
}
void PoolByteArray::invert() {
godot::api->pandemonium_pool_byte_array_invert(&_pandemonium_array);
pandemonium::api->pandemonium_pool_byte_array_invert(&_pandemonium_array);
}
void PoolByteArray::push_back(const uint8_t data) {
godot::api->pandemonium_pool_byte_array_push_back(&_pandemonium_array, data);
pandemonium::api->pandemonium_pool_byte_array_push_back(&_pandemonium_array, data);
}
void PoolByteArray::remove(const int idx) {
godot::api->pandemonium_pool_byte_array_remove(&_pandemonium_array, idx);
pandemonium::api->pandemonium_pool_byte_array_remove(&_pandemonium_array, idx);
}
void PoolByteArray::resize(const int size) {
godot::api->pandemonium_pool_byte_array_resize(&_pandemonium_array, size);
pandemonium::api->pandemonium_pool_byte_array_resize(&_pandemonium_array, size);
}
void PoolByteArray::set(const int idx, const uint8_t data) {
godot::api->pandemonium_pool_byte_array_set(&_pandemonium_array, idx, data);
pandemonium::api->pandemonium_pool_byte_array_set(&_pandemonium_array, idx, data);
}
uint8_t PoolByteArray::operator[](const int idx) {
return godot::api->pandemonium_pool_byte_array_get(&_pandemonium_array, idx);
return pandemonium::api->pandemonium_pool_byte_array_get(&_pandemonium_array, idx);
}
int PoolByteArray::size() const {
return godot::api->pandemonium_pool_byte_array_size(&_pandemonium_array);
return pandemonium::api->pandemonium_pool_byte_array_size(&_pandemonium_array);
}
PoolByteArray::~PoolByteArray() {
godot::api->pandemonium_pool_byte_array_destroy(&_pandemonium_array);
pandemonium::api->pandemonium_pool_byte_array_destroy(&_pandemonium_array);
}
PoolIntArray::PoolIntArray() {
godot::api->pandemonium_pool_int_array_new(&_pandemonium_array);
pandemonium::api->pandemonium_pool_int_array_new(&_pandemonium_array);
}
PoolIntArray::PoolIntArray(const PoolIntArray &p_other) {
godot::api->pandemonium_pool_int_array_new_copy(&_pandemonium_array, &p_other._pandemonium_array);
pandemonium::api->pandemonium_pool_int_array_new_copy(&_pandemonium_array, &p_other._pandemonium_array);
}
PoolIntArray &PoolIntArray::operator=(const PoolIntArray &p_other) {
godot::api->pandemonium_pool_int_array_destroy(&_pandemonium_array);
godot::api->pandemonium_pool_int_array_new_copy(&_pandemonium_array, &p_other._pandemonium_array);
pandemonium::api->pandemonium_pool_int_array_destroy(&_pandemonium_array);
pandemonium::api->pandemonium_pool_int_array_new_copy(&_pandemonium_array, &p_other._pandemonium_array);
return *this;
}
PoolIntArray::PoolIntArray(const Array &array) {
godot::api->pandemonium_pool_int_array_new_with_array(&_pandemonium_array, (pandemonium_array *)&array);
pandemonium::api->pandemonium_pool_int_array_new_with_array(&_pandemonium_array, (pandemonium_array *)&array);
}
PoolIntArray::Read PoolIntArray::read() const {
Read read;
read._read_access = godot::api->pandemonium_pool_int_array_read(&_pandemonium_array);
read._read_access = pandemonium::api->pandemonium_pool_int_array_read(&_pandemonium_array);
return read;
}
PoolIntArray::Write PoolIntArray::write() {
Write write;
write._write_access = godot::api->pandemonium_pool_int_array_write(&_pandemonium_array);
write._write_access = pandemonium::api->pandemonium_pool_int_array_write(&_pandemonium_array);
return write;
}
void PoolIntArray::append(const int data) {
godot::api->pandemonium_pool_int_array_append(&_pandemonium_array, data);
pandemonium::api->pandemonium_pool_int_array_append(&_pandemonium_array, data);
}
void PoolIntArray::append_array(const PoolIntArray &array) {
godot::api->pandemonium_pool_int_array_append_array(&_pandemonium_array, &array._pandemonium_array);
pandemonium::api->pandemonium_pool_int_array_append_array(&_pandemonium_array, &array._pandemonium_array);
}
int PoolIntArray::insert(const int idx, const int data) {
return godot::api->pandemonium_pool_int_array_insert(&_pandemonium_array, idx, data);
return pandemonium::api->pandemonium_pool_int_array_insert(&_pandemonium_array, idx, data);
}
void PoolIntArray::invert() {
godot::api->pandemonium_pool_int_array_invert(&_pandemonium_array);
pandemonium::api->pandemonium_pool_int_array_invert(&_pandemonium_array);
}
void PoolIntArray::push_back(const int data) {
godot::api->pandemonium_pool_int_array_push_back(&_pandemonium_array, data);
pandemonium::api->pandemonium_pool_int_array_push_back(&_pandemonium_array, data);
}
void PoolIntArray::remove(const int idx) {
godot::api->pandemonium_pool_int_array_remove(&_pandemonium_array, idx);
pandemonium::api->pandemonium_pool_int_array_remove(&_pandemonium_array, idx);
}
void PoolIntArray::resize(const int size) {
godot::api->pandemonium_pool_int_array_resize(&_pandemonium_array, size);
pandemonium::api->pandemonium_pool_int_array_resize(&_pandemonium_array, size);
}
void PoolIntArray::set(const int idx, const int data) {
godot::api->pandemonium_pool_int_array_set(&_pandemonium_array, idx, data);
pandemonium::api->pandemonium_pool_int_array_set(&_pandemonium_array, idx, data);
}
int PoolIntArray::operator[](const int idx) {
return godot::api->pandemonium_pool_int_array_get(&_pandemonium_array, idx);
return pandemonium::api->pandemonium_pool_int_array_get(&_pandemonium_array, idx);
}
int PoolIntArray::size() const {
return godot::api->pandemonium_pool_int_array_size(&_pandemonium_array);
return pandemonium::api->pandemonium_pool_int_array_size(&_pandemonium_array);
}
PoolIntArray::~PoolIntArray() {
godot::api->pandemonium_pool_int_array_destroy(&_pandemonium_array);
pandemonium::api->pandemonium_pool_int_array_destroy(&_pandemonium_array);
}
PoolRealArray::PoolRealArray() {
godot::api->pandemonium_pool_real_array_new(&_pandemonium_array);
pandemonium::api->pandemonium_pool_real_array_new(&_pandemonium_array);
}
PoolRealArray::PoolRealArray(const PoolRealArray &p_other) {
godot::api->pandemonium_pool_real_array_new_copy(&_pandemonium_array, &p_other._pandemonium_array);
pandemonium::api->pandemonium_pool_real_array_new_copy(&_pandemonium_array, &p_other._pandemonium_array);
}
PoolRealArray &PoolRealArray::operator=(const PoolRealArray &p_other) {
godot::api->pandemonium_pool_real_array_destroy(&_pandemonium_array);
godot::api->pandemonium_pool_real_array_new_copy(&_pandemonium_array, &p_other._pandemonium_array);
pandemonium::api->pandemonium_pool_real_array_destroy(&_pandemonium_array);
pandemonium::api->pandemonium_pool_real_array_new_copy(&_pandemonium_array, &p_other._pandemonium_array);
return *this;
}
PoolRealArray::Read PoolRealArray::read() const {
Read read;
read._read_access = godot::api->pandemonium_pool_real_array_read(&_pandemonium_array);
read._read_access = pandemonium::api->pandemonium_pool_real_array_read(&_pandemonium_array);
return read;
}
PoolRealArray::Write PoolRealArray::write() {
Write write;
write._write_access = godot::api->pandemonium_pool_real_array_write(&_pandemonium_array);
write._write_access = pandemonium::api->pandemonium_pool_real_array_write(&_pandemonium_array);
return write;
}
PoolRealArray::PoolRealArray(const Array &array) {
godot::api->pandemonium_pool_real_array_new_with_array(&_pandemonium_array, (pandemonium_array *)&array);
pandemonium::api->pandemonium_pool_real_array_new_with_array(&_pandemonium_array, (pandemonium_array *)&array);
}
void PoolRealArray::append(const real_t data) {
godot::api->pandemonium_pool_real_array_append(&_pandemonium_array, data);
pandemonium::api->pandemonium_pool_real_array_append(&_pandemonium_array, data);
}
void PoolRealArray::append_array(const PoolRealArray &array) {
godot::api->pandemonium_pool_real_array_append_array(&_pandemonium_array, &array._pandemonium_array);
pandemonium::api->pandemonium_pool_real_array_append_array(&_pandemonium_array, &array._pandemonium_array);
}
int PoolRealArray::insert(const int idx, const real_t data) {
return godot::api->pandemonium_pool_real_array_insert(&_pandemonium_array, idx, data);
return pandemonium::api->pandemonium_pool_real_array_insert(&_pandemonium_array, idx, data);
}
void PoolRealArray::invert() {
godot::api->pandemonium_pool_real_array_invert(&_pandemonium_array);
pandemonium::api->pandemonium_pool_real_array_invert(&_pandemonium_array);
}
void PoolRealArray::push_back(const real_t data) {
godot::api->pandemonium_pool_real_array_push_back(&_pandemonium_array, data);
pandemonium::api->pandemonium_pool_real_array_push_back(&_pandemonium_array, data);
}
void PoolRealArray::remove(const int idx) {
godot::api->pandemonium_pool_real_array_remove(&_pandemonium_array, idx);
pandemonium::api->pandemonium_pool_real_array_remove(&_pandemonium_array, idx);
}
void PoolRealArray::resize(const int size) {
godot::api->pandemonium_pool_real_array_resize(&_pandemonium_array, size);
pandemonium::api->pandemonium_pool_real_array_resize(&_pandemonium_array, size);
}
void PoolRealArray::set(const int idx, const real_t data) {
godot::api->pandemonium_pool_real_array_set(&_pandemonium_array, idx, data);
pandemonium::api->pandemonium_pool_real_array_set(&_pandemonium_array, idx, data);
}
real_t PoolRealArray::operator[](const int idx) {
return godot::api->pandemonium_pool_real_array_get(&_pandemonium_array, idx);
return pandemonium::api->pandemonium_pool_real_array_get(&_pandemonium_array, idx);
}
int PoolRealArray::size() const {
return godot::api->pandemonium_pool_real_array_size(&_pandemonium_array);
return pandemonium::api->pandemonium_pool_real_array_size(&_pandemonium_array);
}
PoolRealArray::~PoolRealArray() {
godot::api->pandemonium_pool_real_array_destroy(&_pandemonium_array);
pandemonium::api->pandemonium_pool_real_array_destroy(&_pandemonium_array);
}
PoolStringArray::PoolStringArray() {
godot::api->pandemonium_pool_string_array_new(&_pandemonium_array);
pandemonium::api->pandemonium_pool_string_array_new(&_pandemonium_array);
}
PoolStringArray::PoolStringArray(const PoolStringArray &p_other) {
godot::api->pandemonium_pool_string_array_new_copy(&_pandemonium_array, &p_other._pandemonium_array);
pandemonium::api->pandemonium_pool_string_array_new_copy(&_pandemonium_array, &p_other._pandemonium_array);
}
PoolStringArray &PoolStringArray::operator=(const PoolStringArray &p_other) {
godot::api->pandemonium_pool_string_array_destroy(&_pandemonium_array);
godot::api->pandemonium_pool_string_array_new_copy(&_pandemonium_array, &p_other._pandemonium_array);
pandemonium::api->pandemonium_pool_string_array_destroy(&_pandemonium_array);
pandemonium::api->pandemonium_pool_string_array_new_copy(&_pandemonium_array, &p_other._pandemonium_array);
return *this;
}
PoolStringArray::PoolStringArray(const Array &array) {
godot::api->pandemonium_pool_string_array_new_with_array(&_pandemonium_array, (pandemonium_array *)&array);
pandemonium::api->pandemonium_pool_string_array_new_with_array(&_pandemonium_array, (pandemonium_array *)&array);
}
PoolStringArray::Read PoolStringArray::read() const {
Read read;
read._read_access = godot::api->pandemonium_pool_string_array_read(&_pandemonium_array);
read._read_access = pandemonium::api->pandemonium_pool_string_array_read(&_pandemonium_array);
return read;
}
PoolStringArray::Write PoolStringArray::write() {
Write write;
write._write_access = godot::api->pandemonium_pool_string_array_write(&_pandemonium_array);
write._write_access = pandemonium::api->pandemonium_pool_string_array_write(&_pandemonium_array);
return write;
}
void PoolStringArray::append(const String &data) {
godot::api->pandemonium_pool_string_array_append(&_pandemonium_array, (pandemonium_string *)&data);
pandemonium::api->pandemonium_pool_string_array_append(&_pandemonium_array, (pandemonium_string *)&data);
}
void PoolStringArray::append_array(const PoolStringArray &array) {
godot::api->pandemonium_pool_string_array_append_array(&_pandemonium_array, &array._pandemonium_array);
pandemonium::api->pandemonium_pool_string_array_append_array(&_pandemonium_array, &array._pandemonium_array);
}
int PoolStringArray::insert(const int idx, const String &data) {
return godot::api->pandemonium_pool_string_array_insert(&_pandemonium_array, idx, (pandemonium_string *)&data);
return pandemonium::api->pandemonium_pool_string_array_insert(&_pandemonium_array, idx, (pandemonium_string *)&data);
}
void PoolStringArray::invert() {
godot::api->pandemonium_pool_string_array_invert(&_pandemonium_array);
pandemonium::api->pandemonium_pool_string_array_invert(&_pandemonium_array);
}
void PoolStringArray::push_back(const String &data) {
godot::api->pandemonium_pool_string_array_push_back(&_pandemonium_array, (pandemonium_string *)&data);
pandemonium::api->pandemonium_pool_string_array_push_back(&_pandemonium_array, (pandemonium_string *)&data);
}
void PoolStringArray::remove(const int idx) {
godot::api->pandemonium_pool_string_array_remove(&_pandemonium_array, idx);
pandemonium::api->pandemonium_pool_string_array_remove(&_pandemonium_array, idx);
}
void PoolStringArray::resize(const int size) {
godot::api->pandemonium_pool_string_array_resize(&_pandemonium_array, size);
pandemonium::api->pandemonium_pool_string_array_resize(&_pandemonium_array, size);
}
void PoolStringArray::set(const int idx, const String &data) {
godot::api->pandemonium_pool_string_array_set(&_pandemonium_array, idx, (pandemonium_string *)&data);
pandemonium::api->pandemonium_pool_string_array_set(&_pandemonium_array, idx, (pandemonium_string *)&data);
}
const String PoolStringArray::operator[](const int idx) {
String s;
pandemonium_string str = godot::api->pandemonium_pool_string_array_get(&_pandemonium_array, idx);
godot::api->pandemonium_string_new_copy((pandemonium_string *)&s, &str);
godot::api->pandemonium_string_destroy(&str);
pandemonium_string str = pandemonium::api->pandemonium_pool_string_array_get(&_pandemonium_array, idx);
pandemonium::api->pandemonium_string_new_copy((pandemonium_string *)&s, &str);
pandemonium::api->pandemonium_string_destroy(&str);
return s;
}
int PoolStringArray::size() const {
return godot::api->pandemonium_pool_string_array_size(&_pandemonium_array);
return pandemonium::api->pandemonium_pool_string_array_size(&_pandemonium_array);
}
PoolStringArray::~PoolStringArray() {
godot::api->pandemonium_pool_string_array_destroy(&_pandemonium_array);
pandemonium::api->pandemonium_pool_string_array_destroy(&_pandemonium_array);
}
PoolVector2Array::PoolVector2Array() {
godot::api->pandemonium_pool_vector2_array_new(&_pandemonium_array);
pandemonium::api->pandemonium_pool_vector2_array_new(&_pandemonium_array);
}
PoolVector2Array::PoolVector2Array(const PoolVector2Array &p_other) {
godot::api->pandemonium_pool_vector2_array_new_copy(&_pandemonium_array, &p_other._pandemonium_array);
pandemonium::api->pandemonium_pool_vector2_array_new_copy(&_pandemonium_array, &p_other._pandemonium_array);
}
PoolVector2Array &PoolVector2Array::operator=(const PoolVector2Array &p_other) {
godot::api->pandemonium_pool_vector2_array_destroy(&_pandemonium_array);
godot::api->pandemonium_pool_vector2_array_new_copy(&_pandemonium_array, &p_other._pandemonium_array);
pandemonium::api->pandemonium_pool_vector2_array_destroy(&_pandemonium_array);
pandemonium::api->pandemonium_pool_vector2_array_new_copy(&_pandemonium_array, &p_other._pandemonium_array);
return *this;
}
PoolVector2Array::PoolVector2Array(const Array &array) {
godot::api->pandemonium_pool_vector2_array_new_with_array(&_pandemonium_array, (pandemonium_array *)&array);
pandemonium::api->pandemonium_pool_vector2_array_new_with_array(&_pandemonium_array, (pandemonium_array *)&array);
}
PoolVector2Array::Read PoolVector2Array::read() const {
Read read;
read._read_access = godot::api->pandemonium_pool_vector2_array_read(&_pandemonium_array);
read._read_access = pandemonium::api->pandemonium_pool_vector2_array_read(&_pandemonium_array);
return read;
}
PoolVector2Array::Write PoolVector2Array::write() {
Write write;
write._write_access = godot::api->pandemonium_pool_vector2_array_write(&_pandemonium_array);
write._write_access = pandemonium::api->pandemonium_pool_vector2_array_write(&_pandemonium_array);
return write;
}
void PoolVector2Array::append(const Vector2 &data) {
godot::api->pandemonium_pool_vector2_array_append(&_pandemonium_array, (pandemonium_vector2 *)&data);
pandemonium::api->pandemonium_pool_vector2_array_append(&_pandemonium_array, (pandemonium_vector2 *)&data);
}
void PoolVector2Array::append_array(const PoolVector2Array &array) {
godot::api->pandemonium_pool_vector2_array_append_array(&_pandemonium_array, &array._pandemonium_array);
pandemonium::api->pandemonium_pool_vector2_array_append_array(&_pandemonium_array, &array._pandemonium_array);
}
int PoolVector2Array::insert(const int idx, const Vector2 &data) {
return godot::api->pandemonium_pool_vector2_array_insert(&_pandemonium_array, idx, (pandemonium_vector2 *)&data);
return pandemonium::api->pandemonium_pool_vector2_array_insert(&_pandemonium_array, idx, (pandemonium_vector2 *)&data);
}
void PoolVector2Array::invert() {
godot::api->pandemonium_pool_vector2_array_invert(&_pandemonium_array);
pandemonium::api->pandemonium_pool_vector2_array_invert(&_pandemonium_array);
}
void PoolVector2Array::push_back(const Vector2 &data) {
godot::api->pandemonium_pool_vector2_array_push_back(&_pandemonium_array, (pandemonium_vector2 *)&data);
pandemonium::api->pandemonium_pool_vector2_array_push_back(&_pandemonium_array, (pandemonium_vector2 *)&data);
}
void PoolVector2Array::remove(const int idx) {
godot::api->pandemonium_pool_vector2_array_remove(&_pandemonium_array, idx);
pandemonium::api->pandemonium_pool_vector2_array_remove(&_pandemonium_array, idx);
}
void PoolVector2Array::resize(const int size) {
godot::api->pandemonium_pool_vector2_array_resize(&_pandemonium_array, size);
pandemonium::api->pandemonium_pool_vector2_array_resize(&_pandemonium_array, size);
}
void PoolVector2Array::set(const int idx, const Vector2 &data) {
godot::api->pandemonium_pool_vector2_array_set(&_pandemonium_array, idx, (pandemonium_vector2 *)&data);
pandemonium::api->pandemonium_pool_vector2_array_set(&_pandemonium_array, idx, (pandemonium_vector2 *)&data);
}
const Vector2 PoolVector2Array::operator[](const int idx) {
Vector2 v;
*(pandemonium_vector2 *)&v = godot::api->pandemonium_pool_vector2_array_get(&_pandemonium_array, idx);
*(pandemonium_vector2 *)&v = pandemonium::api->pandemonium_pool_vector2_array_get(&_pandemonium_array, idx);
return v;
}
int PoolVector2Array::size() const {
return godot::api->pandemonium_pool_vector2_array_size(&_pandemonium_array);
return pandemonium::api->pandemonium_pool_vector2_array_size(&_pandemonium_array);
}
PoolVector2Array::~PoolVector2Array() {
godot::api->pandemonium_pool_vector2_array_destroy(&_pandemonium_array);
pandemonium::api->pandemonium_pool_vector2_array_destroy(&_pandemonium_array);
}
PoolVector2iArray::PoolVector2iArray() {
godot::api->pandemonium_pool_vector2i_array_new(&_pandemonium_array);
pandemonium::api->pandemonium_pool_vector2i_array_new(&_pandemonium_array);
}
PoolVector2iArray::PoolVector2iArray(const PoolVector2iArray &p_other) {
godot::api->pandemonium_pool_vector2i_array_new_copy(&_pandemonium_array, &p_other._pandemonium_array);
pandemonium::api->pandemonium_pool_vector2i_array_new_copy(&_pandemonium_array, &p_other._pandemonium_array);
}
PoolVector2iArray &PoolVector2iArray::operator=(const PoolVector2iArray &p_other) {
godot::api->pandemonium_pool_vector2i_array_destroy(&_pandemonium_array);
godot::api->pandemonium_pool_vector2i_array_new_copy(&_pandemonium_array, &p_other._pandemonium_array);
pandemonium::api->pandemonium_pool_vector2i_array_destroy(&_pandemonium_array);
pandemonium::api->pandemonium_pool_vector2i_array_new_copy(&_pandemonium_array, &p_other._pandemonium_array);
return *this;
}
PoolVector2iArray::PoolVector2iArray(const Array &array) {
godot::api->pandemonium_pool_vector2i_array_new_with_array(&_pandemonium_array, (pandemonium_array *)&array);
pandemonium::api->pandemonium_pool_vector2i_array_new_with_array(&_pandemonium_array, (pandemonium_array *)&array);
}
PoolVector2iArray::Read PoolVector2iArray::read() const {
Read read;
read._read_access = godot::api->pandemonium_pool_vector2i_array_read(&_pandemonium_array);
read._read_access = pandemonium::api->pandemonium_pool_vector2i_array_read(&_pandemonium_array);
return read;
}
PoolVector2iArray::Write PoolVector2iArray::write() {
Write write;
write._write_access = godot::api->pandemonium_pool_vector2i_array_write(&_pandemonium_array);
write._write_access = pandemonium::api->pandemonium_pool_vector2i_array_write(&_pandemonium_array);
return write;
}
void PoolVector2iArray::append(const Vector2i &data) {
godot::api->pandemonium_pool_vector2i_array_append(&_pandemonium_array, (pandemonium_vector2i *)&data);
pandemonium::api->pandemonium_pool_vector2i_array_append(&_pandemonium_array, (pandemonium_vector2i *)&data);
}
void PoolVector2iArray::append_array(const PoolVector2iArray &array) {
godot::api->pandemonium_pool_vector2i_array_append_array(&_pandemonium_array, &array._pandemonium_array);
pandemonium::api->pandemonium_pool_vector2i_array_append_array(&_pandemonium_array, &array._pandemonium_array);
}
int PoolVector2iArray::insert(const int idx, const Vector2i &data) {
return godot::api->pandemonium_pool_vector2i_array_insert(&_pandemonium_array, idx, (pandemonium_vector2i *)&data);
return pandemonium::api->pandemonium_pool_vector2i_array_insert(&_pandemonium_array, idx, (pandemonium_vector2i *)&data);
}
void PoolVector2iArray::invert() {
godot::api->pandemonium_pool_vector2i_array_invert(&_pandemonium_array);
pandemonium::api->pandemonium_pool_vector2i_array_invert(&_pandemonium_array);
}
void PoolVector2iArray::push_back(const Vector2i &data) {
godot::api->pandemonium_pool_vector2i_array_push_back(&_pandemonium_array, (pandemonium_vector2i *)&data);
pandemonium::api->pandemonium_pool_vector2i_array_push_back(&_pandemonium_array, (pandemonium_vector2i *)&data);
}
void PoolVector2iArray::remove(const int idx) {
godot::api->pandemonium_pool_vector2i_array_remove(&_pandemonium_array, idx);
pandemonium::api->pandemonium_pool_vector2i_array_remove(&_pandemonium_array, idx);
}
void PoolVector2iArray::resize(const int size) {
godot::api->pandemonium_pool_vector2i_array_resize(&_pandemonium_array, size);
pandemonium::api->pandemonium_pool_vector2i_array_resize(&_pandemonium_array, size);
}
void PoolVector2iArray::set(const int idx, const Vector2i &data) {
godot::api->pandemonium_pool_vector2i_array_set(&_pandemonium_array, idx, (pandemonium_vector2i *)&data);
pandemonium::api->pandemonium_pool_vector2i_array_set(&_pandemonium_array, idx, (pandemonium_vector2i *)&data);
}
const Vector2i PoolVector2iArray::operator[](const int idx) {
Vector2i v;
*(pandemonium_vector2i *)&v = godot::api->pandemonium_pool_vector2i_array_get(&_pandemonium_array, idx);
*(pandemonium_vector2i *)&v = pandemonium::api->pandemonium_pool_vector2i_array_get(&_pandemonium_array, idx);
return v;
}
int PoolVector2iArray::size() const {
return godot::api->pandemonium_pool_vector2i_array_size(&_pandemonium_array);
return pandemonium::api->pandemonium_pool_vector2i_array_size(&_pandemonium_array);
}
PoolVector2iArray::~PoolVector2iArray() {
godot::api->pandemonium_pool_vector2i_array_destroy(&_pandemonium_array);
pandemonium::api->pandemonium_pool_vector2i_array_destroy(&_pandemonium_array);
}
PoolVector3Array::PoolVector3Array() {
godot::api->pandemonium_pool_vector3_array_new(&_pandemonium_array);
pandemonium::api->pandemonium_pool_vector3_array_new(&_pandemonium_array);
}
PoolVector3Array::PoolVector3Array(const PoolVector3Array &p_other) {
godot::api->pandemonium_pool_vector3_array_new_copy(&_pandemonium_array, &p_other._pandemonium_array);
pandemonium::api->pandemonium_pool_vector3_array_new_copy(&_pandemonium_array, &p_other._pandemonium_array);
}
PoolVector3Array &PoolVector3Array::operator=(const PoolVector3Array &p_other) {
godot::api->pandemonium_pool_vector3_array_destroy(&_pandemonium_array);
godot::api->pandemonium_pool_vector3_array_new_copy(&_pandemonium_array, &p_other._pandemonium_array);
pandemonium::api->pandemonium_pool_vector3_array_destroy(&_pandemonium_array);
pandemonium::api->pandemonium_pool_vector3_array_new_copy(&_pandemonium_array, &p_other._pandemonium_array);
return *this;
}
PoolVector3Array::PoolVector3Array(const Array &array) {
godot::api->pandemonium_pool_vector3_array_new_with_array(&_pandemonium_array, (pandemonium_array *)&array);
pandemonium::api->pandemonium_pool_vector3_array_new_with_array(&_pandemonium_array, (pandemonium_array *)&array);
}
PoolVector3Array::Read PoolVector3Array::read() const {
Read read;
read._read_access = godot::api->pandemonium_pool_vector3_array_read(&_pandemonium_array);
read._read_access = pandemonium::api->pandemonium_pool_vector3_array_read(&_pandemonium_array);
return read;
}
PoolVector3Array::Write PoolVector3Array::write() {
Write write;
write._write_access = godot::api->pandemonium_pool_vector3_array_write(&_pandemonium_array);
write._write_access = pandemonium::api->pandemonium_pool_vector3_array_write(&_pandemonium_array);
return write;
}
void PoolVector3Array::append(const Vector3 &data) {
godot::api->pandemonium_pool_vector3_array_append(&_pandemonium_array, (pandemonium_vector3 *)&data);
pandemonium::api->pandemonium_pool_vector3_array_append(&_pandemonium_array, (pandemonium_vector3 *)&data);
}
void PoolVector3Array::append_array(const PoolVector3Array &array) {
godot::api->pandemonium_pool_vector3_array_append_array(&_pandemonium_array, &array._pandemonium_array);
pandemonium::api->pandemonium_pool_vector3_array_append_array(&_pandemonium_array, &array._pandemonium_array);
}
int PoolVector3Array::insert(const int idx, const Vector3 &data) {
return godot::api->pandemonium_pool_vector3_array_insert(&_pandemonium_array, idx, (pandemonium_vector3 *)&data);
return pandemonium::api->pandemonium_pool_vector3_array_insert(&_pandemonium_array, idx, (pandemonium_vector3 *)&data);
}
void PoolVector3Array::invert() {
godot::api->pandemonium_pool_vector3_array_invert(&_pandemonium_array);
pandemonium::api->pandemonium_pool_vector3_array_invert(&_pandemonium_array);
}
void PoolVector3Array::push_back(const Vector3 &data) {
godot::api->pandemonium_pool_vector3_array_push_back(&_pandemonium_array, (pandemonium_vector3 *)&data);
pandemonium::api->pandemonium_pool_vector3_array_push_back(&_pandemonium_array, (pandemonium_vector3 *)&data);
}
void PoolVector3Array::remove(const int idx) {
godot::api->pandemonium_pool_vector3_array_remove(&_pandemonium_array, idx);
pandemonium::api->pandemonium_pool_vector3_array_remove(&_pandemonium_array, idx);
}
void PoolVector3Array::resize(const int size) {
godot::api->pandemonium_pool_vector3_array_resize(&_pandemonium_array, size);
pandemonium::api->pandemonium_pool_vector3_array_resize(&_pandemonium_array, size);
}
void PoolVector3Array::set(const int idx, const Vector3 &data) {
godot::api->pandemonium_pool_vector3_array_set(&_pandemonium_array, idx, (pandemonium_vector3 *)&data);
pandemonium::api->pandemonium_pool_vector3_array_set(&_pandemonium_array, idx, (pandemonium_vector3 *)&data);
}
const Vector3 PoolVector3Array::operator[](const int idx) {
Vector3 v;
*(pandemonium_vector3 *)&v = godot::api->pandemonium_pool_vector3_array_get(&_pandemonium_array, idx);
*(pandemonium_vector3 *)&v = pandemonium::api->pandemonium_pool_vector3_array_get(&_pandemonium_array, idx);
return v;
}
int PoolVector3Array::size() const {
return godot::api->pandemonium_pool_vector3_array_size(&_pandemonium_array);
return pandemonium::api->pandemonium_pool_vector3_array_size(&_pandemonium_array);
}
PoolVector3Array::~PoolVector3Array() {
godot::api->pandemonium_pool_vector3_array_destroy(&_pandemonium_array);
pandemonium::api->pandemonium_pool_vector3_array_destroy(&_pandemonium_array);
}
PoolColorArray::PoolColorArray() {
godot::api->pandemonium_pool_color_array_new(&_pandemonium_array);
pandemonium::api->pandemonium_pool_color_array_new(&_pandemonium_array);
}
PoolColorArray::PoolColorArray(const PoolColorArray &p_other) {
godot::api->pandemonium_pool_color_array_new_copy(&_pandemonium_array, &p_other._pandemonium_array);
pandemonium::api->pandemonium_pool_color_array_new_copy(&_pandemonium_array, &p_other._pandemonium_array);
}
PoolColorArray &PoolColorArray::operator=(const PoolColorArray &p_other) {
godot::api->pandemonium_pool_color_array_destroy(&_pandemonium_array);
godot::api->pandemonium_pool_color_array_new_copy(&_pandemonium_array, &p_other._pandemonium_array);
pandemonium::api->pandemonium_pool_color_array_destroy(&_pandemonium_array);
pandemonium::api->pandemonium_pool_color_array_new_copy(&_pandemonium_array, &p_other._pandemonium_array);
return *this;
}
PoolColorArray::PoolColorArray(const Array &array) {
godot::api->pandemonium_pool_color_array_new_with_array(&_pandemonium_array, (pandemonium_array *)&array);
pandemonium::api->pandemonium_pool_color_array_new_with_array(&_pandemonium_array, (pandemonium_array *)&array);
}
PoolColorArray::Read PoolColorArray::read() const {
Read read;
read._read_access = godot::api->pandemonium_pool_color_array_read(&_pandemonium_array);
read._read_access = pandemonium::api->pandemonium_pool_color_array_read(&_pandemonium_array);
return read;
}
PoolColorArray::Write PoolColorArray::write() {
Write write;
write._write_access = godot::api->pandemonium_pool_color_array_write(&_pandemonium_array);
write._write_access = pandemonium::api->pandemonium_pool_color_array_write(&_pandemonium_array);
return write;
}
void PoolColorArray::append(const Color &data) {
godot::api->pandemonium_pool_color_array_append(&_pandemonium_array, (pandemonium_color *)&data);
pandemonium::api->pandemonium_pool_color_array_append(&_pandemonium_array, (pandemonium_color *)&data);
}
void PoolColorArray::append_array(const PoolColorArray &array) {
godot::api->pandemonium_pool_color_array_append_array(&_pandemonium_array, &array._pandemonium_array);
pandemonium::api->pandemonium_pool_color_array_append_array(&_pandemonium_array, &array._pandemonium_array);
}
int PoolColorArray::insert(const int idx, const Color &data) {
return godot::api->pandemonium_pool_color_array_insert(&_pandemonium_array, idx, (pandemonium_color *)&data);
return pandemonium::api->pandemonium_pool_color_array_insert(&_pandemonium_array, idx, (pandemonium_color *)&data);
}
void PoolColorArray::invert() {
godot::api->pandemonium_pool_color_array_invert(&_pandemonium_array);
pandemonium::api->pandemonium_pool_color_array_invert(&_pandemonium_array);
}
void PoolColorArray::push_back(const Color &data) {
godot::api->pandemonium_pool_color_array_push_back(&_pandemonium_array, (pandemonium_color *)&data);
pandemonium::api->pandemonium_pool_color_array_push_back(&_pandemonium_array, (pandemonium_color *)&data);
}
void PoolColorArray::remove(const int idx) {
godot::api->pandemonium_pool_color_array_remove(&_pandemonium_array, idx);
pandemonium::api->pandemonium_pool_color_array_remove(&_pandemonium_array, idx);
}
void PoolColorArray::resize(const int size) {
godot::api->pandemonium_pool_color_array_resize(&_pandemonium_array, size);
pandemonium::api->pandemonium_pool_color_array_resize(&_pandemonium_array, size);
}
void PoolColorArray::set(const int idx, const Color &data) {
godot::api->pandemonium_pool_color_array_set(&_pandemonium_array, idx, (pandemonium_color *)&data);
pandemonium::api->pandemonium_pool_color_array_set(&_pandemonium_array, idx, (pandemonium_color *)&data);
}
const Color PoolColorArray::operator[](const int idx) {
Color v;
*(pandemonium_color *)&v = godot::api->pandemonium_pool_color_array_get(&_pandemonium_array, idx);
*(pandemonium_color *)&v = pandemonium::api->pandemonium_pool_color_array_get(&_pandemonium_array, idx);
return v;
}
int PoolColorArray::size() const {
return godot::api->pandemonium_pool_color_array_size(&_pandemonium_array);
return pandemonium::api->pandemonium_pool_color_array_size(&_pandemonium_array);
}
PoolColorArray::~PoolColorArray() {
godot::api->pandemonium_pool_color_array_destroy(&_pandemonium_array);
pandemonium::api->pandemonium_pool_color_array_destroy(&_pandemonium_array);
}
} // namespace godot
} // namespace pandemonium

View File

@ -2,11 +2,11 @@
/* Projection.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/* PANDEMONIUM ENGINE */
/* https://pandemoniumengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
/* Copyright (c) 2014-2022 Pandemonium Engine contributors (cf. AUTHORS.md). */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */

View File

@ -2,11 +2,11 @@
/* Quaternion.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/* PANDEMONIUM ENGINE */
/* https://pandemoniumengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
/* Copyright (c) 2014-2022 Pandemonium Engine contributors (cf. AUTHORS.md). */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@ -35,7 +35,7 @@
#include <cmath>
namespace godot {
namespace pandemonium {
const Quaternion Quaternion::IDENTITY = Quaternion();
@ -349,4 +349,4 @@ bool Quaternion::operator!=(const Quaternion &p_quaternion) const {
return x != p_quaternion.x || y != p_quaternion.y || z != p_quaternion.z || w != p_quaternion.w;
}
} // namespace godot
} // namespace pandemonium

View File

@ -2,11 +2,11 @@
/* RID.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/* PANDEMONIUM ENGINE */
/* https://pandemoniumengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
/* Copyright (c) 2014-2022 Pandemonium Engine contributors (cf. AUTHORS.md). */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@ -32,16 +32,16 @@
#include <gdn/rid.h>
#include "GodotGlobal.hpp"
#include "PandemoniumGlobal.hpp"
namespace godot {
namespace pandemonium {
RID::RID() {
godot::api->pandemonium_rid_new(&_pandemonium_rid);
pandemonium::api->pandemonium_rid_new(&_pandemonium_rid);
}
RID::RID(Object *p) {
godot::api->pandemonium_rid_new_with_resource(&_pandemonium_rid, (const pandemonium_object *)p);
pandemonium::api->pandemonium_rid_new_with_resource(&_pandemonium_rid, (const pandemonium_object *)p);
}
pandemonium_rid RID::_get_pandemonium_rid() const {
@ -49,11 +49,11 @@ pandemonium_rid RID::_get_pandemonium_rid() const {
}
int32_t RID::get_id() const {
return godot::api->pandemonium_rid_get_id(&_pandemonium_rid);
return pandemonium::api->pandemonium_rid_get_id(&_pandemonium_rid);
}
bool RID::operator==(const RID &p_other) const {
return godot::api->pandemonium_rid_operator_equal(&_pandemonium_rid, &p_other._pandemonium_rid);
return pandemonium::api->pandemonium_rid_operator_equal(&_pandemonium_rid, &p_other._pandemonium_rid);
}
bool RID::operator!=(const RID &p_other) const {
@ -61,7 +61,7 @@ bool RID::operator!=(const RID &p_other) const {
}
bool RID::operator<(const RID &p_other) const {
return godot::api->pandemonium_rid_operator_less(&_pandemonium_rid, &p_other._pandemonium_rid);
return pandemonium::api->pandemonium_rid_operator_less(&_pandemonium_rid, &p_other._pandemonium_rid);
}
bool RID::operator>(const RID &p_other) const {
@ -76,4 +76,4 @@ bool RID::operator>=(const RID &p_other) const {
return !(*this < p_other);
}
} // namespace godot
} // namespace pandemonium

View File

@ -2,11 +2,11 @@
/* Rect2.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/* PANDEMONIUM ENGINE */
/* https://pandemoniumengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
/* Copyright (c) 2014-2022 Pandemonium Engine contributors (cf. AUTHORS.md). */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@ -35,7 +35,7 @@
#include <cmath>
namespace godot {
namespace pandemonium {
#ifndef MAX
#define MAX(a, b) (a > b ? a : b)
@ -320,4 +320,4 @@ next4:
return true;
}
} // namespace godot
} // namespace pandemonium

View File

@ -2,11 +2,11 @@
/* Rect2.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/* PANDEMONIUM ENGINE */
/* https://pandemoniumengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
/* Copyright (c) 2014-2022 Pandemonium Engine contributors (cf. AUTHORS.md). */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@ -32,10 +32,10 @@
#include "String.hpp"
#include "Vector2i.hpp"
namespace godot {
namespace pandemonium {
Rect2i::operator String() const {
return String(position) + ", " + String(size);
}
} // namespace godot
} // namespace pandemonium

View File

@ -2,11 +2,11 @@
/* String.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/* PANDEMONIUM ENGINE */
/* https://pandemoniumengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
/* Copyright (c) 2014-2022 Pandemonium Engine contributors (cf. AUTHORS.md). */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@ -31,7 +31,7 @@
#include "String.hpp"
#include "Array.hpp"
#include "GodotGlobal.hpp"
#include "PandemoniumGlobal.hpp"
#include "NodePath.hpp"
#include "PoolArrays.hpp"
#include "Variant.hpp"
@ -40,101 +40,101 @@
#include <string.h>
namespace godot {
namespace pandemonium {
godot::CharString::~CharString() {
godot::api->pandemonium_char_string_destroy(&_char_string);
pandemonium::CharString::~CharString() {
pandemonium::api->pandemonium_char_string_destroy(&_char_string);
}
int godot::CharString::length() const {
return godot::api->pandemonium_char_string_length(&_char_string);
int pandemonium::CharString::length() const {
return pandemonium::api->pandemonium_char_string_length(&_char_string);
}
const char *godot::CharString::get_data() const {
return godot::api->pandemonium_char_string_get_data(&_char_string);
const char *pandemonium::CharString::get_data() const {
return pandemonium::api->pandemonium_char_string_get_data(&_char_string);
}
String String::num(double p_num, int p_decimals) {
return String(godot::api->pandemonium_string_num_with_decimals(p_num, p_decimals));
return String(pandemonium::api->pandemonium_string_num_with_decimals(p_num, p_decimals));
}
String String::num_scientific(double p_num) {
return String(godot::api->pandemonium_string_num_scientific(p_num));
return String(pandemonium::api->pandemonium_string_num_scientific(p_num));
}
String String::num_real(double p_num) {
return String(godot::api->pandemonium_string_num_real(p_num));
return String(pandemonium::api->pandemonium_string_num_real(p_num));
}
String String::num_int64(int64_t p_num, int base, bool capitalize_hex) {
return String(godot::api->pandemonium_string_num_int64_capitalized(p_num, base, capitalize_hex));
return String(pandemonium::api->pandemonium_string_num_int64_capitalized(p_num, base, capitalize_hex));
}
String String::chr(pandemonium_char_type p_char) {
return String(godot::api->pandemonium_string_chr(p_char));
return String(pandemonium::api->pandemonium_string_chr(p_char));
}
String String::md5(const uint8_t *p_md5) {
return String(godot::api->pandemonium_string_md5(p_md5));
return String(pandemonium::api->pandemonium_string_md5(p_md5));
}
String String::hex_encode_buffer(const uint8_t *p_buffer, int p_len) {
return String(godot::api->pandemonium_string_hex_encode_buffer(p_buffer, p_len));
return String(pandemonium::api->pandemonium_string_hex_encode_buffer(p_buffer, p_len));
}
godot::String::String() {
godot::api->pandemonium_string_new(&_pandemonium_string);
pandemonium::String::String() {
pandemonium::api->pandemonium_string_new(&_pandemonium_string);
}
String::String(const char *contents) {
godot::api->pandemonium_string_new(&_pandemonium_string);
godot::api->pandemonium_string_parse_utf8(&_pandemonium_string, contents);
pandemonium::api->pandemonium_string_new(&_pandemonium_string);
pandemonium::api->pandemonium_string_parse_utf8(&_pandemonium_string, contents);
}
String::String(const wchar_t *contents) {
godot::api->pandemonium_string_new_wchar_clip_to_len(&_pandemonium_string, contents, wcslen(contents));
pandemonium::api->pandemonium_string_new_wchar_clip_to_len(&_pandemonium_string, contents, wcslen(contents));
}
String::String(const wchar_t c) {
godot::api->pandemonium_string_new_wchar_clip_to_len(&_pandemonium_string, &c, 1);
pandemonium::api->pandemonium_string_new_wchar_clip_to_len(&_pandemonium_string, &c, 1);
}
String::String(const String &other) {
godot::api->pandemonium_string_new_copy(&_pandemonium_string, &other._pandemonium_string);
pandemonium::api->pandemonium_string_new_copy(&_pandemonium_string, &other._pandemonium_string);
}
String::String(String &&other) {
godot::api->pandemonium_string_new_copy(&_pandemonium_string, &other._pandemonium_string);
pandemonium::api->pandemonium_string_new_copy(&_pandemonium_string, &other._pandemonium_string);
}
String::~String() {
godot::api->pandemonium_string_destroy(&_pandemonium_string);
pandemonium::api->pandemonium_string_destroy(&_pandemonium_string);
}
char32_t &String::operator[](const int idx) {
return *const_cast<char32_t *>(godot::api->pandemonium_string_operator_index(&_pandemonium_string, idx));
return *const_cast<char32_t *>(pandemonium::api->pandemonium_string_operator_index(&_pandemonium_string, idx));
}
char32_t String::operator[](const int idx) const {
return *godot::api->pandemonium_string_operator_index((pandemonium_string *)&_pandemonium_string, idx);
return *pandemonium::api->pandemonium_string_operator_index((pandemonium_string *)&_pandemonium_string, idx);
}
int String::length() const {
return godot::api->pandemonium_string_length(&_pandemonium_string);
return pandemonium::api->pandemonium_string_length(&_pandemonium_string);
}
void String::operator=(const String &s) {
godot::api->pandemonium_string_destroy(&_pandemonium_string);
godot::api->pandemonium_string_new_copy(&_pandemonium_string, &s._pandemonium_string);
pandemonium::api->pandemonium_string_destroy(&_pandemonium_string);
pandemonium::api->pandemonium_string_new_copy(&_pandemonium_string, &s._pandemonium_string);
}
void String::operator=(String &&s) {
godot::api->pandemonium_string_destroy(&_pandemonium_string);
godot::api->pandemonium_string_new_copy(&_pandemonium_string, &s._pandemonium_string);
pandemonium::api->pandemonium_string_destroy(&_pandemonium_string);
pandemonium::api->pandemonium_string_new_copy(&_pandemonium_string, &s._pandemonium_string);
}
bool String::operator==(const String &s) const {
return godot::api->pandemonium_string_operator_equal(&_pandemonium_string, &s._pandemonium_string);
return pandemonium::api->pandemonium_string_operator_equal(&_pandemonium_string, &s._pandemonium_string);
}
bool String::operator!=(const String &s) const {
@ -142,24 +142,24 @@ bool String::operator!=(const String &s) const {
}
String String::operator+(const String &s) const {
return String(godot::api->pandemonium_string_operator_plus(&_pandemonium_string, &s._pandemonium_string));
return String(pandemonium::api->pandemonium_string_operator_plus(&_pandemonium_string, &s._pandemonium_string));
}
void String::operator+=(const String &s) {
*this = String(godot::api->pandemonium_string_operator_plus(&_pandemonium_string, &s._pandemonium_string));
*this = String(pandemonium::api->pandemonium_string_operator_plus(&_pandemonium_string, &s._pandemonium_string));
}
void String::operator+=(const char32_t c) {
String _to_be_added = String(c);
*this = String(godot::api->pandemonium_string_operator_plus(&_pandemonium_string, &_to_be_added._pandemonium_string));
*this = String(pandemonium::api->pandemonium_string_operator_plus(&_pandemonium_string, &_to_be_added._pandemonium_string));
}
bool String::operator<(const String &s) const {
return godot::api->pandemonium_string_operator_less(&_pandemonium_string, &s._pandemonium_string);
return pandemonium::api->pandemonium_string_operator_less(&_pandemonium_string, &s._pandemonium_string);
}
bool String::operator<=(const String &s) const {
return godot::api->pandemonium_string_operator_less(&_pandemonium_string, &s._pandemonium_string) ||
return pandemonium::api->pandemonium_string_operator_less(&_pandemonium_string, &s._pandemonium_string) ||
(*this == s);
}
@ -176,21 +176,21 @@ String::operator NodePath() const {
}
const char32_t *String::unicode_str() const {
return godot::api->pandemonium_string_get_data(&_pandemonium_string);
return pandemonium::api->pandemonium_string_get_data(&_pandemonium_string);
}
char *String::alloc_c_string() const {
pandemonium_char_string contents = godot::api->pandemonium_string_utf8(&_pandemonium_string);
pandemonium_char_string contents = pandemonium::api->pandemonium_string_utf8(&_pandemonium_string);
int length = godot::api->pandemonium_char_string_length(&contents);
int length = pandemonium::api->pandemonium_char_string_length(&contents);
char *result = (char *)godot::api->pandemonium_alloc(length + 1);
char *result = (char *)pandemonium::api->pandemonium_alloc(length + 1);
if (result) {
memcpy(result, godot::api->pandemonium_char_string_get_data(&contents), length + 1);
memcpy(result, pandemonium::api->pandemonium_char_string_get_data(&contents), length + 1);
}
godot::api->pandemonium_char_string_destroy(&contents);
pandemonium::api->pandemonium_char_string_destroy(&contents);
return result;
}
@ -198,7 +198,7 @@ char *String::alloc_c_string() const {
CharString String::utf8() const {
CharString ret;
ret._char_string = godot::api->pandemonium_string_utf8(&_pandemonium_string);
ret._char_string = pandemonium::api->pandemonium_string_utf8(&_pandemonium_string);
return ret;
}
@ -207,9 +207,9 @@ CharString String::ascii(bool p_extended) const {
CharString ret;
if (p_extended)
ret._char_string = godot::api->pandemonium_string_ascii_extended(&_pandemonium_string);
ret._char_string = pandemonium::api->pandemonium_string_ascii_extended(&_pandemonium_string);
else
ret._char_string = godot::api->pandemonium_string_ascii(&_pandemonium_string);
ret._char_string = pandemonium::api->pandemonium_string_ascii(&_pandemonium_string);
return ret;
}
@ -223,300 +223,300 @@ String operator+(const wchar_t *a, const String &b) {
}
bool String::begins_with(const String &p_string) const {
return godot::api->pandemonium_string_begins_with(&_pandemonium_string, &p_string._pandemonium_string);
return pandemonium::api->pandemonium_string_begins_with(&_pandemonium_string, &p_string._pandemonium_string);
}
bool String::begins_with_char_array(const char *p_char_array) const {
return godot::api->pandemonium_string_begins_with_char_array(&_pandemonium_string, p_char_array);
return pandemonium::api->pandemonium_string_begins_with_char_array(&_pandemonium_string, p_char_array);
}
PoolStringArray String::bigrams() const {
pandemonium_array arr = godot::api->pandemonium_string_bigrams(&_pandemonium_string);
pandemonium_array arr = pandemonium::api->pandemonium_string_bigrams(&_pandemonium_string);
return Array(arr);
}
String String::c_escape() const {
return String(godot::api->pandemonium_string_c_escape(&_pandemonium_string));
return String(pandemonium::api->pandemonium_string_c_escape(&_pandemonium_string));
}
String String::c_unescape() const {
return String(godot::api->pandemonium_string_c_unescape(&_pandemonium_string));
return String(pandemonium::api->pandemonium_string_c_unescape(&_pandemonium_string));
}
String String::capitalize() const {
return String(godot::api->pandemonium_string_capitalize(&_pandemonium_string));
return String(pandemonium::api->pandemonium_string_capitalize(&_pandemonium_string));
}
bool String::empty() const {
return godot::api->pandemonium_string_empty(&_pandemonium_string);
return pandemonium::api->pandemonium_string_empty(&_pandemonium_string);
}
bool String::ends_with(const String &p_string) const {
return godot::api->pandemonium_string_ends_with(&_pandemonium_string, &p_string._pandemonium_string);
return pandemonium::api->pandemonium_string_ends_with(&_pandemonium_string, &p_string._pandemonium_string);
}
void String::erase(int position, int chars) {
godot::api->pandemonium_string_erase(&_pandemonium_string, position, chars);
pandemonium::api->pandemonium_string_erase(&_pandemonium_string, position, chars);
}
int String::find(String p_what, int p_from) const {
return godot::api->pandemonium_string_find_from(&_pandemonium_string, p_what._pandemonium_string, p_from);
return pandemonium::api->pandemonium_string_find_from(&_pandemonium_string, p_what._pandemonium_string, p_from);
}
int String::find_last(String p_what) const {
return godot::api->pandemonium_string_find_last(&_pandemonium_string, p_what._pandemonium_string);
return pandemonium::api->pandemonium_string_find_last(&_pandemonium_string, p_what._pandemonium_string);
}
int String::findn(String p_what, int p_from) const {
return godot::api->pandemonium_string_findn_from(&_pandemonium_string, p_what._pandemonium_string, p_from);
return pandemonium::api->pandemonium_string_findn_from(&_pandemonium_string, p_what._pandemonium_string, p_from);
}
String String::format(Variant values) const {
return String(godot::api->pandemonium_string_format(&_pandemonium_string, (pandemonium_variant *)&values));
return String(pandemonium::api->pandemonium_string_format(&_pandemonium_string, (pandemonium_variant *)&values));
}
String String::format(Variant values, String placeholder) const {
pandemonium_char_string contents = godot::api->pandemonium_string_utf8(&placeholder._pandemonium_string);
String new_string(godot::api->pandemonium_string_format_with_custom_placeholder(&_pandemonium_string, (pandemonium_variant *)&values, godot::api->pandemonium_char_string_get_data(&contents)));
godot::api->pandemonium_char_string_destroy(&contents);
pandemonium_char_string contents = pandemonium::api->pandemonium_string_utf8(&placeholder._pandemonium_string);
String new_string(pandemonium::api->pandemonium_string_format_with_custom_placeholder(&_pandemonium_string, (pandemonium_variant *)&values, pandemonium::api->pandemonium_char_string_get_data(&contents)));
pandemonium::api->pandemonium_char_string_destroy(&contents);
return new_string;
}
String String::get_base_dir() const {
return String(godot::api->pandemonium_string_get_base_dir(&_pandemonium_string));
return String(pandemonium::api->pandemonium_string_get_base_dir(&_pandemonium_string));
}
String String::get_basename() const {
return String(godot::api->pandemonium_string_get_basename(&_pandemonium_string));
return String(pandemonium::api->pandemonium_string_get_basename(&_pandemonium_string));
}
String String::get_extension() const {
return String(godot::api->pandemonium_string_get_extension(&_pandemonium_string));
return String(pandemonium::api->pandemonium_string_get_extension(&_pandemonium_string));
}
String String::get_file() const {
return String(godot::api->pandemonium_string_get_file(&_pandemonium_string));
return String(pandemonium::api->pandemonium_string_get_file(&_pandemonium_string));
}
int String::hash() const {
return godot::api->pandemonium_string_hash(&_pandemonium_string);
return pandemonium::api->pandemonium_string_hash(&_pandemonium_string);
}
int String::hex_to_int() const {
return godot::api->pandemonium_string_hex_to_int(&_pandemonium_string);
return pandemonium::api->pandemonium_string_hex_to_int(&_pandemonium_string);
}
String String::insert(int position, String what) const {
return String(godot::api->pandemonium_string_insert(&_pandemonium_string, position, what._pandemonium_string));
return String(pandemonium::api->pandemonium_string_insert(&_pandemonium_string, position, what._pandemonium_string));
}
bool String::is_abs_path() const {
return godot::api->pandemonium_string_is_abs_path(&_pandemonium_string);
return pandemonium::api->pandemonium_string_is_abs_path(&_pandemonium_string);
}
bool String::is_rel_path() const {
return godot::api->pandemonium_string_is_rel_path(&_pandemonium_string);
return pandemonium::api->pandemonium_string_is_rel_path(&_pandemonium_string);
}
bool String::is_subsequence_of(String text) const {
return godot::api->pandemonium_string_is_subsequence_of(&_pandemonium_string, &text._pandemonium_string);
return pandemonium::api->pandemonium_string_is_subsequence_of(&_pandemonium_string, &text._pandemonium_string);
}
bool String::is_subsequence_ofi(String text) const {
return godot::api->pandemonium_string_is_subsequence_ofi(&_pandemonium_string, &text._pandemonium_string);
return pandemonium::api->pandemonium_string_is_subsequence_ofi(&_pandemonium_string, &text._pandemonium_string);
}
bool String::is_valid_float() const {
return godot::api->pandemonium_string_is_valid_float(&_pandemonium_string);
return pandemonium::api->pandemonium_string_is_valid_float(&_pandemonium_string);
}
bool String::is_valid_html_color() const {
return godot::api->pandemonium_string_is_valid_html_color(&_pandemonium_string);
return pandemonium::api->pandemonium_string_is_valid_html_color(&_pandemonium_string);
}
bool String::is_valid_identifier() const {
return godot::api->pandemonium_string_is_valid_identifier(&_pandemonium_string);
return pandemonium::api->pandemonium_string_is_valid_identifier(&_pandemonium_string);
}
bool String::is_valid_integer() const {
return godot::api->pandemonium_string_is_numeric(&_pandemonium_string);
return pandemonium::api->pandemonium_string_is_numeric(&_pandemonium_string);
}
bool String::is_valid_ip_address() const {
return godot::api->pandemonium_string_is_valid_ip_address(&_pandemonium_string);
return pandemonium::api->pandemonium_string_is_valid_ip_address(&_pandemonium_string);
}
String String::json_escape() const {
return String(godot::api->pandemonium_string_json_escape(&_pandemonium_string));
return String(pandemonium::api->pandemonium_string_json_escape(&_pandemonium_string));
}
String String::left(int position) const {
return String(godot::api->pandemonium_string_left(&_pandemonium_string, position));
return String(pandemonium::api->pandemonium_string_left(&_pandemonium_string, position));
}
bool String::match(String expr) const {
return godot::api->pandemonium_string_match(&_pandemonium_string, &expr._pandemonium_string);
return pandemonium::api->pandemonium_string_match(&_pandemonium_string, &expr._pandemonium_string);
}
bool String::matchn(String expr) const {
return godot::api->pandemonium_string_match(&_pandemonium_string, &expr._pandemonium_string);
return pandemonium::api->pandemonium_string_match(&_pandemonium_string, &expr._pandemonium_string);
}
PoolByteArray String::md5_buffer() const {
pandemonium_pool_byte_array arr = godot::api->pandemonium_string_md5_buffer(&_pandemonium_string);
pandemonium_pool_byte_array arr = pandemonium::api->pandemonium_string_md5_buffer(&_pandemonium_string);
return PoolByteArray(arr);
}
String String::md5_text() const {
return String(godot::api->pandemonium_string_md5_text(&_pandemonium_string));
return String(pandemonium::api->pandemonium_string_md5_text(&_pandemonium_string));
}
int String::ord_at(int at) const {
return godot::api->pandemonium_string_ord_at(&_pandemonium_string, at);
return pandemonium::api->pandemonium_string_ord_at(&_pandemonium_string, at);
}
String String::pad_decimals(int digits) const {
return String(godot::api->pandemonium_string_pad_decimals(&_pandemonium_string, digits));
return String(pandemonium::api->pandemonium_string_pad_decimals(&_pandemonium_string, digits));
}
String String::pad_zeros(int digits) const {
return String(godot::api->pandemonium_string_pad_zeros(&_pandemonium_string, digits));
return String(pandemonium::api->pandemonium_string_pad_zeros(&_pandemonium_string, digits));
}
String String::percent_decode() const {
return String(godot::api->pandemonium_string_percent_decode(&_pandemonium_string));
return String(pandemonium::api->pandemonium_string_percent_decode(&_pandemonium_string));
}
String String::percent_encode() const {
return String(godot::api->pandemonium_string_percent_encode(&_pandemonium_string));
return String(pandemonium::api->pandemonium_string_percent_encode(&_pandemonium_string));
}
String String::plus_file(String file) const {
return String(godot::api->pandemonium_string_plus_file(&_pandemonium_string, &file._pandemonium_string));
return String(pandemonium::api->pandemonium_string_plus_file(&_pandemonium_string, &file._pandemonium_string));
}
String String::replace(String p_key, String p_with) const {
return String(godot::api->pandemonium_string_replace(&_pandemonium_string, p_key._pandemonium_string, p_with._pandemonium_string));
return String(pandemonium::api->pandemonium_string_replace(&_pandemonium_string, p_key._pandemonium_string, p_with._pandemonium_string));
}
String String::replacen(String what, String forwhat) const {
return String(godot::api->pandemonium_string_replacen(&_pandemonium_string, what._pandemonium_string, forwhat._pandemonium_string));
return String(pandemonium::api->pandemonium_string_replacen(&_pandemonium_string, what._pandemonium_string, forwhat._pandemonium_string));
}
int String::rfind(String p_what, int p_from) const {
return godot::api->pandemonium_string_rfind_from(&_pandemonium_string, p_what._pandemonium_string, p_from);
return pandemonium::api->pandemonium_string_rfind_from(&_pandemonium_string, p_what._pandemonium_string, p_from);
}
int String::rfindn(String p_what, int p_from) const {
return godot::api->pandemonium_string_rfindn_from(&_pandemonium_string, p_what._pandemonium_string, p_from);
return pandemonium::api->pandemonium_string_rfindn_from(&_pandemonium_string, p_what._pandemonium_string, p_from);
}
String String::right(int position) const {
return String(godot::api->pandemonium_string_right(&_pandemonium_string, position));
return String(pandemonium::api->pandemonium_string_right(&_pandemonium_string, position));
}
PoolByteArray String::sha256_buffer() const {
pandemonium_pool_byte_array arr = godot::api->pandemonium_string_sha256_buffer(&_pandemonium_string);
pandemonium_pool_byte_array arr = pandemonium::api->pandemonium_string_sha256_buffer(&_pandemonium_string);
return PoolByteArray(arr);
}
String String::sha256_text() const {
return String(godot::api->pandemonium_string_sha256_text(&_pandemonium_string));
return String(pandemonium::api->pandemonium_string_sha256_text(&_pandemonium_string));
}
float String::similarity(String text) const {
return godot::api->pandemonium_string_similarity(&_pandemonium_string, &text._pandemonium_string);
return pandemonium::api->pandemonium_string_similarity(&_pandemonium_string, &text._pandemonium_string);
}
// TODO Suport allow_empty
PoolStringArray String::split(String divisor, bool /*allow_empty*/) const {
pandemonium_pool_string_array arr = godot::api->pandemonium_string_split(&_pandemonium_string, &divisor._pandemonium_string);
pandemonium_pool_string_array arr = pandemonium::api->pandemonium_string_split(&_pandemonium_string, &divisor._pandemonium_string);
return PoolStringArray(arr);
}
// TODO Suport allow_empty
PoolIntArray String::split_ints(String divisor, bool /*allow_empty*/) const {
pandemonium_array arr = godot::api->pandemonium_string_split_floats(&_pandemonium_string, &divisor._pandemonium_string);
pandemonium_array arr = pandemonium::api->pandemonium_string_split_floats(&_pandemonium_string, &divisor._pandemonium_string);
return Array(arr);
}
// TODO Suport allow_empty
PoolRealArray String::split_floats(String divisor, bool /*allow_empty*/) const {
// TODO The GDNative API returns pandemonium_array, when according to the doc, it should have been pandemonium_pool_real_array
pandemonium_array arr = godot::api->pandemonium_string_split_floats(&_pandemonium_string, &divisor._pandemonium_string);
pandemonium_array arr = pandemonium::api->pandemonium_string_split_floats(&_pandemonium_string, &divisor._pandemonium_string);
Array wrapped_array(arr);
return PoolRealArray(wrapped_array);
}
String String::strip_edges(bool left, bool right) const {
return String(godot::api->pandemonium_string_strip_edges(&_pandemonium_string, left, right));
return String(pandemonium::api->pandemonium_string_strip_edges(&_pandemonium_string, left, right));
}
String String::substr(int from, int len) const {
return String(godot::api->pandemonium_string_substr(&_pandemonium_string, from, len));
return String(pandemonium::api->pandemonium_string_substr(&_pandemonium_string, from, len));
}
float String::to_float() const {
return godot::api->pandemonium_string_to_float(&_pandemonium_string);
return pandemonium::api->pandemonium_string_to_float(&_pandemonium_string);
}
int64_t String::to_int() const {
return godot::api->pandemonium_string_to_int(&_pandemonium_string);
return pandemonium::api->pandemonium_string_to_int(&_pandemonium_string);
}
String String::to_lower() const {
return String(godot::api->pandemonium_string_to_lower(&_pandemonium_string));
return String(pandemonium::api->pandemonium_string_to_lower(&_pandemonium_string));
}
String String::to_upper() const {
return String(godot::api->pandemonium_string_to_upper(&_pandemonium_string));
return String(pandemonium::api->pandemonium_string_to_upper(&_pandemonium_string));
}
String String::xml_escape() const {
return String(godot::api->pandemonium_string_xml_escape(&_pandemonium_string));
return String(pandemonium::api->pandemonium_string_xml_escape(&_pandemonium_string));
}
String String::xml_unescape() const {
return String(godot::api->pandemonium_string_xml_unescape(&_pandemonium_string));
return String(pandemonium::api->pandemonium_string_xml_unescape(&_pandemonium_string));
}
signed char String::casecmp_to(String p_str) const {
return godot::api->pandemonium_string_casecmp_to(&_pandemonium_string, &p_str._pandemonium_string);
return pandemonium::api->pandemonium_string_casecmp_to(&_pandemonium_string, &p_str._pandemonium_string);
}
signed char String::nocasecmp_to(String p_str) const {
return godot::api->pandemonium_string_nocasecmp_to(&_pandemonium_string, &p_str._pandemonium_string);
return pandemonium::api->pandemonium_string_nocasecmp_to(&_pandemonium_string, &p_str._pandemonium_string);
}
signed char String::naturalnocasecmp_to(String p_str) const {
return godot::api->pandemonium_string_naturalnocasecmp_to(&_pandemonium_string, &p_str._pandemonium_string);
return pandemonium::api->pandemonium_string_naturalnocasecmp_to(&_pandemonium_string, &p_str._pandemonium_string);
}
String String::dedent() const {
pandemonium_string s = godot::api->pandemonium_string_dedent(&_pandemonium_string);
pandemonium_string s = pandemonium::api->pandemonium_string_dedent(&_pandemonium_string);
return String(s);
}
PoolStringArray String::rsplit(const String &divisor, const bool allow_empty, const int maxsplit) const {
pandemonium_pool_string_array arr =
godot::api->pandemonium_string_rsplit_maxsplit(&_pandemonium_string, &divisor._pandemonium_string, allow_empty, maxsplit);
pandemonium::api->pandemonium_string_rsplit_maxsplit(&_pandemonium_string, &divisor._pandemonium_string, allow_empty, maxsplit);
return PoolStringArray(arr);
}
String String::rstrip(const String &chars) const {
pandemonium_string s = godot::api->pandemonium_string_rstrip(&_pandemonium_string, &chars._pandemonium_string);
pandemonium_string s = pandemonium::api->pandemonium_string_rstrip(&_pandemonium_string, &chars._pandemonium_string);
return String(s);
}
String String::trim_prefix(const String &prefix) const {
pandemonium_string s = godot::api->pandemonium_string_trim_prefix(&_pandemonium_string, &prefix._pandemonium_string);
pandemonium_string s = pandemonium::api->pandemonium_string_trim_prefix(&_pandemonium_string, &prefix._pandemonium_string);
return String(s);
}
String String::trim_suffix(const String &suffix) const {
pandemonium_string s = godot::api->pandemonium_string_trim_suffix(&_pandemonium_string, &suffix._pandemonium_string);
pandemonium_string s = pandemonium::api->pandemonium_string_trim_suffix(&_pandemonium_string, &suffix._pandemonium_string);
return String(s);
}
} // namespace godot
} // namespace pandemonium

View File

@ -2,11 +2,11 @@
/* String.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/* PANDEMONIUM ENGINE */
/* https://pandemoniumengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
/* Copyright (c) 2014-2022 Pandemonium Engine contributors (cf. AUTHORS.md). */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@ -31,7 +31,7 @@
#include "StringName.hpp"
#include "Array.hpp"
#include "GodotGlobal.hpp"
#include "PandemoniumGlobal.hpp"
#include "NodePath.hpp"
#include "PoolArrays.hpp"
#include "Variant.hpp"
@ -40,27 +40,27 @@
#include <string.h>
namespace godot {
namespace pandemonium {
godot::StringName::StringName() {
godot::api->pandemonium_string_name_new(&_pandemonium_string_name);
pandemonium::StringName::StringName() {
pandemonium::api->pandemonium_string_name_new(&_pandemonium_string_name);
}
StringName::StringName(const char *contents) {
godot::api->pandemonium_string_name_new_data_char(&_pandemonium_string_name, contents);
pandemonium::api->pandemonium_string_name_new_data_char(&_pandemonium_string_name, contents);
}
StringName::StringName(const String &other) {
godot::api->pandemonium_string_name_new_data_string(&_pandemonium_string_name, &other._pandemonium_string);
pandemonium::api->pandemonium_string_name_new_data_string(&_pandemonium_string_name, &other._pandemonium_string);
}
StringName::~StringName() {
godot::api->pandemonium_string_name_destroy(&_pandemonium_string_name);
pandemonium::api->pandemonium_string_name_destroy(&_pandemonium_string_name);
}
bool StringName::operator==(const StringName &s) const {
return godot::api->pandemonium_string_name_operator_equal(&_pandemonium_string_name, &s._pandemonium_string_name);
return pandemonium::api->pandemonium_string_name_operator_equal(&_pandemonium_string_name, &s._pandemonium_string_name);
}
bool StringName::operator!=(const StringName &s) const {
@ -68,11 +68,11 @@ bool StringName::operator!=(const StringName &s) const {
}
bool StringName::operator<(const StringName &s) const {
return godot::api->pandemonium_string_name_operator_less(&_pandemonium_string_name, &s._pandemonium_string_name);
return pandemonium::api->pandemonium_string_name_operator_less(&_pandemonium_string_name, &s._pandemonium_string_name);
}
bool StringName::operator<=(const StringName &s) const {
return godot::api->pandemonium_string_name_operator_less(&_pandemonium_string_name, &s._pandemonium_string_name) ||
return pandemonium::api->pandemonium_string_name_operator_less(&_pandemonium_string_name, &s._pandemonium_string_name) ||
(*this == s);
}
@ -84,4 +84,4 @@ bool StringName::operator>=(const StringName &s) const {
return !(*this < s);
}
} // namespace godot
} // namespace pandemonium

View File

@ -2,11 +2,11 @@
/* TagDP.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/* PANDEMONIUM ENGINE */
/* https://pandemoniumengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
/* Copyright (c) 2014-2022 Pandemonium Engine contributors (cf. AUTHORS.md). */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@ -32,9 +32,9 @@
#include <unordered_map>
#include <GodotGlobal.hpp>
#include <PandemoniumGlobal.hpp>
namespace godot {
namespace pandemonium {
namespace _TagDB {
@ -52,7 +52,7 @@ bool is_type_known(size_t type_tag) {
}
void register_global_type(const char *name, size_t type_tag, size_t base_type_tag) {
godot::nativescript_api->pandemonium_nativescript_set_global_type_tag(godot::_RegisterState::language_index, name, (const void *)type_tag);
pandemonium::nativescript_api->pandemonium_nativescript_set_global_type_tag(pandemonium::_RegisterState::language_index, name, (const void *)type_tag);
register_type(type_tag, base_type_tag);
}
@ -75,4 +75,4 @@ bool is_type_compatible(size_t ask_tag, size_t have_tag) {
} // namespace _TagDB
} // namespace godot
} // namespace pandemonium

View File

@ -2,11 +2,11 @@
/* Transform.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/* PANDEMONIUM ENGINE */
/* https://pandemoniumengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
/* Copyright (c) 2014-2022 Pandemonium Engine contributors (cf. AUTHORS.md). */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@ -37,7 +37,7 @@
#include "Quaternion.hpp"
namespace godot {
namespace pandemonium {
const Transform Transform::IDENTITY = Transform();
const Transform Transform::FLIP_X = Transform(-1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0);
@ -302,4 +302,4 @@ Transform::Transform(const Basis &p_basis, const Vector3 &p_origin) {
origin = p_origin;
}
} // namespace godot
} // namespace pandemonium

View File

@ -2,11 +2,11 @@
/* Transform2D.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/* PANDEMONIUM ENGINE */
/* https://pandemoniumengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
/* Copyright (c) 2014-2022 Pandemonium Engine contributors (cf. AUTHORS.md). */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@ -35,7 +35,7 @@
#include <algorithm>
namespace godot {
namespace pandemonium {
const Transform2D Transform2D::IDENTITY;
const Transform2D Transform2D::FLIP_X = Transform2D(-1, 0, 0, 1, 0, 0);
@ -329,4 +329,4 @@ Transform2D::operator String() const {
return String(String() + elements[0] + ", " + elements[1] + ", " + elements[2]);
}
} // namespace godot
} // namespace pandemonium

View File

@ -2,11 +2,11 @@
/* Variant.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/* PANDEMONIUM ENGINE */
/* https://pandemoniumengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
/* Copyright (c) 2014-2022 Pandemonium Engine contributors (cf. AUTHORS.md). */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@ -34,190 +34,190 @@
#include "CoreTypes.hpp"
#include "Defs.hpp"
#include "GodotGlobal.hpp"
#include "PandemoniumGlobal.hpp"
#include "Object.hpp"
namespace godot {
namespace pandemonium {
Variant::Variant() {
godot::api->pandemonium_variant_new_nil(&_pandemonium_variant);
pandemonium::api->pandemonium_variant_new_nil(&_pandemonium_variant);
}
Variant::Variant(const Variant &v) {
godot::api->pandemonium_variant_new_copy(&_pandemonium_variant, &v._pandemonium_variant);
pandemonium::api->pandemonium_variant_new_copy(&_pandemonium_variant, &v._pandemonium_variant);
}
Variant::Variant(bool p_bool) {
godot::api->pandemonium_variant_new_bool(&_pandemonium_variant, p_bool);
pandemonium::api->pandemonium_variant_new_bool(&_pandemonium_variant, p_bool);
}
Variant::Variant(signed int p_int) // real one
{
godot::api->pandemonium_variant_new_int(&_pandemonium_variant, p_int);
pandemonium::api->pandemonium_variant_new_int(&_pandemonium_variant, p_int);
}
Variant::Variant(unsigned int p_int) {
godot::api->pandemonium_variant_new_uint(&_pandemonium_variant, p_int);
pandemonium::api->pandemonium_variant_new_uint(&_pandemonium_variant, p_int);
}
Variant::Variant(signed short p_short) // real one
{
godot::api->pandemonium_variant_new_int(&_pandemonium_variant, (int)p_short);
pandemonium::api->pandemonium_variant_new_int(&_pandemonium_variant, (int)p_short);
}
Variant::Variant(int64_t p_char) // real one
{
godot::api->pandemonium_variant_new_int(&_pandemonium_variant, p_char);
pandemonium::api->pandemonium_variant_new_int(&_pandemonium_variant, p_char);
}
Variant::Variant(uint64_t p_char) {
godot::api->pandemonium_variant_new_uint(&_pandemonium_variant, p_char);
pandemonium::api->pandemonium_variant_new_uint(&_pandemonium_variant, p_char);
}
Variant::Variant(float p_float) {
godot::api->pandemonium_variant_new_real(&_pandemonium_variant, p_float);
pandemonium::api->pandemonium_variant_new_real(&_pandemonium_variant, p_float);
}
Variant::Variant(double p_double) {
godot::api->pandemonium_variant_new_real(&_pandemonium_variant, p_double);
pandemonium::api->pandemonium_variant_new_real(&_pandemonium_variant, p_double);
}
Variant::Variant(const String &p_string) {
godot::api->pandemonium_variant_new_string(&_pandemonium_variant, (pandemonium_string *)&p_string);
pandemonium::api->pandemonium_variant_new_string(&_pandemonium_variant, (pandemonium_string *)&p_string);
}
Variant::Variant(const StringName &p_string) {
godot::api->pandemonium_variant_new_string_name(&_pandemonium_variant, (pandemonium_string_name *)&p_string);
pandemonium::api->pandemonium_variant_new_string_name(&_pandemonium_variant, (pandemonium_string_name *)&p_string);
}
Variant::Variant(const char *const p_cstring) {
String s = String(p_cstring);
godot::api->pandemonium_variant_new_string(&_pandemonium_variant, (pandemonium_string *)&s);
pandemonium::api->pandemonium_variant_new_string(&_pandemonium_variant, (pandemonium_string *)&s);
}
Variant::Variant(const wchar_t *p_wstring) {
String s = p_wstring;
godot::api->pandemonium_variant_new_string(&_pandemonium_variant, (pandemonium_string *)&s);
pandemonium::api->pandemonium_variant_new_string(&_pandemonium_variant, (pandemonium_string *)&s);
}
Variant::Variant(const Vector2 &p_vector2) {
godot::api->pandemonium_variant_new_vector2(&_pandemonium_variant, (pandemonium_vector2 *)&p_vector2);
pandemonium::api->pandemonium_variant_new_vector2(&_pandemonium_variant, (pandemonium_vector2 *)&p_vector2);
}
Variant::Variant(const Vector2i &p_vector2i) {
godot::api->pandemonium_variant_new_vector2i(&_pandemonium_variant, (pandemonium_vector2i *)&p_vector2i);
pandemonium::api->pandemonium_variant_new_vector2i(&_pandemonium_variant, (pandemonium_vector2i *)&p_vector2i);
}
Variant::Variant(const Rect2 &p_rect2) {
godot::api->pandemonium_variant_new_rect2(&_pandemonium_variant, (pandemonium_rect2 *)&p_rect2);
pandemonium::api->pandemonium_variant_new_rect2(&_pandemonium_variant, (pandemonium_rect2 *)&p_rect2);
}
Variant::Variant(const Rect2i &p_rect2i) {
godot::api->pandemonium_variant_new_rect2i(&_pandemonium_variant, (pandemonium_rect2i *)&p_rect2i);
pandemonium::api->pandemonium_variant_new_rect2i(&_pandemonium_variant, (pandemonium_rect2i *)&p_rect2i);
}
Variant::Variant(const Vector3 &p_vector3) {
godot::api->pandemonium_variant_new_vector3(&_pandemonium_variant, (pandemonium_vector3 *)&p_vector3);
pandemonium::api->pandemonium_variant_new_vector3(&_pandemonium_variant, (pandemonium_vector3 *)&p_vector3);
}
Variant::Variant(const Vector3i &p_vector3i) {
godot::api->pandemonium_variant_new_vector3i(&_pandemonium_variant, (pandemonium_vector3i *)&p_vector3i);
pandemonium::api->pandemonium_variant_new_vector3i(&_pandemonium_variant, (pandemonium_vector3i *)&p_vector3i);
}
Variant::Variant(const Vector4 &p_vector4) {
godot::api->pandemonium_variant_new_vector4(&_pandemonium_variant, (pandemonium_vector4 *)&p_vector4);
pandemonium::api->pandemonium_variant_new_vector4(&_pandemonium_variant, (pandemonium_vector4 *)&p_vector4);
}
Variant::Variant(const Vector4i &p_vector4i) {
godot::api->pandemonium_variant_new_vector4i(&_pandemonium_variant, (pandemonium_vector4i *)&p_vector4i);
pandemonium::api->pandemonium_variant_new_vector4i(&_pandemonium_variant, (pandemonium_vector4i *)&p_vector4i);
}
Variant::Variant(const Plane &p_plane) {
godot::api->pandemonium_variant_new_plane(&_pandemonium_variant, (pandemonium_plane *)&p_plane);
pandemonium::api->pandemonium_variant_new_plane(&_pandemonium_variant, (pandemonium_plane *)&p_plane);
}
Variant::Variant(const godot::AABB &p_aabb) {
godot::api->pandemonium_variant_new_aabb(&_pandemonium_variant, (pandemonium_aabb *)&p_aabb);
Variant::Variant(const pandemonium::AABB &p_aabb) {
pandemonium::api->pandemonium_variant_new_aabb(&_pandemonium_variant, (pandemonium_aabb *)&p_aabb);
}
Variant::Variant(const Quaternion &p_quaternion) {
godot::api->pandemonium_variant_new_quaternion(&_pandemonium_variant, (pandemonium_quaternion *)&p_quaternion);
pandemonium::api->pandemonium_variant_new_quaternion(&_pandemonium_variant, (pandemonium_quaternion *)&p_quaternion);
}
Variant::Variant(const Basis &p_transform) {
godot::api->pandemonium_variant_new_basis(&_pandemonium_variant, (pandemonium_basis *)&p_transform);
pandemonium::api->pandemonium_variant_new_basis(&_pandemonium_variant, (pandemonium_basis *)&p_transform);
}
Variant::Variant(const Transform2D &p_transform) {
godot::api->pandemonium_variant_new_transform2d(&_pandemonium_variant, (pandemonium_transform2d *)&p_transform);
pandemonium::api->pandemonium_variant_new_transform2d(&_pandemonium_variant, (pandemonium_transform2d *)&p_transform);
}
Variant::Variant(const Transform &p_transform) {
godot::api->pandemonium_variant_new_transform(&_pandemonium_variant, (pandemonium_transform *)&p_transform);
pandemonium::api->pandemonium_variant_new_transform(&_pandemonium_variant, (pandemonium_transform *)&p_transform);
}
Variant::Variant(const Projection &p_projection) {
godot::api->pandemonium_variant_new_projection(&_pandemonium_variant, (pandemonium_projection *)&p_projection);
pandemonium::api->pandemonium_variant_new_projection(&_pandemonium_variant, (pandemonium_projection *)&p_projection);
}
Variant::Variant(const Color &p_color) {
godot::api->pandemonium_variant_new_color(&_pandemonium_variant, (pandemonium_color *)&p_color);
pandemonium::api->pandemonium_variant_new_color(&_pandemonium_variant, (pandemonium_color *)&p_color);
}
Variant::Variant(const NodePath &p_path) {
godot::api->pandemonium_variant_new_node_path(&_pandemonium_variant, (pandemonium_node_path *)&p_path);
pandemonium::api->pandemonium_variant_new_node_path(&_pandemonium_variant, (pandemonium_node_path *)&p_path);
}
Variant::Variant(const godot::RID &p_rid) {
godot::api->pandemonium_variant_new_rid(&_pandemonium_variant, (pandemonium_rid *)&p_rid);
Variant::Variant(const pandemonium::RID &p_rid) {
pandemonium::api->pandemonium_variant_new_rid(&_pandemonium_variant, (pandemonium_rid *)&p_rid);
}
Variant::Variant(const Object *p_object) {
if (p_object)
godot::api->pandemonium_variant_new_object(&_pandemonium_variant, p_object->_owner);
pandemonium::api->pandemonium_variant_new_object(&_pandemonium_variant, p_object->_owner);
else
godot::api->pandemonium_variant_new_nil(&_pandemonium_variant);
pandemonium::api->pandemonium_variant_new_nil(&_pandemonium_variant);
}
Variant::Variant(const Dictionary &p_dictionary) {
godot::api->pandemonium_variant_new_dictionary(&_pandemonium_variant, (pandemonium_dictionary *)&p_dictionary);
pandemonium::api->pandemonium_variant_new_dictionary(&_pandemonium_variant, (pandemonium_dictionary *)&p_dictionary);
}
Variant::Variant(const Array &p_array) {
godot::api->pandemonium_variant_new_array(&_pandemonium_variant, (pandemonium_array *)&p_array);
pandemonium::api->pandemonium_variant_new_array(&_pandemonium_variant, (pandemonium_array *)&p_array);
}
Variant::Variant(const PoolByteArray &p_raw_array) {
godot::api->pandemonium_variant_new_pool_byte_array(&_pandemonium_variant, (pandemonium_pool_byte_array *)&p_raw_array);
pandemonium::api->pandemonium_variant_new_pool_byte_array(&_pandemonium_variant, (pandemonium_pool_byte_array *)&p_raw_array);
}
Variant::Variant(const PoolIntArray &p_int_array) {
godot::api->pandemonium_variant_new_pool_int_array(&_pandemonium_variant, (pandemonium_pool_int_array *)&p_int_array);
pandemonium::api->pandemonium_variant_new_pool_int_array(&_pandemonium_variant, (pandemonium_pool_int_array *)&p_int_array);
}
Variant::Variant(const PoolRealArray &p_real_array) {
godot::api->pandemonium_variant_new_pool_real_array(&_pandemonium_variant, (pandemonium_pool_real_array *)&p_real_array);
pandemonium::api->pandemonium_variant_new_pool_real_array(&_pandemonium_variant, (pandemonium_pool_real_array *)&p_real_array);
}
Variant::Variant(const PoolStringArray &p_string_array) {
godot::api->pandemonium_variant_new_pool_string_array(&_pandemonium_variant, (pandemonium_pool_string_array *)&p_string_array);
pandemonium::api->pandemonium_variant_new_pool_string_array(&_pandemonium_variant, (pandemonium_pool_string_array *)&p_string_array);
}
Variant::Variant(const PoolVector2Array &p_vector2_array) {
godot::api->pandemonium_variant_new_pool_vector2_array(&_pandemonium_variant, (pandemonium_pool_vector2_array *)&p_vector2_array);
pandemonium::api->pandemonium_variant_new_pool_vector2_array(&_pandemonium_variant, (pandemonium_pool_vector2_array *)&p_vector2_array);
}
Variant::Variant(const PoolVector3Array &p_vector3_array) {
godot::api->pandemonium_variant_new_pool_vector3_array(&_pandemonium_variant, (pandemonium_pool_vector3_array *)&p_vector3_array);
pandemonium::api->pandemonium_variant_new_pool_vector3_array(&_pandemonium_variant, (pandemonium_pool_vector3_array *)&p_vector3_array);
}
Variant::Variant(const PoolColorArray &p_color_array) {
godot::api->pandemonium_variant_new_pool_color_array(&_pandemonium_variant, (pandemonium_pool_color_array *)&p_color_array);
pandemonium::api->pandemonium_variant_new_pool_color_array(&_pandemonium_variant, (pandemonium_pool_color_array *)&p_color_array);
}
Variant &Variant::operator=(const Variant &v) {
godot::api->pandemonium_variant_destroy(&_pandemonium_variant);
godot::api->pandemonium_variant_new_copy(&_pandemonium_variant, &v._pandemonium_variant);
pandemonium::api->pandemonium_variant_destroy(&_pandemonium_variant);
pandemonium::api->pandemonium_variant_new_copy(&_pandemonium_variant, &v._pandemonium_variant);
return *this;
}
@ -225,182 +225,182 @@ Variant::operator bool() const {
return booleanize();
}
Variant::operator signed int() const {
return godot::api->pandemonium_variant_as_int(&_pandemonium_variant);
return pandemonium::api->pandemonium_variant_as_int(&_pandemonium_variant);
}
Variant::operator unsigned int() const // this is the real one
{
return godot::api->pandemonium_variant_as_uint(&_pandemonium_variant);
return pandemonium::api->pandemonium_variant_as_uint(&_pandemonium_variant);
}
Variant::operator signed short() const {
return godot::api->pandemonium_variant_as_int(&_pandemonium_variant);
return pandemonium::api->pandemonium_variant_as_int(&_pandemonium_variant);
}
Variant::operator unsigned short() const {
return godot::api->pandemonium_variant_as_uint(&_pandemonium_variant);
return pandemonium::api->pandemonium_variant_as_uint(&_pandemonium_variant);
}
Variant::operator signed char() const {
return godot::api->pandemonium_variant_as_int(&_pandemonium_variant);
return pandemonium::api->pandemonium_variant_as_int(&_pandemonium_variant);
}
Variant::operator unsigned char() const {
return godot::api->pandemonium_variant_as_uint(&_pandemonium_variant);
return pandemonium::api->pandemonium_variant_as_uint(&_pandemonium_variant);
}
Variant::operator int64_t() const {
return godot::api->pandemonium_variant_as_int(&_pandemonium_variant);
return pandemonium::api->pandemonium_variant_as_int(&_pandemonium_variant);
}
Variant::operator uint64_t() const {
return godot::api->pandemonium_variant_as_uint(&_pandemonium_variant);
return pandemonium::api->pandemonium_variant_as_uint(&_pandemonium_variant);
}
Variant::operator wchar_t() const {
return godot::api->pandemonium_variant_as_int(&_pandemonium_variant);
return pandemonium::api->pandemonium_variant_as_int(&_pandemonium_variant);
}
Variant::operator float() const {
return godot::api->pandemonium_variant_as_real(&_pandemonium_variant);
return pandemonium::api->pandemonium_variant_as_real(&_pandemonium_variant);
}
Variant::operator double() const {
return godot::api->pandemonium_variant_as_real(&_pandemonium_variant);
return pandemonium::api->pandemonium_variant_as_real(&_pandemonium_variant);
}
Variant::operator String() const {
pandemonium_string s = godot::api->pandemonium_variant_as_string(&_pandemonium_variant);
pandemonium_string s = pandemonium::api->pandemonium_variant_as_string(&_pandemonium_variant);
return String(s);
}
Variant::operator StringName() const {
pandemonium_string_name s = godot::api->pandemonium_variant_as_string_name(&_pandemonium_variant);
pandemonium_string_name s = pandemonium::api->pandemonium_variant_as_string_name(&_pandemonium_variant);
return StringName(s);
}
Variant::operator Vector2() const {
pandemonium_vector2 s = godot::api->pandemonium_variant_as_vector2(&_pandemonium_variant);
pandemonium_vector2 s = pandemonium::api->pandemonium_variant_as_vector2(&_pandemonium_variant);
return *(Vector2 *)&s;
}
Variant::operator Vector2i() const {
pandemonium_vector2i s = godot::api->pandemonium_variant_as_vector2i(&_pandemonium_variant);
pandemonium_vector2i s = pandemonium::api->pandemonium_variant_as_vector2i(&_pandemonium_variant);
return *(Vector2i *)&s;
}
Variant::operator Rect2() const {
pandemonium_rect2 s = godot::api->pandemonium_variant_as_rect2(&_pandemonium_variant);
pandemonium_rect2 s = pandemonium::api->pandemonium_variant_as_rect2(&_pandemonium_variant);
return *(Rect2 *)&s;
}
Variant::operator Rect2i() const {
pandemonium_rect2i s = godot::api->pandemonium_variant_as_rect2i(&_pandemonium_variant);
pandemonium_rect2i s = pandemonium::api->pandemonium_variant_as_rect2i(&_pandemonium_variant);
return *(Rect2i *)&s;
}
Variant::operator Vector3() const {
pandemonium_vector3 s = godot::api->pandemonium_variant_as_vector3(&_pandemonium_variant);
pandemonium_vector3 s = pandemonium::api->pandemonium_variant_as_vector3(&_pandemonium_variant);
return *(Vector3 *)&s;
}
Variant::operator Vector3i() const {
pandemonium_vector3i s = godot::api->pandemonium_variant_as_vector3i(&_pandemonium_variant);
pandemonium_vector3i s = pandemonium::api->pandemonium_variant_as_vector3i(&_pandemonium_variant);
return *(Vector3i *)&s;
}
Variant::operator Vector4() const {
pandemonium_vector4 s = godot::api->pandemonium_variant_as_vector4(&_pandemonium_variant);
pandemonium_vector4 s = pandemonium::api->pandemonium_variant_as_vector4(&_pandemonium_variant);
return *(Vector4 *)&s;
}
Variant::operator Vector4i() const {
pandemonium_vector4i s = godot::api->pandemonium_variant_as_vector4i(&_pandemonium_variant);
pandemonium_vector4i s = pandemonium::api->pandemonium_variant_as_vector4i(&_pandemonium_variant);
return *(Vector4i *)&s;
}
Variant::operator Plane() const {
pandemonium_plane s = godot::api->pandemonium_variant_as_plane(&_pandemonium_variant);
pandemonium_plane s = pandemonium::api->pandemonium_variant_as_plane(&_pandemonium_variant);
return *(Plane *)&s;
}
Variant::operator godot::AABB() const {
pandemonium_aabb s = godot::api->pandemonium_variant_as_aabb(&_pandemonium_variant);
return *(godot::AABB *)&s;
Variant::operator pandemonium::AABB() const {
pandemonium_aabb s = pandemonium::api->pandemonium_variant_as_aabb(&_pandemonium_variant);
return *(pandemonium::AABB *)&s;
}
Variant::operator Quaternion() const {
pandemonium_quaternion s = godot::api->pandemonium_variant_as_quaternion(&_pandemonium_variant);
pandemonium_quaternion s = pandemonium::api->pandemonium_variant_as_quaternion(&_pandemonium_variant);
return *(Quaternion *)&s;
}
Variant::operator Basis() const {
pandemonium_basis s = godot::api->pandemonium_variant_as_basis(&_pandemonium_variant);
pandemonium_basis s = pandemonium::api->pandemonium_variant_as_basis(&_pandemonium_variant);
return *(Basis *)&s;
}
Variant::operator Transform() const {
pandemonium_transform s = godot::api->pandemonium_variant_as_transform(&_pandemonium_variant);
pandemonium_transform s = pandemonium::api->pandemonium_variant_as_transform(&_pandemonium_variant);
return *(Transform *)&s;
}
Variant::operator Transform2D() const {
pandemonium_transform2d s = godot::api->pandemonium_variant_as_transform2d(&_pandemonium_variant);
pandemonium_transform2d s = pandemonium::api->pandemonium_variant_as_transform2d(&_pandemonium_variant);
return *(Transform2D *)&s;
}
Variant::operator Projection() const {
pandemonium_projection s = godot::api->pandemonium_variant_as_projection(&_pandemonium_variant);
pandemonium_projection s = pandemonium::api->pandemonium_variant_as_projection(&_pandemonium_variant);
return *(Projection *)&s;
}
Variant::operator Color() const {
pandemonium_color s = godot::api->pandemonium_variant_as_color(&_pandemonium_variant);
pandemonium_color s = pandemonium::api->pandemonium_variant_as_color(&_pandemonium_variant);
return *(Color *)&s;
}
Variant::operator NodePath() const {
pandemonium_node_path ret = godot::api->pandemonium_variant_as_node_path(&_pandemonium_variant);
pandemonium_node_path ret = pandemonium::api->pandemonium_variant_as_node_path(&_pandemonium_variant);
return NodePath(ret);
}
Variant::operator godot::RID() const {
pandemonium_rid s = godot::api->pandemonium_variant_as_rid(&_pandemonium_variant);
return *(godot::RID *)&s;
Variant::operator pandemonium::RID() const {
pandemonium_rid s = pandemonium::api->pandemonium_variant_as_rid(&_pandemonium_variant);
return *(pandemonium::RID *)&s;
}
Variant::operator Dictionary() const {
Dictionary ret(godot::api->pandemonium_variant_as_dictionary(&_pandemonium_variant));
Dictionary ret(pandemonium::api->pandemonium_variant_as_dictionary(&_pandemonium_variant));
return ret;
}
Variant::operator Array() const {
Array ret(godot::api->pandemonium_variant_as_array(&_pandemonium_variant));
Array ret(pandemonium::api->pandemonium_variant_as_array(&_pandemonium_variant));
return ret;
}
Variant::operator PoolByteArray() const {
pandemonium_pool_byte_array ret = godot::api->pandemonium_variant_as_pool_byte_array(&_pandemonium_variant);
pandemonium_pool_byte_array ret = pandemonium::api->pandemonium_variant_as_pool_byte_array(&_pandemonium_variant);
return PoolByteArray(ret);
}
Variant::operator PoolIntArray() const {
pandemonium_pool_int_array ret = godot::api->pandemonium_variant_as_pool_int_array(&_pandemonium_variant);
pandemonium_pool_int_array ret = pandemonium::api->pandemonium_variant_as_pool_int_array(&_pandemonium_variant);
return PoolIntArray(ret);
}
Variant::operator PoolRealArray() const {
pandemonium_pool_real_array ret = godot::api->pandemonium_variant_as_pool_real_array(&_pandemonium_variant);
pandemonium_pool_real_array ret = pandemonium::api->pandemonium_variant_as_pool_real_array(&_pandemonium_variant);
return PoolRealArray(ret);
}
Variant::operator PoolStringArray() const {
pandemonium_pool_string_array ret = godot::api->pandemonium_variant_as_pool_string_array(&_pandemonium_variant);
pandemonium_pool_string_array ret = pandemonium::api->pandemonium_variant_as_pool_string_array(&_pandemonium_variant);
return PoolStringArray(ret);
}
Variant::operator PoolVector2Array() const {
pandemonium_pool_vector2_array ret = godot::api->pandemonium_variant_as_pool_vector2_array(&_pandemonium_variant);
pandemonium_pool_vector2_array ret = pandemonium::api->pandemonium_variant_as_pool_vector2_array(&_pandemonium_variant);
return PoolVector2Array(ret);
}
Variant::operator PoolVector3Array() const {
pandemonium_pool_vector3_array ret = godot::api->pandemonium_variant_as_pool_vector3_array(&_pandemonium_variant);
pandemonium_pool_vector3_array ret = pandemonium::api->pandemonium_variant_as_pool_vector3_array(&_pandemonium_variant);
return PoolVector3Array(ret);
}
Variant::operator PoolColorArray() const {
pandemonium_pool_color_array ret = godot::api->pandemonium_variant_as_pool_color_array(&_pandemonium_variant);
pandemonium_pool_color_array ret = pandemonium::api->pandemonium_variant_as_pool_color_array(&_pandemonium_variant);
return PoolColorArray(ret);
}
Variant::operator pandemonium_object *() const {
return godot::api->pandemonium_variant_as_object(&_pandemonium_variant);
return pandemonium::api->pandemonium_variant_as_object(&_pandemonium_variant);
}
Variant::Type Variant::get_type() const {
return static_cast<Type>(godot::api->pandemonium_variant_get_type(&_pandemonium_variant));
return static_cast<Type>(pandemonium::api->pandemonium_variant_get_type(&_pandemonium_variant));
}
Variant Variant::call(const String &method, const Variant **args, const int arg_count) {
pandemonium_variant v = godot::api->pandemonium_variant_call(
pandemonium_variant v = pandemonium::api->pandemonium_variant_call(
&_pandemonium_variant, (pandemonium_string *)&method, (const pandemonium_variant **)args, arg_count, nullptr);
return Variant(v);
}
bool Variant::has_method(const String &method) {
return godot::api->pandemonium_variant_has_method(&_pandemonium_variant, (pandemonium_string *)&method);
return pandemonium::api->pandemonium_variant_has_method(&_pandemonium_variant, (pandemonium_string *)&method);
}
bool Variant::operator==(const Variant &b) const {
return godot::api->pandemonium_variant_operator_equal(&_pandemonium_variant, &b._pandemonium_variant);
return pandemonium::api->pandemonium_variant_operator_equal(&_pandemonium_variant, &b._pandemonium_variant);
}
bool Variant::operator!=(const Variant &b) const {
@ -408,7 +408,7 @@ bool Variant::operator!=(const Variant &b) const {
}
bool Variant::operator<(const Variant &b) const {
return godot::api->pandemonium_variant_operator_less(&_pandemonium_variant, &b._pandemonium_variant);
return pandemonium::api->pandemonium_variant_operator_less(&_pandemonium_variant, &b._pandemonium_variant);
}
bool Variant::operator<=(const Variant &b) const {
@ -424,15 +424,15 @@ bool Variant::operator>=(const Variant &b) const {
}
bool Variant::hash_compare(const Variant &b) const {
return godot::api->pandemonium_variant_hash_compare(&_pandemonium_variant, &b._pandemonium_variant);
return pandemonium::api->pandemonium_variant_hash_compare(&_pandemonium_variant, &b._pandemonium_variant);
}
bool Variant::booleanize() const {
return godot::api->pandemonium_variant_booleanize(&_pandemonium_variant);
return pandemonium::api->pandemonium_variant_booleanize(&_pandemonium_variant);
}
Variant::~Variant() {
godot::api->pandemonium_variant_destroy(&_pandemonium_variant);
pandemonium::api->pandemonium_variant_destroy(&_pandemonium_variant);
}
} // namespace godot
} // namespace pandemonium

View File

@ -2,11 +2,11 @@
/* Vector2.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/* PANDEMONIUM ENGINE */
/* https://pandemoniumengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
/* Copyright (c) 2014-2022 Pandemonium Engine contributors (cf. AUTHORS.md). */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@ -34,7 +34,7 @@
#include "String.hpp"
namespace godot {
namespace pandemonium {
const Vector2 Vector2::ZERO = Vector2();
const Vector2 Vector2::ONE = Vector2(1, 1);
@ -97,4 +97,4 @@ Vector2::operator String() const {
return String::num(x) + ", " + String::num(y);
}
} // namespace godot
} // namespace pandemonium

View File

@ -2,11 +2,11 @@
/* Vector2.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/* PANDEMONIUM ENGINE */
/* https://pandemoniumengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
/* Copyright (c) 2014-2022 Pandemonium Engine contributors (cf. AUTHORS.md). */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@ -34,10 +34,10 @@
#include "String.hpp"
namespace godot {
namespace pandemonium {
Vector2i::operator String() const {
return String::num(x) + ", " + String::num(y);
}
} // namespace godot
} // namespace pandemonium

View File

@ -2,11 +2,11 @@
/* Vector3.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/* PANDEMONIUM ENGINE */
/* https://pandemoniumengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
/* Copyright (c) 2014-2022 Pandemonium Engine contributors (cf. AUTHORS.md). */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@ -36,7 +36,7 @@
#include "Basis.hpp"
namespace godot {
namespace pandemonium {
const Vector3 Vector3::ZERO = Vector3();
const Vector3 Vector3::ONE = Vector3(1, 1, 1);
@ -118,4 +118,4 @@ Vector3::operator String() const {
return String::num(x) + ", " + String::num(y) + ", " + String::num(z);
}
} // namespace godot
} // namespace pandemonium

View File

@ -2,11 +2,11 @@
/* Vector2.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/* PANDEMONIUM ENGINE */
/* https://pandemoniumengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
/* Copyright (c) 2014-2022 Pandemonium Engine contributors (cf. AUTHORS.md). */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@ -34,10 +34,10 @@
#include "String.hpp"
namespace godot {
namespace pandemonium {
Vector3i::operator String() const {
return String::num(x) + ", " + String::num(y) + ", " + String::num(z) ;
}
} // namespace godot
} // namespace pandemonium

View File

@ -2,11 +2,11 @@
/* Vector2.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/* PANDEMONIUM ENGINE */
/* https://pandemoniumengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
/* Copyright (c) 2014-2022 Pandemonium Engine contributors (cf. AUTHORS.md). */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@ -34,10 +34,10 @@
#include "String.hpp"
namespace godot {
namespace pandemonium {
Vector4::operator String() const {
return String::num(x) + ", " + String::num(y) + ", " + String::num(z) + ", " + String::num(w);
}
} // namespace godot
} // namespace pandemonium

View File

@ -2,11 +2,11 @@
/* Vector2.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/* PANDEMONIUM ENGINE */
/* https://pandemoniumengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
/* Copyright (c) 2014-2022 Pandemonium Engine contributors (cf. AUTHORS.md). */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@ -34,10 +34,10 @@
#include "String.hpp"
namespace godot {
namespace pandemonium {
Vector4i::operator String() const {
return String::num(x) + ", " + String::num(y) + ", " + String::num(z) + ", " + String::num(w);
}
} // namespace godot
} // namespace pandemonium

6
test/.gitignore vendored
View File

@ -1,7 +1,7 @@
# Godot 4+ specific ignores
.godot/
# Pandemonium 4+ specific ignores
.pandemonium/
# Godot-specific ignores
# Pandemonium-specific ignores
.import/
export.cfg
export_presets.cfg

View File

@ -2,11 +2,11 @@
/* init.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/* PANDEMONIUM ENGINE */
/* https://pandemoniumengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
/* Copyright (c) 2014-2022 Pandemonium Engine contributors (cf. AUTHORS.md). */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@ -28,25 +28,25 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#include <Godot.hpp>
#include <Pandemonium.hpp>
#include <Reference.hpp>
using namespace godot;
using namespace pandemonium;
class SimpleClass : public Reference {
GODOT_CLASS(SimpleClass, Reference);
PANDEMONIUM_CLASS(SimpleClass, Reference);
public:
SimpleClass() {}
/** `_init` must exist as it is called by Godot. */
/** `_init` must exist as it is called by Pandemonium. */
void _init() {
_name = String("SimpleClass");
_value = 0;
}
void test_void_method() {
Godot::print("This is test");
Pandemonium::print("This is test");
}
Variant method(Variant arg) {
@ -69,8 +69,8 @@ public:
register_property<SimpleClass, int>("value", &SimpleClass::set_value, &SimpleClass::get_value, 0);
/** Registering a signal: **/
register_signal<SimpleClass>("signal_name0"); // windows: error C2668: 'godot::register_signal': ambiguous call to overloaded function
register_signal<SimpleClass>("signal_name1", "string_argument", GODOT_VARIANT_TYPE_STRING);
register_signal<SimpleClass>("signal_name0"); // windows: error C2668: 'pandemonium::register_signal': ambiguous call to overloaded function
register_signal<SimpleClass>("signal_name1", "string_argument", PANDEMONIUM_VARIANT_TYPE_STRING);
}
String _name;
@ -87,17 +87,17 @@ public:
/** GDNative Initialize **/
extern "C" void GDN_EXPORT pandemonium_gdnative_init(pandemonium_gdnative_init_options *o) {
godot::Godot::gdnative_init(o);
pandemonium::Pandemonium::gdnative_init(o);
}
/** GDNative Terminate **/
extern "C" void GDN_EXPORT pandemonium_gdnative_terminate(pandemonium_gdnative_terminate_options *o) {
godot::Godot::gdnative_terminate(o);
pandemonium::Pandemonium::gdnative_terminate(o);
}
/** NativeScript Initialize **/
extern "C" void GDN_EXPORT pandemonium_nativescript_init(void *handle) {
godot::Godot::nativescript_init(handle);
pandemonium::Pandemonium::nativescript_init(handle);
godot::register_class<SimpleClass>();
pandemonium::register_class<SimpleClass>();
}