From 23093687e3b079710bf2f972c2cd5e0b3cd59df6 Mon Sep 17 00:00:00 2001 From: Christoffer Sundbom Date: Sat, 12 Oct 2024 18:07:10 +0200 Subject: [PATCH 1/6] Alot of rebranding, check for errors please --- platform/android/detect.py | 2 +- platform/android/display_server_android.h | 2 +- platform/android/export/export_plugin.cpp | 4 +- platform/android/java/app/AndroidManifest.xml | 2 +- platform/android/java/app/build.gradle | 24 ++--- platform/android/java/app/config.gradle | 6 +- platform/android/java/app/gradle.properties | 4 +- platform/android/java/app/settings.gradle | 2 +- .../java/app/src/com/godot/game/GodotApp.java | 2 +- platform/android/java/build.gradle | 97 +++++++++++++++-- platform/android/java/editor/build.gradle | 8 +- .../org/godotengine/editor/GodotEditor.kt | 14 ++- .../java/org/godotengine/editor/GodotGame.kt | 2 +- platform/android/java/gradle.properties | 2 +- platform/android/java/lib/AndroidManifest.xml | 2 +- ...android.vending.expansion.downloader.patch | 44 ++++---- ...com.google.android.vending.licensing.patch | 12 +-- .../android/java/lib/res/values/strings.xml | 2 +- .../DownloaderClientMarshaller.java | 8 +- .../DownloaderServiceMarshaller.java | 8 +- .../vending/expansion/downloader/Helpers.java | 12 +-- .../expansion/downloader/SystemFacade.java | 4 +- .../downloader/impl/DownloadNotification.java | 4 +- .../downloader/impl/DownloadThread.java | 4 +- .../downloader/impl/DownloaderService.java | 4 +- .../licensing/PreferenceObfuscator.java | 4 +- .../vending/licensing/util/Base64.java | 8 +- .../godotengine/godot/FullScreenGodotApp.java | 2 +- .../lib/src/org/godotengine/godot/Godot.kt | 81 ++++++++++++-- .../org/godotengine/godot/GodotActivity.kt | 16 +-- .../godot/GodotDownloaderAlarmReceiver.java | 4 +- .../godot/GodotDownloaderService.java | 4 +- .../org/godotengine/godot/GodotFragment.java | 2 +- .../src/org/godotengine/godot/GodotHost.java | 24 ++--- .../src/org/godotengine/godot/GodotLib.java | 20 ++-- .../godotengine/godot/GodotRenderView.java | 2 +- .../src/org/godotengine/godot/GodotService.kt | 2 +- .../src/org/godotengine/godot/error/Error.kt | 100 ++++++++++++++++++ .../godotengine/godot/gl/GLSurfaceView.java | 12 +-- .../godotengine/godot/gl/GodotRenderer.java | 4 +- .../godot/input/GodotInputHandler.java | 4 +- .../godotengine/godot/io/file/FileErrors.kt | 6 ++ .../godotengine/godot/plugin/GodotPlugin.java | 38 +++---- .../godot/plugin/GodotPluginRegistry.java | 24 ++--- .../godotengine/godot/plugin/UsedByGodot.java | 2 +- .../godot/utils/GodotNetUtils.java | 10 +- .../godot/utils/ProcessPhoenix.java | 22 +++- .../godotengine/godot/vulkan/VkRenderer.kt | 2 +- .../src/org/godotengine/godot/xr/XRMode.java | 2 +- .../godot/utils/CommandLineFileParserTest.kt | 2 +- .../android/java/nativeSrcsConfigs/README.md | 2 +- .../java/scripts/publish-module.gradle | 2 +- platform/android/java/settings.gradle | 2 +- platform/android/java_godot_lib_jni.cpp | 4 +- platform/android/java_godot_wrapper.cpp | 4 +- platform/android/string_android.h | 4 +- platform/ios/export/export_plugin.cpp | 8 +- platform/ios/godot_app_delegate.m | 2 +- platform/ios/godot_view.mm | 2 +- platform/ios/joypad_ios.mm | 4 +- platform/linuxbsd/detect.py | 2 +- platform/linuxbsd/freedesktop_screensaver.cpp | 4 +- platform/linuxbsd/os_linuxbsd.cpp | 6 +- .../wayland/display_server_wayland.cpp | 4 +- platform/linuxbsd/wayland/key_mapping_xkb.cpp | 6 +- platform/linuxbsd/wayland/wayland_thread.cpp | 10 +- platform/linuxbsd/wayland/wayland_thread.h | 4 +- platform/linuxbsd/x11/display_server_x11.cpp | 16 +-- platform/linuxbsd/x11/key_mapping_x11.cpp | 6 +- platform/macos/README.md | 4 +- platform/macos/SCsub | 2 +- platform/macos/display_server_macos.mm | 20 ++-- .../doc_classes/EditorExportPlatformMacOS.xml | 2 +- platform/macos/export/export_plugin.cpp | 2 +- platform/macos/joypad_macos.mm | 4 +- platform/macos/key_mapping_macos.mm | 6 +- platform/macos/native_menu_macos.mm | 2 +- platform/web/SCsub | 2 +- platform/web/detect.py | 14 ++- platform/web/display_server_web.cpp | 2 +- .../doc_classes/EditorExportPlatformWeb.xml | 4 +- platform/web/emscripten_helpers.py | 2 +- platform/web/eslint.config.cjs | 2 +- platform/web/export/export_plugin.cpp | 4 +- platform/web/js/engine/config.js | 22 ++-- platform/web/js/engine/engine.js | 2 +- platform/web/js/libs/library_godot_audio.js | 4 +- platform/web/js/libs/library_godot_input.js | 2 +- platform/web/js/libs/library_godot_os.js | 4 +- platform/web/package.json | 4 +- platform/windows/detect.py | 6 +- platform/windows/display_server_windows.cpp | 16 +-- platform/windows/godot_res.rc | 4 +- platform/windows/godot_res_wrap.rc | 4 +- platform/windows/key_mapping_windows.cpp | 2 +- platform/windows/os_windows.cpp | 2 +- scene/2d/light_2d.cpp | 2 +- scene/2d/navigation_agent_2d.cpp | 2 +- scene/2d/touch_screen_button.cpp | 4 +- scene/3d/decal.cpp | 4 +- scene/3d/fog_volume.cpp | 4 +- scene/3d/gpu_particles_collision_3d.cpp | 20 ++-- scene/3d/navigation_agent_3d.cpp | 2 +- scene/3d/reflection_probe.cpp | 4 +- scene/3d/voxel_gi.cpp | 4 +- scene/3d/xr_body_modifier_3d.cpp | 2 +- scene/SCsub | 2 +- scene/animation/SCsub | 2 +- scene/gui/graph_edit.cpp | 2 +- scene/main/node.h | 2 +- scene/main/scene_tree.h | 6 +- scene/resources/2d/rectangle_shape_2d.cpp | 4 +- ...skeleton_modification_2d_physicalbones.cpp | 2 +- scene/resources/3d/box_shape_3d.cpp | 4 +- scene/resources/SCsub | 2 +- scene/resources/animation.cpp | 2 +- scene/resources/font.cpp | 2 +- scene/resources/material.cpp | 2 +- scene/resources/particle_process_material.cpp | 2 +- scene/resources/surface_tool.cpp | 2 +- scene/theme/default_theme.cpp | 2 +- 121 files changed, 637 insertions(+), 357 deletions(-) create mode 100644 platform/android/java/lib/src/org/godotengine/godot/error/Error.kt diff --git a/platform/android/detect.py b/platform/android/detect.py index 0a10754e246a..e7381bd58f1a 100644 --- a/platform/android/detect.py +++ b/platform/android/detect.py @@ -180,7 +180,7 @@ def configure(env: "SConsEnvironment"): env.Append(CPPDEFINES=[("_FILE_OFFSET_BITS", 64)]) if env["arch"] == "x86_32": - # The NDK adds this if targeting API < 24, so we can drop it when Godot targets it at least + # The NDK adds this if targeting API < 24, so we can drop it when Blazium targets it at least env.Append(CCFLAGS=["-mstackrealign"]) elif env["arch"] == "arm32": env.Append(CCFLAGS="-march=armv7-a -mfloat-abi=softfp".split()) diff --git a/platform/android/display_server_android.h b/platform/android/display_server_android.h index 90bda18cfa2c..847612629745 100644 --- a/platform/android/display_server_android.h +++ b/platform/android/display_server_android.h @@ -44,7 +44,7 @@ class DisplayServerAndroid : public DisplayServer { String rendering_driver; // https://developer.android.com/reference/android/view/PointerIcon - // mapping between Godot's cursor shape to Android's' + // mapping between Blazium's cursor shape to Android's' int android_cursors[CURSOR_MAX] = { 1000, //CURSOR_ARROW 1008, //CURSOR_IBEAM diff --git a/platform/android/export/export_plugin.cpp b/platform/android/export/export_plugin.cpp index d5153fb6c041..261f95c2b36d 100644 --- a/platform/android/export/export_plugin.cpp +++ b/platform/android/export/export_plugin.cpp @@ -593,7 +593,7 @@ bool EditorExportPlatformAndroid::_should_compress_asset(const String &p_path, c ".rtttl", ".imy", ".xmf", ".mp4", ".m4a", ".m4v", ".3gp", ".3gpp", ".3g2", ".3gpp2", ".amr", ".awb", ".wma", ".wmv", - // Godot-specific: + // Blazium-specific: ".webp", // Same reasoning as .png ".cfb", // Don't let small config files slow-down startup ".scn", // Binary scenes are usually already compressed @@ -1782,7 +1782,7 @@ String EditorExportPlatformAndroid::get_export_option_warning(const EditorExport } else { min_sdk_int = min_sdk_str.to_int(); if (min_sdk_int < OPENGL_MIN_SDK_VERSION) { - return vformat(TTR("\"Min SDK\" cannot be lower than %d, which is the version needed by the Godot library."), OPENGL_MIN_SDK_VERSION); + return vformat(TTR("\"Min SDK\" cannot be lower than %d, which is the version needed by the Blazium library."), OPENGL_MIN_SDK_VERSION); } } } diff --git a/platform/android/java/app/AndroidManifest.xml b/platform/android/java/app/AndroidManifest.xml index 0cc929d226c6..ae11e484eec4 100644 --- a/platform/android/java/app/AndroidManifest.xml +++ b/platform/android/java/app/AndroidManifest.xml @@ -29,7 +29,7 @@ android:enabled="true" tools:targetApi="29" /> - + diff --git a/platform/android/java/app/build.gradle b/platform/android/java/app/build.gradle index 01d5d9ef9294..c3fe118e476e 100644 --- a/platform/android/java/app/build.gradle +++ b/platform/android/java/app/build.gradle @@ -1,4 +1,4 @@ -// Gradle build config for Godot Engine's Android port. +// Gradle build config for Blazium Engine's Android port. plugins { id 'com.android.application' id 'org.jetbrains.kotlin.android' @@ -13,7 +13,7 @@ allprojects { gradlePluginPortal() maven { url "https://plugins.gradle.org/m2/" } - // Godot user plugins custom maven repos + // Blazium user plugins custom maven repos String[] mavenRepos = getGodotPluginsMavenRepos() if (mavenRepos != null && mavenRepos.size() > 0) { for (String repoUrl : mavenRepos) { @@ -39,14 +39,14 @@ dependencies { } else if (rootProject.findProject(":godot:lib")) { implementation project(":godot:lib") } else { - // Godot gradle build mode. In this scenario this project is the only one around and the Godot + // Blazium gradle build mode. In this scenario this project is the only one around and the Blazium // library is available through the pre-generated godot-lib.*.aar android archive files. debugImplementation fileTree(dir: 'libs/debug', include: ['*.jar', '*.aar']) devImplementation fileTree(dir: 'libs/dev', include: ['*.jar', '*.aar']) releaseImplementation fileTree(dir: 'libs/release', include: ['*.jar', '*.aar']) } - // Godot user plugins remote dependencies + // Blazium user plugins remote dependencies String[] remoteDeps = getGodotPluginsRemoteBinaries() if (remoteDeps != null && remoteDeps.size() > 0) { for (String dep : remoteDeps) { @@ -54,7 +54,7 @@ dependencies { } } - // Godot user plugins local dependencies + // Blazium user plugins local dependencies String[] pluginsBinaries = getGodotPluginsLocalBinaries() if (pluginsBinaries != null && pluginsBinaries.size() > 0) { implementation files(pluginsBinaries) @@ -80,7 +80,7 @@ android { namespace = 'com.godot.game' defaultConfig { - // The default ignore pattern for the 'assets' directory includes hidden files and directories which are used by Godot projects. + // The default ignore pattern for the 'assets' directory includes hidden files and directories which are used by Blazium projects. aaptOptions { ignoreAssetsPattern "!.svn:!.git:!.gitignore:!.ds_store:!*.scc:_*:!CVS:!thumbs.db:!picasa.ini:!*~" } @@ -126,7 +126,7 @@ android { useLegacyPackaging shouldUseLegacyPackaging() } - // Always select Godot's version of libc++_shared.so in case deps have their own + // Always select Blazium's version of libc++_shared.so in case deps have their own pickFirst 'lib/x86/libc++_shared.so' pickFirst 'lib/x86_64/libc++_shared.so' pickFirst 'lib/armeabi-v7a/libc++_shared.so' @@ -158,7 +158,7 @@ android { debug { // Signing and zip-aligning are skipped for prebuilt builds, but - // performed for Godot gradle builds. + // performed for Blazium gradle builds. zipAlignEnabled shouldZipAlign() if (shouldSign()) { signingConfig signingConfigs.debug @@ -170,7 +170,7 @@ android { dev { initWith debug // Signing and zip-aligning are skipped for prebuilt builds, but - // performed for Godot gradle builds. + // performed for Blazium gradle builds. zipAlignEnabled shouldZipAlign() if (shouldSign()) { signingConfig signingConfigs.debug @@ -181,7 +181,7 @@ android { release { // Signing and zip-aligning are skipped for prebuilt builds, but - // performed for Godot gradle builds. + // performed for Blazium gradle builds. zipAlignEnabled shouldZipAlign() if (shouldSign()) { signingConfig signingConfigs.release @@ -278,11 +278,11 @@ task copyAndRenameReleaseAab(type: Copy) { } /** - * Used to validate the version of the Java SDK used for the Godot gradle builds. + * Used to validate the version of the Java SDK used for the Blazium gradle builds. */ task validateJavaVersion { if (JavaVersion.current() != versions.javaVersion) { - throw new GradleException("Invalid Java version ${JavaVersion.current()}. Version ${versions.javaVersion} is the required Java version for Godot gradle builds.") + throw new GradleException("Invalid Java version ${JavaVersion.current()}. Version ${versions.javaVersion} is the required Java version for Blazium gradle builds.") } } diff --git a/platform/android/java/app/config.gradle b/platform/android/java/app/config.gradle index eb9ad9de059e..1a3d28a72963 100644 --- a/platform/android/java/app/config.gradle +++ b/platform/android/java/app/config.gradle @@ -17,11 +17,11 @@ ext.versions = [ ] ext.getExportPackageName = { -> - // Retrieve the app id from the project property set by the Godot build command. + // Retrieve the app id from the project property set by the Blazium build command. String appId = project.hasProperty("export_package_name") ? project.property("export_package_name") : "" // Check if the app id is valid, otherwise use the default. if (appId == null || appId.isEmpty()) { - appId = "com.godot.game" + appId = "com.blazium.game" } return appId } @@ -219,7 +219,7 @@ ext.getExportPath = { ext.getExportFilename = { String exportFilename = project.hasProperty("export_filename") ? project.property("export_filename") : "" if (exportFilename == null || exportFilename.isEmpty()) { - exportFilename = "godot_android" + exportFilename = "blazium_android" } return exportFilename } diff --git a/platform/android/java/app/gradle.properties b/platform/android/java/app/gradle.properties index 2b6468c95e17..bb4d852575ac 100644 --- a/platform/android/java/app/gradle.properties +++ b/platform/android/java/app/gradle.properties @@ -1,5 +1,5 @@ -# Godot gradle build settings. -# These properties apply when running a gradle build from the Godot editor. +# Blazium gradle build settings. +# These properties apply when running a gradle build from the Blazium editor. # NOTE: This should be kept in sync with 'godot/platform/android/java/gradle.properties' except # where otherwise specified. diff --git a/platform/android/java/app/settings.gradle b/platform/android/java/app/settings.gradle index dcac44e393ed..44018ea57b67 100644 --- a/platform/android/java/app/settings.gradle +++ b/platform/android/java/app/settings.gradle @@ -1,4 +1,4 @@ -// This is the root directory of the Godot Android gradle build. +// This is the root directory of the Blazium Android gradle build. pluginManagement { apply from: 'config.gradle' diff --git a/platform/android/java/app/src/com/godot/game/GodotApp.java b/platform/android/java/app/src/com/godot/game/GodotApp.java index 22e617f6e738..b9473a6481d4 100644 --- a/platform/android/java/app/src/com/godot/game/GodotApp.java +++ b/platform/android/java/app/src/com/godot/game/GodotApp.java @@ -37,7 +37,7 @@ import androidx.core.splashscreen.SplashScreen; /** - * Template activity for Godot Android builds. + * Template activity for Blazium Android builds. * Feel free to extend and modify this class for your custom logic. */ public class GodotApp extends GodotActivity { diff --git a/platform/android/java/build.gradle b/platform/android/java/build.gradle index f5555289fd17..a90396a7ae54 100644 --- a/platform/android/java/build.gradle +++ b/platform/android/java/build.gradle @@ -46,6 +46,7 @@ def getSconsTaskName(String flavor, String buildType, String abi) { } /** +<<<<<<< HEAD * Copy the generated 'android_debug.apk' binary template into the Godot bin directory. * Depends on the app build task to ensure the binary is generated prior to copying. */ @@ -146,13 +147,16 @@ task copyReleaseAARToBin(type: Copy) { /** * Generate Godot gradle build template by zipping the source files from the app directory, as well +======= + * Generate Blazium gradle build template by zipping the source files from the app directory, as well +>>>>>>> a534a98048 (Alot of rebranding, check for errors please) * as the AAR files generated by 'copyDebugAAR', 'copyDevAAR' and 'copyReleaseAAR'. - * The zip file also includes some gradle tools to enable gradle builds from the Godot Editor. + * The zip file also includes some gradle tools to enable gradle builds from the Blazium Editor. */ task zipGradleBuild(type: Zip) { onlyIf { generateGodotTemplates.state.executed || generateDevTemplate.state.executed } doFirst { - logger.lifecycle("Generating Godot gradle build template") + logger.lifecycle("Generating Blazium gradle build template") } from(fileTree(dir: 'app', excludes: ['**/build/**', '**/.gradle/**', '**/*.iml']), fileTree(dir: '.', includes: ['gradlew', 'gradlew.bat', 'gradle/**'])) include '**/*' @@ -161,7 +165,7 @@ task zipGradleBuild(type: Zip) { } /** - * Returns true if the scons build tasks responsible for generating the Godot native shared + * Returns true if the scons build tasks responsible for generating the Blazium native shared * libraries should be excluded. */ def excludeSconsBuildTasks() { @@ -212,12 +216,57 @@ def generateBuildTasks(String flavor = "template") { && targetLibs.listFiles().length > 0)) { String capitalizedTarget = target.capitalize() if (isTemplate) { +<<<<<<< HEAD // Copy the generated aar library files to the build directory. tasks += "copy${capitalizedTarget}AARToAppModule" // Copy the generated aar library files to the bin directory. tasks += "copy${capitalizedTarget}AARToBin" // Copy the prebuilt binary templates to the bin directory. tasks += "copy${capitalizedTarget}BinaryToBin" +======= + // Copy the Blazium android library archive file into the app module libs directory. + // Depends on the library build task to ensure the AAR file is generated prior to copying. + String copyAARTaskName = "copy${capitalizedTarget}AARToAppModule" + if (tasks.findByName(copyAARTaskName) != null) { + buildTasks += tasks.getByName(copyAARTaskName) + } else { + buildTasks += tasks.create(name: copyAARTaskName, type: Copy) { + dependsOn ":lib:assembleTemplate${capitalizedTarget}" + from('lib/build/outputs/aar') + include("godot-lib.template_${targetSuffix}.aar") + into("app/libs/${target}") + } + } + + // Copy the Blazium android library archive file into the root bin directory. + // Depends on the library build task to ensure the AAR file is generated prior to copying. + String copyAARToBinTaskName = "copy${capitalizedTarget}AARToBin" + if (tasks.findByName(copyAARToBinTaskName) != null) { + buildTasks += tasks.getByName(copyAARToBinTaskName) + } else { + buildTasks += tasks.create(name: copyAARToBinTaskName, type: Copy) { + dependsOn ":lib:assembleTemplate${capitalizedTarget}" + from('lib/build/outputs/aar') + include("godot-lib.template_${targetSuffix}.aar") + into(binDir) + } + } + + // Copy the generated binary template into the Blazium bin directory. + // Depends on the app build task to ensure the binary is generated prior to copying. + String copyBinaryTaskName = "copy${capitalizedEdition}${capitalizedTarget}BinaryToBin" + if (tasks.findByName(copyBinaryTaskName) != null) { + buildTasks += tasks.getByName(copyBinaryTaskName) + } else { + buildTasks += tasks.create(name: copyBinaryTaskName, type: Copy) { + String filenameSuffix = edition == "mono" ? "${edition}${capitalizedTarget}" : target + dependsOn ":app:assemble${capitalizedEdition}${capitalizedTarget}" + from("app/build/outputs/apk/${edition}/${target}") + into(binDir) + include("android_${filenameSuffix}.apk") + } + } +>>>>>>> a534a98048 (Alot of rebranding, check for errors please) } else { // Copy the generated editor apk to the bin directory. tasks += "copyEditor${capitalizedTarget}ApkToBin" @@ -275,19 +324,39 @@ task copyEditorDevAabToBin(type: Copy) { } /** +<<<<<<< HEAD * Generate the Godot Editor Android apk. +======= + * Generate the Blazium Editor binaries for Android devices. +>>>>>>> a534a98048 (Alot of rebranding, check for errors please) * - * Note: Unless the 'generateNativeLibs` argument is specified, the Godot 'tools' shared libraries + * Note: Unless the 'generateNativeLibs` argument is specified, the Blazium 'tools' shared libraries * must have been generated (via scons) prior to running this gradle task. * The task will only build the apk(s) for which the shared libraries is available. */ task generateGodotEditor { gradle.startParameter.excludedTaskNames += templateExcludedBuildTask() +<<<<<<< HEAD dependsOn = generateBuildTasks("editor") +======= + dependsOn = generateBuildTasks("editor", "standard", "android") } /** - * Master task used to coordinate the tasks defined above to generate the set of Godot templates. + * Generate the Blazium Editor binaries for HorizonOS devices. + * + * Note: Unless the 'generateNativeLibs` argument is specified, the Blazium 'tools' shared libraries + * must have been generated (via scons) prior to running this gradle task. + * The task will only build the binaries for which the shared libraries is available. + */ +task generateGodotHorizonOSEditor { + gradle.startParameter.excludedTaskNames += templateExcludedBuildTask() + dependsOn = generateBuildTasks("editor", "standard", "horizonos") +>>>>>>> a534a98048 (Alot of rebranding, check for errors please) +} + +/** + * Master task used to coordinate the tasks defined above to generate the set of Blazium templates. */ task generateGodotTemplates { gradle.startParameter.excludedTaskNames += templateExcludedBuildTask() @@ -297,6 +366,20 @@ task generateGodotTemplates { } /** +<<<<<<< HEAD +======= + * Master task used to coordinate the tasks defined above to generate the set of Blazium templates + * for the 'mono' edition of the engine. + */ +task generateGodotMonoTemplates { + gradle.startParameter.excludedTaskNames += templateExcludedBuildTask() + dependsOn = generateBuildTasks("template", "mono") + + finalizedBy 'zipGradleBuild' +} + +/** +>>>>>>> a534a98048 (Alot of rebranding, check for errors please) * Generates the same output as generateGodotTemplates but with dev symbols */ task generateDevTemplate { @@ -330,7 +413,7 @@ task cleanGodotEditor(type: Delete) { // Delete the generated aab binaries delete("editor/build/outputs/bundle") - // Delete the Godot editor apks & aabs in the Godot bin directory + // Delete the Blazium editor apks & aabs in the Blazium bin directory delete(androidEditorBuildsDir) } @@ -350,7 +433,7 @@ task cleanGodotTemplates(type: Delete) { // Delete the generated binary apks delete("app/build/outputs/apk") - // Delete the Godot templates in the Godot bin directory + // Delete the Blazium templates in the Blazium bin directory delete("$binDir/android_debug.apk") delete("$binDir/android_dev.apk") delete("$binDir/android_release.apk") diff --git a/platform/android/java/editor/build.gradle b/platform/android/java/editor/build.gradle index 37f68d295ac2..2c5ed0ac123e 100644 --- a/platform/android/java/editor/build.gradle +++ b/platform/android/java/editor/build.gradle @@ -1,4 +1,4 @@ -// Gradle build config for Godot Engine's Android port. +// Gradle build config for Blazium Engine's Android port. plugins { id 'com.android.application' id 'org.jetbrains.kotlin.android' @@ -30,7 +30,7 @@ ext { return buildNumber } - // Value by which the Godot version code should be offset by to make room for the build number + // Value by which the Blazium version code should be offset by to make room for the build number editorBuildNumberOffset = 100 // Return the keystore file used for signing the release build. @@ -86,7 +86,7 @@ android { namespace = "org.godotengine.editor" defaultConfig { - // The 'applicationId' suffix allows to install Godot 3.x(v3) and 4.x(v4) on the same device + // The 'applicationId' suffix allows to install Blazium 3.x(v3) and 4.x(v4) on the same device applicationId "org.godotengine.editor.v4" versionCode generateVersionCode() versionName generateVersionName() @@ -95,7 +95,7 @@ android { missingDimensionStrategy 'products', 'editor' manifestPlaceholders += [ - editorAppName: "Godot Editor 4", + editorAppName: "Blazium Editor 4", editorBuildSuffix: "" ] } diff --git a/platform/android/java/editor/src/main/java/org/godotengine/editor/GodotEditor.kt b/platform/android/java/editor/src/main/java/org/godotengine/editor/GodotEditor.kt index 7c11d696090c..626aba5c7f33 100644 --- a/platform/android/java/editor/src/main/java/org/godotengine/editor/GodotEditor.kt +++ b/platform/android/java/editor/src/main/java/org/godotengine/editor/GodotEditor.kt @@ -51,13 +51,17 @@ import java.util.* import kotlin.math.min /** - * Base class for the Godot Android Editor activities. + * Base class for the Blazium Android Editor activities. * * This provides the basic templates for the activities making up this application. * Each derived activity runs in its own process, which enable up to have several instances of +<<<<<<< HEAD:platform/android/java/editor/src/main/java/org/godotengine/editor/GodotEditor.kt * the Godot engine up and running at the same time. * * It also plays the role of the primary editor window. +======= + * the Blazium engine up and running at the same time. +>>>>>>> a534a98048 (Alot of rebranding, check for errors please):platform/android/java/editor/src/main/java/org/godotengine/editor/BaseGodotEditor.kt */ open class GodotEditor : GodotActivity() { @@ -234,7 +238,7 @@ open class GodotEditor : GodotActivity() { for (runningProcess in runningProcesses) { if (runningProcess.processName == processName) { // Killing process directly - Log.v(TAG, "Killing Godot process ${runningProcess.processName}") + Log.v(TAG, "Killing Blazium process ${runningProcess.processName}") Process.killProcess(runningProcess.pid) return true } @@ -265,18 +269,18 @@ open class GodotEditor : GodotActivity() { } /** - * The Godot Android Editor sets its own orientation via its AndroidManifest + * The Blazium Android Editor sets its own orientation via its AndroidManifest */ protected open fun overrideOrientationRequest() = true /** - * Enable long press gestures for the Godot Android editor. + * Enable long press gestures for the Blazium Android editor. */ protected open fun enableLongPressGestures() = java.lang.Boolean.parseBoolean(GodotLib.getEditorSetting("interface/touchscreen/enable_long_press_as_right_click")) /** - * Enable pan and scale gestures for the Godot Android editor. + * Enable pan and scale gestures for the Blazium Android editor. */ protected open fun enablePanAndScaleGestures() = java.lang.Boolean.parseBoolean(GodotLib.getEditorSetting("interface/touchscreen/enable_pan_and_scale_gestures")) diff --git a/platform/android/java/editor/src/main/java/org/godotengine/editor/GodotGame.kt b/platform/android/java/editor/src/main/java/org/godotengine/editor/GodotGame.kt index 2bcfba559c5a..464fc9f0884b 100644 --- a/platform/android/java/editor/src/main/java/org/godotengine/editor/GodotGame.kt +++ b/platform/android/java/editor/src/main/java/org/godotengine/editor/GodotGame.kt @@ -33,7 +33,7 @@ package org.godotengine.editor import org.godotengine.godot.GodotLib /** - * Drives the 'run project' window of the Godot Editor. + * Drives the 'run project' window of the Blazium Editor. */ class GodotGame : GodotEditor() { diff --git a/platform/android/java/gradle.properties b/platform/android/java/gradle.properties index c8abb52614cd..18719a5e659f 100644 --- a/platform/android/java/gradle.properties +++ b/platform/android/java/gradle.properties @@ -24,7 +24,7 @@ org.gradle.jvmargs=-Xmx4536m org.gradle.warning.mode=all # Disable resource optimizations for template release build. -# NOTE: This is turned on for Godot Editor's gradle builds in order to improve the release build. +# NOTE: This is turned on for Blazium Editor's gradle builds in order to improve the release build. android.enableResourceOptimizations=false # Fix gradle build errors when the build path contains non-ASCII characters diff --git a/platform/android/java/lib/AndroidManifest.xml b/platform/android/java/lib/AndroidManifest.xml index 8240843876b1..54a92bcc8085 100644 --- a/platform/android/java/lib/AndroidManifest.xml +++ b/platform/android/java/lib/AndroidManifest.xml @@ -5,7 +5,7 @@ - + diff --git a/platform/android/java/lib/patches/com.google.android.vending.expansion.downloader.patch b/platform/android/java/lib/patches/com.google.android.vending.expansion.downloader.patch index 49cc41e817fb..5ae11d6cadef 100644 --- a/platform/android/java/lib/patches/com.google.android.vending.expansion.downloader.patch +++ b/platform/android/java/lib/patches/com.google.android.vending.expansion.downloader.patch @@ -6,9 +6,9 @@ index ad6ea0de6..452c7d148 100644 import android.os.RemoteException; import android.util.Log; -+// -- GODOT start -- ++// -- BLAZIUM start -- +import java.lang.ref.WeakReference; -+// -- GODOT end -- ++// -- Blazium end -- /** @@ -17,7 +17,7 @@ index ad6ea0de6..452c7d148 100644 * Target we publish for clients to send messages to IncomingHandler. */ - final Messenger mMessenger = new Messenger(new Handler() { -+ // -- GODOT start -- ++ // -- BLAZIUM start -- + private final MessengerHandlerClient mMsgHandler = new MessengerHandlerClient(this); + final Messenger mMessenger = new Messenger(mMsgHandler); + @@ -74,7 +74,7 @@ index ad6ea0de6..452c7d148 100644 + break; + } + } -+ // -- GODOT end -- ++ // -- Blazium end -- public Stub(IDownloaderClient itf, Class downloaderService) { mItf = itf; @@ -86,9 +86,9 @@ index 979352299..3771d19c9 100644 import android.os.Messenger; import android.os.RemoteException; -+// -- GODOT start -- ++// -- BLAZIUM start -- +import java.lang.ref.WeakReference; -+// -- GODOT end -- ++// -- BLAZIUM end -- /** @@ -97,7 +97,7 @@ index 979352299..3771d19c9 100644 private static class Stub implements IStub { private IDownloaderService mItf = null; - final Messenger mMessenger = new Messenger(new Handler() { -+ // -- GODOT start -- ++ // -- BLAZIUM start -- + private final MessengerHandlerServer mMsgHandler = new MessengerHandlerServer(this); + final Messenger mMessenger = new Messenger(mMsgHandler); + @@ -160,7 +160,7 @@ index 979352299..3771d19c9 100644 + break; + } + } -+ // -- GODOT end -- ++ // -- BLAZIUM end -- public Stub(IDownloaderService itf) { mItf = itf; @@ -173,10 +173,10 @@ index e4b1b0f1c..36cd6aacf 100644 import android.util.Log; -import com.android.vending.expansion.downloader.R; -+// -- GODOT start -- ++// -- BLAZIUM start -- +//import com.android.vending.expansion.downloader.R; +import org.godotengine.godot.R; -+// -- GODOT end -- ++// -- BLAZIUM end -- import java.io.File; import java.text.SimpleDateFormat; @@ -185,7 +185,7 @@ index e4b1b0f1c..36cd6aacf 100644 return ""; } - return String.format("%.2f", -+ // -- GODOT start -- ++ // -- BLAZIUM start -- + return String.format(Locale.ENGLISH, "%.2f", (float) overallProgress / (1024.0f * 1024.0f)) + "MB /" + @@ -193,7 +193,7 @@ index e4b1b0f1c..36cd6aacf 100644 + String.format(Locale.ENGLISH, "%.2f", (float) overallTotal / (1024.0f * 1024.0f)) + "MB"; -+ // -- GODOT end -- ++ // -- BLAZIUM end -- } /** @@ -202,9 +202,9 @@ index e4b1b0f1c..36cd6aacf 100644 public static String getSpeedString(float bytesPerMillisecond) { - return String.format("%.2f", bytesPerMillisecond * 1000 / 1024); -+ // -- GODOT start -- ++ // -- BLAZIUM start -- + return String.format(Locale.ENGLISH, "%.2f", bytesPerMillisecond * 1000 / 1024); -+ // -- GODOT end -- ++ // -- BLAZIUM end -- } public static String getTimeRemaining(long durationInMilliseconds) { @@ -216,9 +216,9 @@ index 12edd97ab..a0e1165cc 100644 import android.telephony.TelephonyManager; import android.util.Log; -+// -- GODOT start -- ++// -- BLAZIUM start -- +import android.annotation.SuppressLint; -+// -- GODOT end -- ++// -- BLAZIUM end -- + /** * Contains useful helper functions, typically tied to the application context. @@ -248,10 +248,10 @@ index f1536e80e..4b214b22d 100644 package com.google.android.vending.expansion.downloader.impl; -import com.android.vending.expansion.downloader.R; -+// -- GODOT start -- ++// -- BLAZIUM start -- +//import com.android.vending.expansion.downloader.R; +import org.godotengine.godot.R; -+// -- GODOT end -- ++// -- BLAZIUM end -- + import com.google.android.vending.expansion.downloader.DownloadProgressInfo; import com.google.android.vending.expansion.downloader.DownloaderClientMarshaller; @@ -266,12 +266,12 @@ index b2e0e7af0..c114b8a64 100644 PowerManager pm = (PowerManager) mContext.getSystemService(Context.POWER_SERVICE); - wakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, Constants.TAG); - wakeLock.acquire(); -+ // -- GODOT start -- ++ // -- BLAZIUM start -- + //wakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, Constants.TAG); + //wakeLock.acquire(); + wakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "org.godot.game:wakelock"); + wakeLock.acquire(20 * 60 * 1000L /*20 minutes*/); -+ // -- GODOT end -- ++ // -- BLAZIUM end -- if (Constants.LOGV) { Log.v(Constants.TAG, "initiating download for " + mInfo.mFileName); @@ -283,9 +283,9 @@ index 4babe476f..8d41a7690 100644 import android.telephony.TelephonyManager; import android.util.Log; -+// -- GODOT start -- ++// -- BLAZIUM start -- +import android.annotation.SuppressLint; -+// -- GODOT end -- ++// -- BLAZIUM end -- + import java.io.File; diff --git a/platform/android/java/lib/patches/com.google.android.vending.licensing.patch b/platform/android/java/lib/patches/com.google.android.vending.licensing.patch index 4adb81d95199..f79c66448f80 100644 --- a/platform/android/java/lib/patches/com.google.android.vending.licensing.patch +++ b/platform/android/java/lib/patches/com.google.android.vending.licensing.patch @@ -6,9 +6,9 @@ index 7c42bfc28..feb579af0 100644 public void putString(String key, String value) { if (mEditor == null) { mEditor = mPreferences.edit(); -+ // -- GODOT start -- ++ // -- BLAZIUM start -- + mEditor.apply(); -+ // -- GODOT end -- ++ // -- BLAZIUM end -- } String obfuscatedValue = mObfuscator.obfuscate(value, key); mEditor.putString(key, obfuscatedValue); @@ -20,9 +20,9 @@ index a0d2779af..a8bf65f9c 100644 * @version 1.3 */ -+// -- GODOT start -- ++// -- BLAZIUM start -- import org.godotengine.godot.BuildConfig; -+// -- GODOT end -- ++// -- BLAZIUM end -- + /** * Base64 converter class. This code is not a full-blown MIME encoder; @@ -32,11 +32,11 @@ import org.godotengine.godot.BuildConfig; } - assert (e == outBuff.length); -+ // -- GODOT start -- ++ // -- BLAZIUM start -- + //assert (e == outBuff.length); + if (BuildConfig.DEBUG && e != outBuff.length) + throw new RuntimeException(); -+ // -- GODOT end -- ++ // -- BLAZIUM end -- return outBuff; } diff --git a/platform/android/java/lib/res/values/strings.xml b/platform/android/java/lib/res/values/strings.xml index 03752e092ecd..4be9518b2acb 100644 --- a/platform/android/java/lib/res/values/strings.xml +++ b/platform/android/java/lib/res/values/strings.xml @@ -13,7 +13,7 @@ Cancel Cancel Verification Error! - Unable to setup the Godot Engine! Aborting… + Unable to setup the Blazium Engine! Aborting… Warning - this device does not meet the requirements for Vulkan support diff --git a/platform/android/java/lib/src/com/google/android/vending/expansion/downloader/DownloaderClientMarshaller.java b/platform/android/java/lib/src/com/google/android/vending/expansion/downloader/DownloaderClientMarshaller.java index 452c7d148392..8fa89d3056bc 100644 --- a/platform/android/java/lib/src/com/google/android/vending/expansion/downloader/DownloaderClientMarshaller.java +++ b/platform/android/java/lib/src/com/google/android/vending/expansion/downloader/DownloaderClientMarshaller.java @@ -32,9 +32,9 @@ import android.os.RemoteException; import android.util.Log; -// -- GODOT start -- +// -- BLAZIUM start -- import java.lang.ref.WeakReference; -// -- GODOT end -- +// -- BLAZIUM end -- /** @@ -121,7 +121,7 @@ private static class Stub implements IStub { /** * Target we publish for clients to send messages to IncomingHandler. */ - // -- GODOT start -- + // -- BLAZIUM start -- private final MessengerHandlerClient mMsgHandler = new MessengerHandlerClient(this); final Messenger mMessenger = new Messenger(mMsgHandler); @@ -160,7 +160,7 @@ private void handleMessage(Message msg) { break; } } - // -- GODOT end -- + // -- BLAZIUM end -- public Stub(IDownloaderClient itf, Class downloaderService) { mItf = itf; diff --git a/platform/android/java/lib/src/com/google/android/vending/expansion/downloader/DownloaderServiceMarshaller.java b/platform/android/java/lib/src/com/google/android/vending/expansion/downloader/DownloaderServiceMarshaller.java index 3771d19c9b53..91dae60a5e1f 100644 --- a/platform/android/java/lib/src/com/google/android/vending/expansion/downloader/DownloaderServiceMarshaller.java +++ b/platform/android/java/lib/src/com/google/android/vending/expansion/downloader/DownloaderServiceMarshaller.java @@ -25,9 +25,9 @@ import android.os.Messenger; import android.os.RemoteException; -// -- GODOT start -- +// -- BLAZIUM start -- import java.lang.ref.WeakReference; -// -- GODOT end -- +// -- BLAZIUM end -- /** @@ -111,7 +111,7 @@ public void onClientUpdated(Messenger clientMessenger) { private static class Stub implements IStub { private IDownloaderService mItf = null; - // -- GODOT start -- + // -- BLAZIUM start -- private final MessengerHandlerServer mMsgHandler = new MessengerHandlerServer(this); final Messenger mMessenger = new Messenger(mMsgHandler); @@ -153,7 +153,7 @@ private void handleMessage(Message msg) { break; } } - // -- GODOT end -- + // -- BLAZIUM end -- public Stub(IDownloaderService itf) { mItf = itf; diff --git a/platform/android/java/lib/src/com/google/android/vending/expansion/downloader/Helpers.java b/platform/android/java/lib/src/com/google/android/vending/expansion/downloader/Helpers.java index 9aa65fd78612..7a3540b4c4dc 100644 --- a/platform/android/java/lib/src/com/google/android/vending/expansion/downloader/Helpers.java +++ b/platform/android/java/lib/src/com/google/android/vending/expansion/downloader/Helpers.java @@ -24,10 +24,10 @@ import android.os.SystemClock; import android.util.Log; -// -- GODOT start -- +// -- BLAZIUM start -- //import com.android.vending.expansion.downloader.R; import org.godotengine.godot.R; -// -- GODOT end -- +// -- BLAZIUM end -- import java.io.File; import java.text.SimpleDateFormat; @@ -149,14 +149,14 @@ static public String getDownloadProgressString(long overallProgress, long overal } return ""; } - // -- GODOT start -- + // -- BLAZIUM start -- return String.format(Locale.ENGLISH, "%.2f", (float) overallProgress / (1024.0f * 1024.0f)) + "MB /" + String.format(Locale.ENGLISH, "%.2f", (float) overallTotal / (1024.0f * 1024.0f)) + "MB"; - // -- GODOT end -- + // -- BLAZIUM end -- } /** @@ -189,9 +189,9 @@ public static String getDownloadProgressPercent(long overallProgress, long overa } public static String getSpeedString(float bytesPerMillisecond) { - // -- GODOT start -- + // -- BLAZIUM start -- return String.format(Locale.ENGLISH, "%.2f", bytesPerMillisecond * 1000 / 1024); - // -- GODOT end -- + // -- BLAZIUM end -- } public static String getTimeRemaining(long durationInMilliseconds) { diff --git a/platform/android/java/lib/src/com/google/android/vending/expansion/downloader/SystemFacade.java b/platform/android/java/lib/src/com/google/android/vending/expansion/downloader/SystemFacade.java index a0e1165cc40d..bee3b439ca3a 100644 --- a/platform/android/java/lib/src/com/google/android/vending/expansion/downloader/SystemFacade.java +++ b/platform/android/java/lib/src/com/google/android/vending/expansion/downloader/SystemFacade.java @@ -26,9 +26,9 @@ import android.telephony.TelephonyManager; import android.util.Log; -// -- GODOT start -- +// -- BLAZIUM start -- import android.annotation.SuppressLint; -// -- GODOT end -- +// -- BLAZIUM end -- /** * Contains useful helper functions, typically tied to the application context. diff --git a/platform/android/java/lib/src/com/google/android/vending/expansion/downloader/impl/DownloadNotification.java b/platform/android/java/lib/src/com/google/android/vending/expansion/downloader/impl/DownloadNotification.java index d481c222042a..eef06445922c 100644 --- a/platform/android/java/lib/src/com/google/android/vending/expansion/downloader/impl/DownloadNotification.java +++ b/platform/android/java/lib/src/com/google/android/vending/expansion/downloader/impl/DownloadNotification.java @@ -16,10 +16,10 @@ package com.google.android.vending.expansion.downloader.impl; -// -- GODOT start -- +// -- BLAZIUM start -- //import com.android.vending.expansion.downloader.R; import org.godotengine.godot.R; -// -- GODOT end -- +// -- BLAZIUM end -- import com.google.android.vending.expansion.downloader.DownloadProgressInfo; import com.google.android.vending.expansion.downloader.DownloaderClientMarshaller; diff --git a/platform/android/java/lib/src/com/google/android/vending/expansion/downloader/impl/DownloadThread.java b/platform/android/java/lib/src/com/google/android/vending/expansion/downloader/impl/DownloadThread.java index c114b8a64a5b..228d88eee290 100644 --- a/platform/android/java/lib/src/com/google/android/vending/expansion/downloader/impl/DownloadThread.java +++ b/platform/android/java/lib/src/com/google/android/vending/expansion/downloader/impl/DownloadThread.java @@ -146,12 +146,12 @@ public void run() { try { PowerManager pm = (PowerManager) mContext.getSystemService(Context.POWER_SERVICE); - // -- GODOT start -- + // -- BLAZIUM start -- //wakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, Constants.TAG); //wakeLock.acquire(); wakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "org.godot.game:wakelock"); wakeLock.acquire(20 * 60 * 1000L /*20 minutes*/); - // -- GODOT end -- + // -- BLAZIUM end -- if (Constants.LOGV) { Log.v(Constants.TAG, "initiating download for " + mInfo.mFileName); diff --git a/platform/android/java/lib/src/com/google/android/vending/expansion/downloader/impl/DownloaderService.java b/platform/android/java/lib/src/com/google/android/vending/expansion/downloader/impl/DownloaderService.java index 8d41a769005a..1427480a7341 100644 --- a/platform/android/java/lib/src/com/google/android/vending/expansion/downloader/impl/DownloaderService.java +++ b/platform/android/java/lib/src/com/google/android/vending/expansion/downloader/impl/DownloaderService.java @@ -50,9 +50,9 @@ import android.telephony.TelephonyManager; import android.util.Log; -// -- GODOT start -- +// -- BLAZIUM start -- import android.annotation.SuppressLint; -// -- GODOT end -- +// -- BLAZIUM end -- import java.io.File; diff --git a/platform/android/java/lib/src/com/google/android/vending/licensing/PreferenceObfuscator.java b/platform/android/java/lib/src/com/google/android/vending/licensing/PreferenceObfuscator.java index feb579af049b..812400fccde6 100644 --- a/platform/android/java/lib/src/com/google/android/vending/licensing/PreferenceObfuscator.java +++ b/platform/android/java/lib/src/com/google/android/vending/licensing/PreferenceObfuscator.java @@ -45,9 +45,9 @@ public PreferenceObfuscator(SharedPreferences sp, Obfuscator o) { public void putString(String key, String value) { if (mEditor == null) { mEditor = mPreferences.edit(); - // -- GODOT start -- + // -- BLAZIUM start -- mEditor.apply(); - // -- GODOT end -- + // -- BLAZIUM end -- } String obfuscatedValue = mObfuscator.obfuscate(value, key); mEditor.putString(key, obfuscatedValue); diff --git a/platform/android/java/lib/src/com/google/android/vending/licensing/util/Base64.java b/platform/android/java/lib/src/com/google/android/vending/licensing/util/Base64.java index 79efca9621d4..3b6a93850a4f 100644 --- a/platform/android/java/lib/src/com/google/android/vending/licensing/util/Base64.java +++ b/platform/android/java/lib/src/com/google/android/vending/licensing/util/Base64.java @@ -31,9 +31,9 @@ * @version 1.3 */ -// -- GODOT start -- +// -- BLAZIUM start -- import org.godotengine.godot.BuildConfig; -// -- GODOT end -- +// -- BLAZIUM end -- /** * Base64 converter class. This code is not a full-blown MIME encoder; @@ -345,11 +345,11 @@ public static byte[] encode(byte[] source, int off, int len, byte[] alphabet, e += 4; } - // -- GODOT start -- + // -- BLAZIUM start -- //assert (e == outBuff.length); if (BuildConfig.DEBUG && e != outBuff.length) throw new RuntimeException(); - // -- GODOT end -- + // -- BLAZIUM end -- return outBuff; } diff --git a/platform/android/java/lib/src/org/godotengine/godot/FullScreenGodotApp.java b/platform/android/java/lib/src/org/godotengine/godot/FullScreenGodotApp.java index 91d272735e77..5e182cacca95 100644 --- a/platform/android/java/lib/src/org/godotengine/godot/FullScreenGodotApp.java +++ b/platform/android/java/lib/src/org/godotengine/godot/FullScreenGodotApp.java @@ -31,7 +31,7 @@ package org.godotengine.godot; /** - * Base abstract activity for Android apps intending to use Godot as the primary screen. + * Base abstract activity for Android apps intending to use Blazium as the primary screen. * * @deprecated Use {@link GodotActivity} */ diff --git a/platform/android/java/lib/src/org/godotengine/godot/Godot.kt b/platform/android/java/lib/src/org/godotengine/godot/Godot.kt index fa39ccb546f0..6271b2ad599c 100644 --- a/platform/android/java/lib/src/org/godotengine/godot/Godot.kt +++ b/platform/android/java/lib/src/org/godotengine/godot/Godot.kt @@ -184,7 +184,7 @@ class Godot(private val context: Context) : SensorEventListener { private fun requireActivity() = getActivity() ?: throw IllegalStateException("Host activity must be non-null") /** - * Start initialization of the Godot engine. + * Start initialization of the Blazium engine. * * This must be followed by [onInitNativeLayer] and [onInitRenderView] in that order to complete * initialization of the engine. @@ -209,8 +209,15 @@ class Godot(private val context: Context) : SensorEventListener { val window = activity.window window.addFlags(WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON) +<<<<<<< HEAD Log.v(TAG, "Initializing Godot plugin registry") GodotPluginRegistry.initializePluginRegistry(this, primaryHost.getHostPlugins(this)) +======= + Log.v(TAG, "Initializing Blazium plugin registry") + val runtimePlugins = mutableSetOf(AndroidRuntimePlugin(this)) + runtimePlugins.addAll(primaryHost.getHostPlugins(this)) + GodotPluginRegistry.initializePluginRegistry(this, runtimePlugins) +>>>>>>> a534a98048 (Alot of rebranding, check for errors please) if (io == null) { io = GodotIO(activity) } @@ -311,7 +318,59 @@ class Godot(private val context: Context) : SensorEventListener { } /** +<<<<<<< HEAD * Initializes the native layer of the Godot engine. +======= + * Toggle immersive mode. + * Must be called from the UI thread. + */ + private fun enableImmersiveMode(enabled: Boolean, override: Boolean = false) { + val activity = getActivity() ?: return + val window = activity.window ?: return + + if (!useImmersive.compareAndSet(!enabled, enabled) && !override) { + return + } + + WindowCompat.setDecorFitsSystemWindows(window, !enabled) + val controller = WindowInsetsControllerCompat(window, window.decorView) + if (enabled) { + controller.hide(WindowInsetsCompat.Type.systemBars()) + controller.systemBarsBehavior = WindowInsetsControllerCompat.BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE + } else { + val fullScreenThemeValue = TypedValue() + val hasStatusBar = if (activity.theme.resolveAttribute(android.R.attr.windowFullscreen, fullScreenThemeValue, true) && fullScreenThemeValue.type == TypedValue.TYPE_INT_BOOLEAN) { + fullScreenThemeValue.data == 0 + } else { + // Fallback to checking the editor build + !isEditorBuild() + } + + val types = if (hasStatusBar) { + WindowInsetsCompat.Type.navigationBars() or WindowInsetsCompat.Type.statusBars() + } else { + WindowInsetsCompat.Type.navigationBars() + } + controller.show(types) + } + } + + /** + * Invoked from the render thread to toggle the immersive mode. + */ + @Keep + private fun nativeEnableImmersiveMode(enabled: Boolean) { + runOnUiThread { + enableImmersiveMode(enabled) + } + } + + @Keep + fun isInImmersiveMode() = useImmersive.get() + + /** + * Initializes the native layer of the Blazium engine. +>>>>>>> a534a98048 (Alot of rebranding, check for errors please) * * This must be preceded by [onCreate] and followed by [onInitRenderView] to complete * initialization of the engine. @@ -353,15 +412,15 @@ class Godot(private val context: Context) : SensorEventListener { fileAccessHandler, useApkExpansion, ) - Log.v(TAG, "Godot native layer initialization completed: $nativeLayerInitializeCompleted") + Log.v(TAG, "Blazium native layer initialization completed: $nativeLayerInitializeCompleted") } if (nativeLayerInitializeCompleted && !nativeLayerSetupCompleted) { nativeLayerSetupCompleted = GodotLib.setup(commandLine.toTypedArray(), tts) if (!nativeLayerSetupCompleted) { - throw IllegalStateException("Unable to setup the Godot engine! Aborting...") + throw IllegalStateException("Unable to setup the Blazium engine! Aborting...") } else { - Log.v(TAG, "Godot native layer setup completed") + Log.v(TAG, "Blazium native layer setup completed") } } } finally { @@ -377,9 +436,9 @@ class Godot(private val context: Context) : SensorEventListener { * initialize the engine. * * @param host The [GodotHost] that's initializing the render views - * @param providedContainerLayout Optional argument; if provided, this is reused to host the Godot's render views + * @param providedContainerLayout Optional argument; if provided, this is reused to host the Blazium's render views * - * @return A [FrameLayout] instance containing Godot's render views if initialization is successful, null otherwise. + * @return A [FrameLayout] instance containing Blazium's render views if initialization is successful, null otherwise. * * @throws IllegalStateException if [onInitNativeLayer] has not been called */ @@ -485,7 +544,7 @@ class Godot(private val context: Context) : SensorEventListener { setKeepScreenOn(java.lang.Boolean.parseBoolean(GodotLib.getGlobal("display/window/energy_saving/keep_screen_on"))) } - // Include the returned non-null views in the Godot view hierarchy. + // Include the returned non-null views in the Blazium view hierarchy. for (plugin in pluginRegistry.allPlugins) { val pluginView = plugin.onMainCreate(activity) if (pluginView != null) { @@ -626,12 +685,12 @@ class Godot(private val context: Context) : SensorEventListener { } /** - * Invoked on the render thread when the Godot setup is complete. + * Invoked on the render thread when the Blazium setup is complete. */ private fun onGodotSetupCompleted() { Log.v(TAG, "OnGodotSetupCompleted") - // These properties are defined after Godot setup completion, so we retrieve them here. + // These properties are defined after Blazium setup completion, so we retrieve them here. val longPressEnabled = java.lang.Boolean.parseBoolean(GodotLib.getGlobal("input_devices/pointing/android/enable_long_press_as_right_click")) val panScaleEnabled = java.lang.Boolean.parseBoolean(GodotLib.getGlobal("input_devices/pointing/android/enable_pan_and_scale_gestures")) val rotaryInputAxisValue = GodotLib.getGlobal("input_devices/pointing/android/rotary_input_scroll_axis") @@ -655,7 +714,7 @@ class Godot(private val context: Context) : SensorEventListener { } /** - * Invoked on the render thread when the Godot main loop has started. + * Invoked on the render thread when the Blazium main loop has started. */ private fun onGodotMainLoopStarted() { Log.v(TAG, "OnGodotMainLoopStarted") @@ -811,7 +870,7 @@ class Godot(private val context: Context) : SensorEventListener { } /** - * Destroys the Godot Engine and kill the process it's running in. + * Destroys the Blazium Engine and kill the process it's running in. */ @JvmOverloads fun destroyAndKillProcess(destroyRunnable: Runnable? = null) { diff --git a/platform/android/java/lib/src/org/godotengine/godot/GodotActivity.kt b/platform/android/java/lib/src/org/godotengine/godot/GodotActivity.kt index 913e3d04c5dc..8f41b1b35b4b 100644 --- a/platform/android/java/lib/src/org/godotengine/godot/GodotActivity.kt +++ b/platform/android/java/lib/src/org/godotengine/godot/GodotActivity.kt @@ -42,7 +42,7 @@ import org.godotengine.godot.utils.PermissionsUtil import org.godotengine.godot.utils.ProcessPhoenix /** - * Base abstract activity for Android apps intending to use Godot as the primary screen. + * Base abstract activity for Android apps intending to use Blazium as the primary screen. * * Also a reference implementation for how to setup and use the [GodotFragment] fragment * within an Android app. @@ -59,7 +59,7 @@ abstract class GodotActivity : FragmentActivity(), GodotHost { } /** - * Interaction with the [Godot] object is delegated to the [GodotFragment] class. + * Interaction with the [Blazium] object is delegated to the [GodotFragment] class. */ protected var godotFragment: GodotFragment? = null private set @@ -72,10 +72,10 @@ abstract class GodotActivity : FragmentActivity(), GodotHost { val currentFragment = supportFragmentManager.findFragmentById(R.id.godot_fragment_container) if (currentFragment is GodotFragment) { - Log.v(TAG, "Reusing existing Godot fragment instance.") + Log.v(TAG, "Reusing existing Blazium fragment instance.") godotFragment = currentFragment } else { - Log.v(TAG, "Creating new Godot fragment instance.") + Log.v(TAG, "Creating new Blazium fragment instance.") godotFragment = initGodotInstance() supportFragmentManager.beginTransaction().replace(R.id.godot_fragment_container, godotFragment!!).setPrimaryNavigationFragment(godotFragment).commitNowAllowingStateLoss() } @@ -96,7 +96,7 @@ abstract class GodotActivity : FragmentActivity(), GodotHost { private fun terminateGodotInstance(instance: Godot) { godotFragment?.let { if (instance === it.godot) { - Log.v(TAG, "Force quitting Godot instance") + Log.v(TAG, "Force quitting Blazium instance") ProcessPhoenix.forceQuit(this) } } @@ -106,12 +106,12 @@ abstract class GodotActivity : FragmentActivity(), GodotHost { runOnUiThread { godotFragment?.let { if (instance === it.godot) { - // It's very hard to properly de-initialize Godot on Android to restart the game + // It's very hard to properly de-initialize Blazium on Android to restart the game // from scratch. Therefore, we need to kill the whole app process and relaunch it. // // Restarting only the activity, wouldn't be enough unless it did proper cleanup (including // releasing and reloading native libs or resetting their state somehow and clearing static data). - Log.v(TAG, "Restarting Godot instance...") + Log.v(TAG, "Restarting Blazium instance...") ProcessPhoenix.triggerRebirth(this) } } @@ -179,7 +179,7 @@ abstract class GodotActivity : FragmentActivity(), GodotHost { } /** - * Used to initialize the Godot fragment instance in [onCreate]. + * Used to initialize the Blazium fragment instance in [onCreate]. */ protected open fun initGodotInstance(): GodotFragment { return GodotFragment() diff --git a/platform/android/java/lib/src/org/godotengine/godot/GodotDownloaderAlarmReceiver.java b/platform/android/java/lib/src/org/godotengine/godot/GodotDownloaderAlarmReceiver.java index d447e449e1dd..5b9ef50ac0db 100644 --- a/platform/android/java/lib/src/org/godotengine/godot/GodotDownloaderAlarmReceiver.java +++ b/platform/android/java/lib/src/org/godotengine/godot/GodotDownloaderAlarmReceiver.java @@ -48,12 +48,12 @@ public class GodotDownloaderAlarmReceiver extends BroadcastReceiver { @Override public void onReceive(Context context, Intent intent) { - Log.d("GODOT", "Alarma recivida"); + Log.d("BLAZIUM", "Alarma recivida"); try { DownloaderClientMarshaller.startDownloadServiceIfRequired(context, intent, GodotDownloaderService.class); } catch (NameNotFoundException e) { e.printStackTrace(); - Log.d("GODOT", "Exception: " + e.getClass().getName() + ":" + e.getMessage()); + Log.d("BLAZIUM", "Exception: " + e.getClass().getName() + ":" + e.getMessage()); } } } diff --git a/platform/android/java/lib/src/org/godotengine/godot/GodotDownloaderService.java b/platform/android/java/lib/src/org/godotengine/godot/GodotDownloaderService.java index 8e3fb85cdefe..dfac93ceb8a7 100644 --- a/platform/android/java/lib/src/org/godotengine/godot/GodotDownloaderService.java +++ b/platform/android/java/lib/src/org/godotengine/godot/GodotDownloaderService.java @@ -56,7 +56,7 @@ public class GodotDownloaderService extends DownloaderService { @Override public String getPublicKey() { SharedPreferences prefs = getApplicationContext().getSharedPreferences("app_data_keys", Context.MODE_PRIVATE); - Log.d("GODOT", "getting public key:" + prefs.getString("store_public_key", null)); + Log.d("BLAZIUM", "getting public key:" + prefs.getString("store_public_key", null)); return prefs.getString("store_public_key", null); //return BASE64_PUBLIC_KEY; @@ -79,7 +79,7 @@ public byte[] getSALT() { */ @Override public String getAlarmReceiverClassName() { - Log.d("GODOT", "getAlarmReceiverClassName()"); + Log.d("BLAZIUM", "getAlarmReceiverClassName()"); return GodotDownloaderAlarmReceiver.class.getName(); } } diff --git a/platform/android/java/lib/src/org/godotengine/godot/GodotFragment.java b/platform/android/java/lib/src/org/godotengine/godot/GodotFragment.java index fdda76659472..9881d642c8b3 100644 --- a/platform/android/java/lib/src/org/godotengine/godot/GodotFragment.java +++ b/platform/android/java/lib/src/org/godotengine/godot/GodotFragment.java @@ -71,7 +71,7 @@ import java.util.Set; /** - * Base fragment for Android apps intending to use Godot for part of the app's UI. + * Base fragment for Android apps intending to use Blazium for part of the app's UI. */ public class GodotFragment extends Fragment implements IDownloaderClient, GodotHost { private static final String TAG = GodotFragment.class.getSimpleName(); diff --git a/platform/android/java/lib/src/org/godotengine/godot/GodotHost.java b/platform/android/java/lib/src/org/godotengine/godot/GodotHost.java index 1862b9fa9be7..10cd48badcb2 100644 --- a/platform/android/java/lib/src/org/godotengine/godot/GodotHost.java +++ b/platform/android/java/lib/src/org/godotengine/godot/GodotHost.java @@ -39,34 +39,34 @@ import java.util.Set; /** - * Denotate a component (e.g: Activity, Fragment) that hosts the {@link Godot} engine. + * Denotate a component (e.g: Activity, Fragment) that hosts the {@link Blazium} engine. */ public interface GodotHost { /** - * Provides a set of command line parameters to setup the {@link Godot} engine. + * Provides a set of command line parameters to setup the {@link Blazium} engine. */ default List getCommandLine() { return Collections.emptyList(); } /** - * Invoked on the render thread when setup of the {@link Godot} engine is complete. + * Invoked on the render thread when setup of the {@link Blazium} engine is complete. */ default void onGodotSetupCompleted() {} /** - * Invoked on the render thread when the {@link Godot} engine main loop has started. + * Invoked on the render thread when the {@link Blazium} engine main loop has started. */ default void onGodotMainLoopStarted() {} /** - * Invoked on the render thread to terminate the given {@link Godot} engine instance. + * Invoked on the render thread to terminate the given {@link Blazium} engine instance. */ default void onGodotForceQuit(Godot instance) {} /** - * Invoked on the render thread to terminate the {@link Godot} engine instance with the given id. - * @param godotInstanceId id of the Godot instance to terminate. See {@code onNewGodotInstanceRequested} + * Invoked on the render thread to terminate the {@link Blazium} engine instance with the given id. + * @param godotInstanceId id of the Blazium instance to terminate. See {@code onNewGodotInstanceRequested} * * @return true if successful, false otherwise. */ @@ -75,13 +75,13 @@ default boolean onGodotForceQuit(int godotInstanceId) { } /** - * Invoked on the render thread when the Godot instance wants to be restarted. It's up to the host + * Invoked on the render thread when the Blazium instance wants to be restarted. It's up to the host * to perform the appropriate action(s). */ default void onGodotRestartRequested(Godot instance) {} /** - * Invoked on the render thread when a new Godot instance is requested. It's up to the host to + * Invoked on the render thread when a new Blazium instance is requested. It's up to the host to * perform the appropriate action(s). * * @param args Arguments used to initialize the new instance. @@ -93,17 +93,17 @@ default int onNewGodotInstanceRequested(String[] args) { } /** - * Provide access to the Activity hosting the {@link Godot} engine. + * Provide access to the Activity hosting the {@link Blazium} engine. */ Activity getActivity(); /** - * Provide access to the hosted {@link Godot} engine. + * Provide access to the hosted {@link Blazium} engine. */ Godot getGodot(); /** - * Returns a set of {@link GodotPlugin} to be registered with the hosted {@link Godot} engine. + * Returns a set of {@link GodotPlugin} to be registered with the hosted {@link Blazium} engine. */ default Set getHostPlugins(Godot engine) { return Collections.emptySet(); diff --git a/platform/android/java/lib/src/org/godotengine/godot/GodotLib.java b/platform/android/java/lib/src/org/godotengine/godot/GodotLib.java index 909daf05c978..6e33ea5b48e8 100644 --- a/platform/android/java/lib/src/org/godotengine/godot/GodotLib.java +++ b/platform/android/java/lib/src/org/godotengine/godot/GodotLib.java @@ -52,7 +52,7 @@ public class GodotLib { } /** - * Invoked on the main thread to initialize Godot native layer. + * Invoked on the main thread to initialize Blazium native layer. */ public static native boolean initialize(Activity activity, Godot p_instance, @@ -64,14 +64,14 @@ public static native boolean initialize(Activity activity, boolean use_apk_expansion); /** - * Invoked on the main thread to clean up Godot native layer. + * Invoked on the main thread to clean up Blazium native layer. * @see androidx.fragment.app.Fragment#onDestroy() */ public static native void ondestroy(); /** - * Invoked on the GL thread to complete setup for the Godot native layer logic. - * @param p_cmdline Command line arguments used to configure Godot native layer components. + * Invoked on the GL thread to complete setup for the Blazium native layer logic. + * @param p_cmdline Command line arguments used to configure Blazium native layer components. */ public static native boolean setup(String[] p_cmdline, GodotTTS tts); @@ -182,30 +182,30 @@ public static native boolean initialize(Activity activity, public static native void focusout(); /** - * Used to access Godot global properties. + * Used to access Blazium global properties. * @param p_key Property key * @return String value of the property */ public static native String getGlobal(String p_key); /** - * Used to access Godot's editor settings. + * Used to access Blazium's editor settings. * @param settingKey Setting key * @return String value of the setting */ public static native String getEditorSetting(String settingKey); /** - * Invoke method |p_method| on the Godot object specified by |p_id| - * @param p_id Id of the Godot object to invoke + * Invoke method |p_method| on the Blazium object specified by |p_id| + * @param p_id Id of the Blazium object to invoke * @param p_method Name of the method to invoke * @param p_params Parameters to use for method invocation */ public static native void callobject(long p_id, String p_method, Object[] p_params); /** - * Invoke method |p_method| on the Godot object specified by |p_id| during idle time. - * @param p_id Id of the Godot object to invoke + * Invoke method |p_method| on the Blazium object specified by |p_id| during idle time. + * @param p_id Id of the Blazium object to invoke * @param p_method Name of the method to invoke * @param p_params Parameters to use for method invocation */ diff --git a/platform/android/java/lib/src/org/godotengine/godot/GodotRenderView.java b/platform/android/java/lib/src/org/godotengine/godot/GodotRenderView.java index 19ec0fd1a4ae..addf37454e4a 100644 --- a/platform/android/java/lib/src/org/godotengine/godot/GodotRenderView.java +++ b/platform/android/java/lib/src/org/godotengine/godot/GodotRenderView.java @@ -40,7 +40,7 @@ public interface GodotRenderView { void initInputDevices(); /** - * Starts the thread that will drive Godot's rendering. + * Starts the thread that will drive Blazium's rendering. */ void startRenderer(); diff --git a/platform/android/java/lib/src/org/godotengine/godot/GodotService.kt b/platform/android/java/lib/src/org/godotengine/godot/GodotService.kt index 795dc921c7fa..cf65943e9910 100644 --- a/platform/android/java/lib/src/org/godotengine/godot/GodotService.kt +++ b/platform/android/java/lib/src/org/godotengine/godot/GodotService.kt @@ -7,7 +7,7 @@ import android.os.IBinder import android.util.Log /** - * Godot service responsible for hosting the Godot engine instance. + * Blazium service responsible for hosting the Blazium engine instance. * * Note: Still in development, so it's made private and inaccessible until completed. */ diff --git a/platform/android/java/lib/src/org/godotengine/godot/error/Error.kt b/platform/android/java/lib/src/org/godotengine/godot/error/Error.kt new file mode 100644 index 000000000000..1dccd9be6574 --- /dev/null +++ b/platform/android/java/lib/src/org/godotengine/godot/error/Error.kt @@ -0,0 +1,100 @@ +/**************************************************************************/ +/* Error.kt */ +/**************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* https://godotengine.org */ +/**************************************************************************/ +/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */ +/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* */ +/* Permission is hereby granted, free of charge, to any person obtaining */ +/* a copy of this software and associated documentation files (the */ +/* "Software"), to deal in the Software without restriction, including */ +/* without limitation the rights to use, copy, modify, merge, publish, */ +/* distribute, sublicense, and/or sell copies of the Software, and to */ +/* permit persons to whom the Software is furnished to do so, subject to */ +/* the following conditions: */ +/* */ +/* The above copyright notice and this permission notice shall be */ +/* included in all copies or substantial portions of the Software. */ +/* */ +/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ +/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ +/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */ +/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ +/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ +/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ +/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +/**************************************************************************/ + +package org.godotengine.godot.error + +/** + * Blazium error list. + * + * This enum MUST match its native counterpart in 'core/error/error_list.h' + */ +enum class Error(private val description: String) { + OK("OK"), // (0) + FAILED("Failed"), ///< Generic fail error + ERR_UNAVAILABLE("Unavailable"), ///< What is requested is unsupported/unavailable + ERR_UNCONFIGURED("Unconfigured"), ///< The object being used hasn't been properly set up yet + ERR_UNAUTHORIZED("Unauthorized"), ///< Missing credentials for requested resource + ERR_PARAMETER_RANGE_ERROR("Parameter out of range"), ///< Parameter given out of range (5) + ERR_OUT_OF_MEMORY("Out of memory"), ///< Out of memory + ERR_FILE_NOT_FOUND("File not found"), + ERR_FILE_BAD_DRIVE("File: Bad drive"), + ERR_FILE_BAD_PATH("File: Bad path"), + ERR_FILE_NO_PERMISSION("File: Permission denied"), // (10) + ERR_FILE_ALREADY_IN_USE("File already in use"), + ERR_FILE_CANT_OPEN("Can't open file"), + ERR_FILE_CANT_WRITE("Can't write file"), + ERR_FILE_CANT_READ("Can't read file"), + ERR_FILE_UNRECOGNIZED("File unrecognized"), // (15) + ERR_FILE_CORRUPT("File corrupt"), + ERR_FILE_MISSING_DEPENDENCIES("Missing dependencies for file"), + ERR_FILE_EOF("End of file"), + ERR_CANT_OPEN("Can't open"), ///< Can't open a resource/socket/file + ERR_CANT_CREATE("Can't create"), // (20) + ERR_QUERY_FAILED("Query failed"), + ERR_ALREADY_IN_USE("Already in use"), + ERR_LOCKED("Locked"), ///< resource is locked + ERR_TIMEOUT("Timeout"), + ERR_CANT_CONNECT("Can't connect"), // (25) + ERR_CANT_RESOLVE("Can't resolve"), + ERR_CONNECTION_ERROR("Connection error"), + ERR_CANT_ACQUIRE_RESOURCE("Can't acquire resource"), + ERR_CANT_FORK("Can't fork"), + ERR_INVALID_DATA("Invalid data"), ///< Data passed is invalid (30) + ERR_INVALID_PARAMETER("Invalid parameter"), ///< Parameter passed is invalid + ERR_ALREADY_EXISTS("Already exists"), ///< When adding, item already exists + ERR_DOES_NOT_EXIST("Does not exist"), ///< When retrieving/erasing, if item does not exist + ERR_DATABASE_CANT_READ("Can't read database"), ///< database is full + ERR_DATABASE_CANT_WRITE("Can't write database"), ///< database is full (35) + ERR_COMPILATION_FAILED("Compilation failed"), + ERR_METHOD_NOT_FOUND("Method not found"), + ERR_LINK_FAILED("Link failed"), + ERR_SCRIPT_FAILED("Script failed"), + ERR_CYCLIC_LINK("Cyclic link detected"), // (40) + ERR_INVALID_DECLARATION("Invalid declaration"), + ERR_DUPLICATE_SYMBOL("Duplicate symbol"), + ERR_PARSE_ERROR("Parse error"), + ERR_BUSY("Busy"), + ERR_SKIP("Skip"), // (45) + ERR_HELP("Help"), ///< user requested help!! + ERR_BUG("Bug"), ///< a bug in the software certainly happened, due to a double check failing or unexpected behavior. + ERR_PRINTER_ON_FIRE("Printer on fire"); /// the parallel port printer is engulfed in flames + + companion object { + internal fun fromNativeValue(nativeValue: Int): Error? { + return Error.entries.getOrNull(nativeValue) + } + } + + internal fun toNativeValue(): Int = this.ordinal + + override fun toString(): String { + return description + } +} diff --git a/platform/android/java/lib/src/org/godotengine/godot/gl/GLSurfaceView.java b/platform/android/java/lib/src/org/godotengine/godot/gl/GLSurfaceView.java index 6a4e9da699e3..5fc993fd56fc 100644 --- a/platform/android/java/lib/src/org/godotengine/godot/gl/GLSurfaceView.java +++ b/platform/android/java/lib/src/org/godotengine/godot/gl/GLSurfaceView.java @@ -568,7 +568,7 @@ public void surfaceRedrawNeeded(SurfaceHolder holder) { } - // -- GODOT start -- + // -- BLAZIUM start -- /** * Pause the rendering thread, optionally tearing down the EGL context * depending upon the value of {@link #setPreserveEGLContextOnPause(boolean)}. @@ -604,7 +604,7 @@ protected final void requestRenderThreadExitAndWait() { mGLThread.requestExitAndWait(); } } - // -- GODOT end -- + // -- BLAZIUM end -- /** * Queue a runnable to be run on the GL rendering thread. This can be used @@ -772,7 +772,7 @@ public interface Renderer { */ void onSurfaceChanged(GL10 gl, int width, int height); - // -- GODOT start -- + // -- BLAZIUM start -- /** * Called to draw the current frame. *

@@ -797,7 +797,7 @@ public interface Renderer { * Invoked when the render thread is in the process of shutting down. */ void onRenderThreadExiting(); - // -- GODOT end -- + // -- BLAZIUM end -- } /** @@ -1552,7 +1552,7 @@ private void guardedRun() throws InterruptedException { createGlInterface = false; } - // -- GODOT start -- + // -- BLAZIUM start -- if (createEglContext) { if (LOG_RENDERER) { Log.w("GLThread", "onSurfaceCreated"); @@ -1622,7 +1622,7 @@ private void guardedRun() throws InterruptedException { break; } } - // -- GODOT end -- + // -- BLAZIUM end -- if (wantRenderNotification) { doRenderNotification = true; diff --git a/platform/android/java/lib/src/org/godotengine/godot/gl/GodotRenderer.java b/platform/android/java/lib/src/org/godotengine/godot/gl/GodotRenderer.java index 7e5e262b2dee..3c4ebbfa1e58 100644 --- a/platform/android/java/lib/src/org/godotengine/godot/gl/GodotRenderer.java +++ b/platform/android/java/lib/src/org/godotengine/godot/gl/GodotRenderer.java @@ -40,7 +40,7 @@ import javax.microedition.khronos.opengles.GL10; /** - * Godot's GL renderer implementation. + * Blazium's GL renderer implementation. */ public class GodotRenderer implements GLSurfaceView.Renderer { private final String TAG = GodotRenderer.class.getSimpleName(); @@ -68,7 +68,7 @@ public boolean onDrawFrame(GL10 gl) { @Override public void onRenderThreadExiting() { - Log.d(TAG, "Destroying Godot Engine"); + Log.d(TAG, "Destroying Blazium Engine"); GodotLib.ondestroy(); } diff --git a/platform/android/java/lib/src/org/godotengine/godot/input/GodotInputHandler.java b/platform/android/java/lib/src/org/godotengine/godot/input/GodotInputHandler.java index 273774a33d1e..d7a6e2a4e34a 100644 --- a/platform/android/java/lib/src/org/godotengine/godot/input/GodotInputHandler.java +++ b/platform/android/java/lib/src/org/godotengine/godot/input/GodotInputHandler.java @@ -251,7 +251,7 @@ public boolean onGenericMotionEvent(MotionEvent event) { final float value = event.getAxisValue(axis); /* As all axes are polled for each event, only fire an axis event if the value has actually changed. - Prevents flooding Godot with repeated events. + Prevents flooding Blazium with repeated events. */ if (joystick.axesValues.indexOfKey(axis) < 0 || (float)joystick.axesValues.get(axis) != value) { // save value to prevent repeats @@ -370,7 +370,7 @@ public void onInputDeviceAdded(int deviceId) { Collections.sort(joystick.axes); for (int idx = 0; idx < joystick.axes.size(); idx++) { //Helps with creating new joypad mappings. - Log.i(TAG, " - Mapping Android axis " + joystick.axes.get(idx) + " to Godot axis " + idx); + Log.i(TAG, " - Mapping Android axis " + joystick.axes.get(idx) + " to Blazium axis " + idx); } mJoysticksDevices.put(deviceId, joystick); diff --git a/platform/android/java/lib/src/org/godotengine/godot/io/file/FileErrors.kt b/platform/android/java/lib/src/org/godotengine/godot/io/file/FileErrors.kt index 2df0195de7fa..076d9729e737 100644 --- a/platform/android/java/lib/src/org/godotengine/godot/io/file/FileErrors.kt +++ b/platform/android/java/lib/src/org/godotengine/godot/io/file/FileErrors.kt @@ -31,7 +31,13 @@ package org.godotengine.godot.io.file /** +<<<<<<< HEAD:platform/android/java/lib/src/org/godotengine/godot/io/file/FileErrors.kt * Set of errors that may occur when performing data access. +======= + * Primary window of the Blazium Editor. + * + * This is the implementation of the editor used when running on HorizonOS devices. +>>>>>>> a534a98048 (Alot of rebranding, check for errors please):platform/android/java/editor/src/horizonos/java/org/godotengine/editor/GodotEditor.kt */ internal enum class FileErrors(val nativeValue: Int) { OK(0), diff --git a/platform/android/java/lib/src/org/godotengine/godot/plugin/GodotPlugin.java b/platform/android/java/lib/src/org/godotengine/godot/plugin/GodotPlugin.java index c975c29e9693..1ecb90a7d121 100644 --- a/platform/android/java/lib/src/org/godotengine/godot/plugin/GodotPlugin.java +++ b/platform/android/java/lib/src/org/godotengine/godot/plugin/GodotPlugin.java @@ -57,11 +57,11 @@ import javax.microedition.khronos.opengles.GL10; /** - * Base class for Godot Android plugins. + * Base class for Blazium Android plugins. *

- * A Godot Android plugin is an Android library with the following requirements: + * A Blazium Android plugin is an Android library with the following requirements: *

- * - The plugin must have a dependency on the Godot Android library: `implementation "org.godotengine:godot:"` + * - The plugin must have a dependency on the Blazium Android library: `implementation "org.godotengine:godot:"` *

* - The plugin must include a tag in its Android manifest with the following format: * @@ -73,7 +73,7 @@ * - 'plugin.init.ClassFullName' is the full name (package + class name) of the plugin init class * extending {@link GodotPlugin}. *

- * A Godot Android plugin can also define and provide c/c++ gdextension libraries, which will be + * A Blazium Android plugin can also define and provide c/c++ gdextension libraries, which will be * automatically bundled by the aar build system. * GDExtension ('*.gdextension') config files must be located in the project 'assets' directory and * their paths specified by {@link GodotPlugin#getPluginGDExtensionLibrariesPaths()}. @@ -87,7 +87,7 @@ public abstract class GodotPlugin { private final ConcurrentHashMap registeredSignals = new ConcurrentHashMap<>(); /** - * Base constructor passing a {@link Godot} instance through which the plugin can access Godot's + * Base constructor passing a {@link Blazium} instance through which the plugin can access Blazium's * APIs and lifecycle events. */ public GodotPlugin(Godot godot) { @@ -95,7 +95,7 @@ public GodotPlugin(Godot godot) { } /** - * Provides access to the Godot engine. + * Provides access to the Blazium engine. */ protected Godot getGodot() { return godot; @@ -110,7 +110,7 @@ protected Activity getActivity() { } /** - * Register the plugin with Godot native code. + * Register the plugin with Blazium native code. *

* This method is invoked on the render thread to register the plugin on engine startup. */ @@ -169,11 +169,11 @@ public final void onRegisterPluginWithGodotNative() { * Invoked once during the initialization process after creation of the * {@link org.godotengine.godot.GodotRenderView} view. *

- * The plugin can return a non-null {@link View} layout which will be added to the Godot view + * The plugin can return a non-null {@link View} layout which will be added to the Blazium view * hierarchy. *

* Use {@link GodotPlugin#shouldBeOnTop()} to specify whether the plugin's {@link View} should - * be added on top or behind the main Godot view. + * be added on top or behind the main Blazium view. * * @see Activity#onCreate(Bundle) * @return the plugin's view to be included; null if no views should be included. @@ -216,14 +216,14 @@ public void onMainDestroy() {} public boolean onMainBackPressed() { return false; } /** - * Invoked on the render thread when set up of the Godot engine is complete. + * Invoked on the render thread when set up of the Blazium engine is complete. *

* This is invoked before {@link GodotPlugin#onGodotMainLoopStarted()}. */ public void onGodotSetupCompleted() {} /** - * Invoked on the render thread when the Godot main loop has started. + * Invoked on the render thread when the Blazium main loop has started. * * This is invoked after {@link GodotPlugin#onGodotSetupCompleted()}. */ @@ -274,7 +274,7 @@ public void onVkSurfaceCreated(Surface surface) {} public abstract String getPluginName(); /** - * Returns the list of methods to be exposed to Godot. + * Returns the list of methods to be exposed to Blazium. * * @deprecated Use the {@link UsedByGodot} annotation instead. */ @@ -285,7 +285,7 @@ public List getPluginMethods() { } /** - * Returns the list of signals to be exposed to Godot. + * Returns the list of signals to be exposed to Blazium. */ @NonNull public Set getPluginSignals() { @@ -304,10 +304,10 @@ public Set getPluginGDExtensionLibrariesPaths() { /** * Returns whether the plugin's {@link View} returned in - * {@link GodotPlugin#onMainCreate(Activity)} should be placed on top of the main Godot view. + * {@link GodotPlugin#onMainCreate(Activity)} should be placed on top of the main Blazium view. *

* Returning false causes the plugin's {@link View} to be placed behind, which can be useful - * when used with transparency in order to let the Godot view handle inputs. + * when used with transparency in order to let the Blazium view handle inputs. */ public boolean shouldBeOnTop() { return true; @@ -343,7 +343,7 @@ protected void runOnRenderThread(Runnable action) { } /** - * Emit a registered Godot signal. + * Emit a registered Blazium signal. * @param signalName Name of the signal to emit. It will be validated against the set of registered signals. * @param signalArgs Arguments used to populate the emitted signal. The arguments will be validated against the {@link SignalInfo} matching the registered signalName parameter. */ @@ -365,9 +365,9 @@ protected void emitSignal(final String signalName, final Object... signalArgs) { } /** - * Emit a Godot signal. - * @param godot Godot instance - * @param pluginName Name of the Godot plugin the signal will be emitted from. The plugin must already be registered with the Godot engine. + * Emit a Blazium signal. + * @param godot Blazium instance + * @param pluginName Name of the Blazium plugin the signal will be emitted from. The plugin must already be registered with the Blazium engine. * @param signalInfo Information about the signal to emit. * @param signalArgs Arguments used to populate the emitted signal. The arguments will be validated against the given {@link SignalInfo} parameter. */ diff --git a/platform/android/java/lib/src/org/godotengine/godot/plugin/GodotPluginRegistry.java b/platform/android/java/lib/src/org/godotengine/godot/plugin/GodotPluginRegistry.java index 711bca02e7d8..5e426b012958 100644 --- a/platform/android/java/lib/src/org/godotengine/godot/plugin/GodotPluginRegistry.java +++ b/platform/android/java/lib/src/org/godotengine/godot/plugin/GodotPluginRegistry.java @@ -47,17 +47,17 @@ import java.util.concurrent.ConcurrentHashMap; /** - * Registry used to load and access the registered Godot Android plugins. + * Registry used to load and access the registered Blazium Android plugins. */ public final class GodotPluginRegistry { private static final String TAG = GodotPluginRegistry.class.getSimpleName(); /** - * Prefix used for version 1 of the Godot plugin, mostly compatible with Godot 3.x + * Prefix used for version 1 of the Blazium plugin, mostly compatible with Blazium 3.x */ private static final String GODOT_PLUGIN_V1_NAME_PREFIX = "org.godotengine.plugin.v1."; /** - * Prefix used for version 2 of the Godot plugin, compatible with Godot 4.2+ + * Prefix used for version 2 of the Blazium plugin, compatible with Blazium 4.2+ */ private static final String GODOT_PLUGIN_V2_NAME_PREFIX = "org.godotengine.plugin.v2."; @@ -86,15 +86,15 @@ public Collection getAllPlugins() { } /** - * Parse the manifest file and load all included Godot Android plugins. + * Parse the manifest file and load all included Blazium Android plugins. *

* A plugin manifest entry is a '' tag setup as described in the {@link GodotPlugin} * documentation. * - * @param godot Godot instance + * @param godot Blazium instance * @param runtimePlugins Set of plugins provided at runtime for registration * @return A singleton instance of {@link GodotPluginRegistry}. This ensures that only one instance - * of each Godot Android plugins is available at runtime. + * of each Blazium Android plugins is available at runtime. */ public static GodotPluginRegistry initializePluginRegistry(Godot godot, Set runtimePlugins) { if (instance == null) { @@ -141,17 +141,17 @@ private void loadPlugins(Godot godot, Set runtimePlugins) { } for (String metaDataName : metaData.keySet()) { - // Parse the meta-data looking for entry with the Godot plugin name prefix. + // Parse the meta-data looking for entry with the Blazium plugin name prefix. String pluginName = null; if (metaDataName.startsWith(GODOT_PLUGIN_V2_NAME_PREFIX)) { pluginName = metaDataName.substring(GODOT_PLUGIN_V2_NAME_PREFIX.length()).trim(); } else if (metaDataName.startsWith(GODOT_PLUGIN_V1_NAME_PREFIX)) { pluginName = metaDataName.substring(GODOT_PLUGIN_V1_NAME_PREFIX.length()).trim(); - Log.w(TAG, "Godot v1 plugin are deprecated in Godot 4.2 and higher: " + pluginName); + Log.w(TAG, "Blazium v1 plugin are deprecated in Blazium 4.2 and higher: " + pluginName); } if (!TextUtils.isEmpty(pluginName)) { - Log.i(TAG, "Initializing Godot plugin " + pluginName); + Log.i(TAG, "Initializing Blazium plugin " + pluginName); // Retrieve the plugin class full name. String pluginHandleClassFullName = metaData.getString(metaDataName); @@ -171,9 +171,9 @@ private void loadPlugins(Godot godot, Set runtimePlugins) { "Meta-data plugin name does not match the value returned by the plugin handle: " + pluginName + " =/= " + pluginHandle.getPluginName()); } registry.put(pluginName, pluginHandle); - Log.i(TAG, "Completed initialization for Godot plugin " + pluginHandle.getPluginName()); + Log.i(TAG, "Completed initialization for Blazium plugin " + pluginHandle.getPluginName()); } catch (Exception e) { - Log.w(TAG, "Unable to load Godot plugin " + pluginName, e); + Log.w(TAG, "Unable to load Blazium plugin " + pluginName, e); } } else { Log.w(TAG, "Invalid plugin loader class for " + pluginName); @@ -181,7 +181,7 @@ private void loadPlugins(Godot godot, Set runtimePlugins) { } } } catch (Exception e) { - Log.e(TAG, "Unable load Godot Android plugins from the manifest file.", e); + Log.e(TAG, "Unable load Blazium Android plugins from the manifest file.", e); } } } diff --git a/platform/android/java/lib/src/org/godotengine/godot/plugin/UsedByGodot.java b/platform/android/java/lib/src/org/godotengine/godot/plugin/UsedByGodot.java index 8beb28ab9aa8..c12022edb0c7 100644 --- a/platform/android/java/lib/src/org/godotengine/godot/plugin/UsedByGodot.java +++ b/platform/android/java/lib/src/org/godotengine/godot/plugin/UsedByGodot.java @@ -36,7 +36,7 @@ import java.lang.annotation.Target; /** - * Annotation to indicate a method is being invoked from the Godot game logic. + * Annotation to indicate a method is being invoked from the Blazium game logic. * * At runtime, annotated plugin methods are detected and automatically registered. */ diff --git a/platform/android/java/lib/src/org/godotengine/godot/utils/GodotNetUtils.java b/platform/android/java/lib/src/org/godotengine/godot/utils/GodotNetUtils.java index dca190a2fc9b..8c22ca40cd33 100644 --- a/platform/android/java/lib/src/org/godotengine/godot/utils/GodotNetUtils.java +++ b/platform/android/java/lib/src/org/godotengine/godot/utils/GodotNetUtils.java @@ -61,7 +61,7 @@ public GodotNetUtils(Context context) { /** * Acquire the multicast lock. This is required on some devices to receive broadcast/multicast packets. - * This is done automatically by Godot when enabling broadcast or joining a multicast group on a socket. + * This is done automatically by Blazium when enabling broadcast or joining a multicast group on a socket. */ public void multicastLockAcquire() { if (multicastLock == null) @@ -69,13 +69,13 @@ public void multicastLockAcquire() { try { multicastLock.acquire(); } catch (RuntimeException e) { - Log.e("Godot", "Exception during multicast lock acquire: " + e); + Log.e("Blazium", "Exception during multicast lock acquire: " + e); } } /** * Release the multicast lock. - * This is done automatically by Godot when the lock is no longer needed by a socket. + * This is done automatically by Blazium when the lock is no longer needed by a socket. */ public void multicastLockRelease() { if (multicastLock == null) @@ -83,7 +83,7 @@ public void multicastLockRelease() { try { multicastLock.release(); } catch (RuntimeException e) { - Log.e("Godot", "Exception during multicast lock release: " + e); + Log.e("Blazium", "Exception during multicast lock release: " + e); } } @@ -112,7 +112,7 @@ public void multicastLockRelease() { } return writer.toString(); } catch (Exception e) { - Log.e("Godot", "Exception while reading CA certificates: " + e); + Log.e("Blazium", "Exception while reading CA certificates: " + e); return ""; } } diff --git a/platform/android/java/lib/src/org/godotengine/godot/utils/ProcessPhoenix.java b/platform/android/java/lib/src/org/godotengine/godot/utils/ProcessPhoenix.java index b1bce45fbbad..cd56d319dbea 100644 --- a/platform/android/java/lib/src/org/godotengine/godot/utils/ProcessPhoenix.java +++ b/platform/android/java/lib/src/org/godotengine/godot/utils/ProcessPhoenix.java @@ -44,6 +44,12 @@ */ public final class ProcessPhoenix extends Activity { private static final String KEY_RESTART_INTENTS = "phoenix_restart_intents"; +<<<<<<< HEAD +======= + // -- BLAZIUM start -- + private static final String KEY_RESTART_ACTIVITY_OPTIONS = "phoenix_restart_activity_options"; + // -- BLAZIUM end -- +>>>>>>> a534a98048 (Alot of rebranding, check for errors please) private static final String KEY_MAIN_PROCESS_PID = "phoenix_main_process_pid"; /** @@ -56,6 +62,10 @@ public static void triggerRebirth(Context context) { triggerRebirth(context, getRestartIntent(context)); } +<<<<<<< HEAD +======= + // -- BLAZIUM start -- +>>>>>>> a534a98048 (Alot of rebranding, check for errors please) /** * Call to restart the application process using the specified intents. *

@@ -94,7 +104,7 @@ public static void forceQuit(Activity activity, int pid) { Runtime.getRuntime().exit(0); // Kill kill kill! } - // -- GODOT end -- + // -- BLAZIUM end -- private static Intent getRestartIntent(Context context) { String packageName = context.getPackageName(); @@ -111,11 +121,21 @@ private static Intent getRestartIntent(Context context) { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); +<<<<<<< HEAD // -- GODOT start -- ArrayList intents = getIntent().getParcelableArrayListExtra(KEY_RESTART_INTENTS); startActivities(intents.toArray(new Intent[intents.size()])); forceQuit(this, getIntent().getIntExtra(KEY_MAIN_PROCESS_PID, -1)); // -- GODOT end -- +======= + // -- BLAZIUM start -- + Intent launchIntent = getIntent(); + ArrayList intents = launchIntent.getParcelableArrayListExtra(KEY_RESTART_INTENTS); + Bundle activityOptions = launchIntent.getBundleExtra(KEY_RESTART_ACTIVITY_OPTIONS); + startActivities(intents.toArray(new Intent[intents.size()]), activityOptions); + forceQuit(this, launchIntent.getIntExtra(KEY_MAIN_PROCESS_PID, -1)); + // -- BLAZIUM end -- +>>>>>>> a534a98048 (Alot of rebranding, check for errors please) } /** diff --git a/platform/android/java/lib/src/org/godotengine/godot/vulkan/VkRenderer.kt b/platform/android/java/lib/src/org/godotengine/godot/vulkan/VkRenderer.kt index a93a7dbe0971..87fe0feb2281 100644 --- a/platform/android/java/lib/src/org/godotengine/godot/vulkan/VkRenderer.kt +++ b/platform/android/java/lib/src/org/godotengine/godot/vulkan/VkRenderer.kt @@ -107,7 +107,7 @@ internal class VkRenderer { * Invoked when the render thread is in the process of shutting down. */ fun onRenderThreadExiting() { - Log.d(TAG, "Destroying Godot Engine") + Log.d(TAG, "Destroying Blazium Engine") GodotLib.ondestroy() } } diff --git a/platform/android/java/lib/src/org/godotengine/godot/xr/XRMode.java b/platform/android/java/lib/src/org/godotengine/godot/xr/XRMode.java index 2c2c9f39d649..271dc7e631e0 100644 --- a/platform/android/java/lib/src/org/godotengine/godot/xr/XRMode.java +++ b/platform/android/java/lib/src/org/godotengine/godot/xr/XRMode.java @@ -31,7 +31,7 @@ package org.godotengine.godot.xr; /** - * Godot available XR modes. + * Blazium available XR modes. */ public enum XRMode { REGULAR(0, "Regular", "--xr_mode_regular", "Default Android Gamepad"), // Regular/flatscreen diff --git a/platform/android/java/lib/srcTest/java/org/godotengine/godot/utils/CommandLineFileParserTest.kt b/platform/android/java/lib/srcTest/java/org/godotengine/godot/utils/CommandLineFileParserTest.kt index 8b0466848a74..6663c3a826d0 100644 --- a/platform/android/java/lib/srcTest/java/org/godotengine/godot/utils/CommandLineFileParserTest.kt +++ b/platform/android/java/lib/srcTest/java/org/godotengine/godot/utils/CommandLineFileParserTest.kt @@ -36,7 +36,7 @@ import org.junit.runners.Parameterized import java.io.ByteArrayInputStream import java.io.InputStream -// Godot saves command line params in the `assets/_cl_` file on exporting an apk. By default, +// Blazium saves command line params in the `assets/_cl_` file on exporting an apk. By default, // without any other commands specified in `command_line/extra_args` in Export window, the content // of that _cl_ file consists of only the `--xr_mode_regular` and `--use_immersive` flags. // The `CL_` prefix here refers to that file diff --git a/platform/android/java/nativeSrcsConfigs/README.md b/platform/android/java/nativeSrcsConfigs/README.md index 9d884415cc00..79e9939ceeeb 100644 --- a/platform/android/java/nativeSrcsConfigs/README.md +++ b/platform/android/java/nativeSrcsConfigs/README.md @@ -1,4 +1,4 @@ ## Native sources configs -This is a non-functional Android library used to provide Android Studio editor support to the Godot project native files. +This is a non-functional Android library used to provide Android Studio editor support to the Blazium project native files. Nothing else should be added to this library. diff --git a/platform/android/java/scripts/publish-module.gradle b/platform/android/java/scripts/publish-module.gradle index 32b749e493d6..7ec7e5328234 100644 --- a/platform/android/java/scripts/publish-module.gradle +++ b/platform/android/java/scripts/publish-module.gradle @@ -19,7 +19,7 @@ afterEvaluate { // Mostly self-explanatory metadata pom { name = PUBLISH_ARTIFACT_ID - description = 'Godot Engine Android Library' + description = 'Blazium Engine Android Library' url = 'https://godotengine.org/' licenses { license { diff --git a/platform/android/java/settings.gradle b/platform/android/java/settings.gradle index 3137e742441b..6b8ed8339219 100644 --- a/platform/android/java/settings.gradle +++ b/platform/android/java/settings.gradle @@ -17,7 +17,7 @@ pluginManagement { } } -rootProject.name = "Godot" +rootProject.name = "Blazium" include ':app' include ':lib' diff --git a/platform/android/java_godot_lib_jni.cpp b/platform/android/java_godot_lib_jni.cpp index ec42e5bbd8c1..8b219fe5b1ee 100644 --- a/platform/android/java_godot_lib_jni.cpp +++ b/platform/android/java_godot_lib_jni.cpp @@ -261,8 +261,8 @@ JNIEXPORT jboolean JNICALL Java_org_godotengine_godot_GodotLib_step(JNIEnv *env, } if (step.get() == STEP_SETUP) { - // Since Godot is initialized on the UI thread, main_thread_id was set to that thread's id, - // but for Godot purposes, the main thread is the one running the game loop + // Since Blazium is initialized on the UI thread, main_thread_id was set to that thread's id, + // but for Blazium purposes, the main thread is the one running the game loop Main::setup2(false); // The logo is shown in the next frame otherwise we run into rendering issues input_handler = new AndroidInputHandler(); step.increment(); diff --git a/platform/android/java_godot_wrapper.cpp b/platform/android/java_godot_wrapper.cpp index 70ea4b09c10d..4bbc9ea59ae1 100644 --- a/platform/android/java_godot_wrapper.cpp +++ b/platform/android/java_godot_wrapper.cpp @@ -32,7 +32,7 @@ // JNIEnv is only valid within the thread it belongs to, in a multi threading environment // we can't cache it. -// For Godot we call most access methods from our thread and we thus get a valid JNIEnv +// For Blazium we call most access methods from our thread and we thus get a valid JNIEnv // from get_jni_env(). For one or two we expect to pass the environment // TODO we could probably create a base class for this... @@ -57,7 +57,7 @@ GodotJavaWrapper::GodotJavaWrapper(JNIEnv *p_env, jobject p_activity, jobject p_ return; } - // get some Godot method pointers... + // get some Blazium method pointers... _restart = p_env->GetMethodID(godot_class, "restart", "()V"); _finish = p_env->GetMethodID(godot_class, "forceQuit", "(I)Z"); _set_keep_screen_on = p_env->GetMethodID(godot_class, "setKeepScreenOn", "(Z)V"); diff --git a/platform/android/string_android.h b/platform/android/string_android.h index 3f30b8ec3de4..de1a2e3d9eff 100644 --- a/platform/android/string_android.h +++ b/platform/android/string_android.h @@ -38,10 +38,10 @@ #include /** - * Converts JNI jstring to Godot String. + * Converts JNI jstring to Blazium String. * @param source Source JNI string. If null an empty string is returned. * @param env JNI environment instance. If null obtained by get_jni_env(). - * @return Godot string instance. + * @return Blazium string instance. */ static inline String jstring_to_string(jstring source, JNIEnv *env = nullptr) { String result; diff --git a/platform/ios/export/export_plugin.cpp b/platform/ios/export/export_plugin.cpp index 580e3ba78911..664c7b3b5473 100644 --- a/platform/ios/export/export_plugin.cpp +++ b/platform/ios/export/export_plugin.cpp @@ -618,7 +618,7 @@ void EditorExportPlatformIOS::_fix_config_file(const Ref &p_ case 0: { String logo_path = GLOBAL_GET("application/boot_splash/image"); bool is_on = GLOBAL_GET("application/boot_splash/fullsize"); - // If custom logo is not specified, Godot does not scale default one, so we should do the same. + // If custom logo is not specified, Blazium does not scale default one, so we should do the same. value = (is_on && logo_path.length() > 0) ? "scaleAspectFit" : "center"; } break; default: { @@ -1020,7 +1020,7 @@ Error EditorExportPlatformIOS::_export_loading_screen_file(const Ref &p_preset, Vector &p_project_data, const Vector &p_additional_assets) { - // that is just a random number, we just need Godot IDs not to clash with + // that is just a random number, we just need Blazium IDs not to clash with // existing IDs in the project. PbxId current_id = { 0x58938401, 0, 0 }; String pbx_files; @@ -1977,7 +1977,7 @@ Error EditorExportPlatformIOS::_export_ios_plugins(const Ref plugin_format["initialization"] = plugin_initialization_cpp_code; plugin_format["deinitialization"] = plugin_deinitialization_cpp_code; - String plugin_cpp_code = "\n// Godot Plugins\n" + String plugin_cpp_code = "\n// Blazium Plugins\n" "void godot_ios_plugins_initialize();\n" "void godot_ios_plugins_deinitialize();\n" "// Exported Plugins\n\n" diff --git a/platform/ios/godot_app_delegate.m b/platform/ios/godot_app_delegate.m index 74e8705bc3f6..c45cdd1105c2 100644 --- a/platform/ios/godot_app_delegate.m +++ b/platform/ios/godot_app_delegate.m @@ -112,7 +112,7 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:( return result; } -/* Can be handled by Info.plist. Not yet supported by Godot. +/* Can be handled by Info.plist. Not yet supported by Blazium. // MARK: Scene diff --git a/platform/ios/godot_view.mm b/platform/ios/godot_view.mm index 1dddc9306e3e..c032b07a6b6e 100644 --- a/platform/ios/godot_view.mm +++ b/platform/ios/godot_view.mm @@ -435,7 +435,7 @@ - (void)handleMotion { // output ///@TODO Using [[UIApplication sharedApplication] statusBarOrientation] - /// is a bit of a hack. Godot obviously knows the orientation so maybe + /// is a bit of a hack. Blazium obviously knows the orientation so maybe /// we // can use that instead? (note that left and right seem swapped) diff --git a/platform/ios/joypad_ios.mm b/platform/ios/joypad_ios.mm index 38d3ce728aaf..20fae35c5564 100644 --- a/platform/ios/joypad_ios.mm +++ b/platform/ios/joypad_ios.mm @@ -158,7 +158,7 @@ - (void)addiOSJoypad:(GCController *)controller { controller.playerIndex = [self getFreePlayerIndex]; } - // tell Godot about our new controller + // tell Blazium about our new controller Input::get_singleton()->joy_connection_changed(joy_id, true, String::utf8([controller.vendorName UTF8String])); // add it to our dictionary, this will retain our controllers @@ -196,7 +196,7 @@ - (void)controllerWasDisconnected:(NSNotification *)notification { NSArray *keys = [self.connectedJoypads allKeysForObject:controller]; for (NSNumber *key in keys) { - // tell Godot this joystick is no longer there + // tell Blazium this joystick is no longer there int joy_id = [key intValue]; Input::get_singleton()->joy_connection_changed(joy_id, false, ""); diff --git a/platform/linuxbsd/detect.py b/platform/linuxbsd/detect.py index d1de760f3480..4ae4a087eda9 100644 --- a/platform/linuxbsd/detect.py +++ b/platform/linuxbsd/detect.py @@ -33,7 +33,7 @@ def get_opts(): EnumVariable("linker", "Linker program", "default", ("default", "bfd", "gold", "lld", "mold")), BoolVariable("use_llvm", "Use the LLVM compiler", False), BoolVariable("use_static_cpp", "Link libgcc and libstdc++ statically for better portability", True), - BoolVariable("use_coverage", "Test Godot coverage", False), + BoolVariable("use_coverage", "Test Blazium coverage", False), BoolVariable("use_ubsan", "Use LLVM/GCC compiler undefined behavior sanitizer (UBSAN)", False), BoolVariable("use_asan", "Use LLVM/GCC compiler address sanitizer (ASAN)", False), BoolVariable("use_lsan", "Use LLVM/GCC compiler leak sanitizer (LSAN)", False), diff --git a/platform/linuxbsd/freedesktop_screensaver.cpp b/platform/linuxbsd/freedesktop_screensaver.cpp index cf179b573519..d2c7317ab6d1 100644 --- a/platform/linuxbsd/freedesktop_screensaver.cpp +++ b/platform/linuxbsd/freedesktop_screensaver.cpp @@ -61,9 +61,9 @@ void FreeDesktopScreenSaver::inhibit() { String app_name_string = GLOBAL_GET("application/config/name"); CharString app_name_utf8 = app_name_string.utf8(); - const char *app_name = app_name_string.is_empty() ? "Godot Engine" : app_name_utf8.get_data(); + const char *app_name = app_name_string.is_empty() ? "Blazium Engine" : app_name_utf8.get_data(); - const char *reason = "Running Godot Engine project"; + const char *reason = "Running Blazium Engine project"; DBusMessage *message = dbus_message_new_method_call( BUS_OBJECT_NAME, BUS_OBJECT_PATH, BUS_INTERFACE, diff --git a/platform/linuxbsd/os_linuxbsd.cpp b/platform/linuxbsd/os_linuxbsd.cpp index 6355562febdf..b40835efee90 100644 --- a/platform/linuxbsd/os_linuxbsd.cpp +++ b/platform/linuxbsd/os_linuxbsd.cpp @@ -687,7 +687,7 @@ Vector OS_LinuxBSD::get_system_fonts() const { } return ret; #else - ERR_FAIL_V_MSG(Vector(), "Godot was compiled without fontconfig, system font support is disabled."); + ERR_FAIL_V_MSG(Vector(), "Blazium was compiled without fontconfig, system font support is disabled."); #endif } @@ -793,7 +793,7 @@ Vector OS_LinuxBSD::get_system_font_path_for_text(const String &p_font_n return ret; #else - ERR_FAIL_V_MSG(Vector(), "Godot was compiled without fontconfig, system font support is disabled."); + ERR_FAIL_V_MSG(Vector(), "Blazium was compiled without fontconfig, system font support is disabled."); #endif } @@ -849,7 +849,7 @@ String OS_LinuxBSD::get_system_font_path(const String &p_font_name, int p_weight return String(); #else - ERR_FAIL_V_MSG(String(), "Godot was compiled without fontconfig, system font support is disabled."); + ERR_FAIL_V_MSG(String(), "Blazium was compiled without fontconfig, system font support is disabled."); #endif } diff --git a/platform/linuxbsd/wayland/display_server_wayland.cpp b/platform/linuxbsd/wayland/display_server_wayland.cpp index 93096fcdcc66..1c7f57284dde 100644 --- a/platform/linuxbsd/wayland/display_server_wayland.cpp +++ b/platform/linuxbsd/wayland/display_server_wayland.cpp @@ -68,7 +68,7 @@ String DisplayServerWayland::_get_app_id_from_context(Context p_context) { if (config_name.length() != 0) { app_id = config_name; } else { - app_id = "org.godotengine.Godot"; + app_id = "org.godotengine.Blazium"; } } } @@ -1462,7 +1462,7 @@ DisplayServerWayland::DisplayServerWayland(const String &p_rendering_driver, Win wd.flags = p_flags; wd.vsync_mode = p_vsync_mode; wd.rect.size = p_resolution; - wd.title = "Godot"; + wd.title = "Blazium"; _show_window(); diff --git a/platform/linuxbsd/wayland/key_mapping_xkb.cpp b/platform/linuxbsd/wayland/key_mapping_xkb.cpp index bd1a1e383515..f4c2a408f1da 100644 --- a/platform/linuxbsd/wayland/key_mapping_xkb.cpp +++ b/platform/linuxbsd/wayland/key_mapping_xkb.cpp @@ -31,7 +31,7 @@ #include "key_mapping_xkb.h" void KeyMappingXKB::initialize() { - // XKB keycode to Godot Key map. + // XKB keycode to Blazium Key map. xkb_keycode_map[XKB_KEY_Escape] = Key::ESCAPE; xkb_keycode_map[XKB_KEY_Tab] = Key::TAB; @@ -191,7 +191,7 @@ void KeyMappingXKB::initialize() { xkb_keycode_map[XKB_KEY_XF86LaunchC] = Key::LAUNCHE; xkb_keycode_map[XKB_KEY_XF86LaunchD] = Key::LAUNCHF; - // Scancode to Godot Key map. + // Scancode to Blazium Key map. scancode_map[0x09] = Key::ESCAPE; scancode_map[0x0A] = Key::KEY_1; scancode_map[0x0B] = Key::KEY_2; @@ -349,7 +349,7 @@ void KeyMappingXKB::initialize() { scancode_map[0xD4] = Key::F34; scancode_map[0xD5] = Key::F35; - // Godot to scancode map. + // Blazium to scancode map. for (const KeyValue &E : scancode_map) { scancode_map_inv[E.value] = E.key; } diff --git a/platform/linuxbsd/wayland/wayland_thread.cpp b/platform/linuxbsd/wayland/wayland_thread.cpp index 975d384bad76..12404cc3a45b 100644 --- a/platform/linuxbsd/wayland/wayland_thread.cpp +++ b/platform/linuxbsd/wayland/wayland_thread.cpp @@ -1896,7 +1896,7 @@ void WaylandThread::_wl_data_device_on_enter(void *data, struct wl_data_device * ss->dnd_enter_serial = serial; ss->wl_data_offer_dnd = id; - // Godot only supports DnD file copying for now. + // Blazium only supports DnD file copying for now. wl_data_offer_accept(id, serial, "text/uri-list"); wl_data_offer_set_actions(id, WL_DATA_DEVICE_MANAGER_DND_ACTION_COPY, WL_DATA_DEVICE_MANAGER_DND_ACTION_COPY); } @@ -2501,7 +2501,7 @@ void WaylandThread::_wp_tablet_tool_on_frame(void *data, struct zwp_tablet_tool_ mm->set_position(td.position); mm->set_global_position(td.position); - // NOTE: The Godot API expects normalized values and we store them raw, + // NOTE: The Blazium API expects normalized values and we store them raw, // straight from the compositor, so we have to normalize them here. // According to the tablet proto spec, tilt is expressed in degrees relative @@ -2871,7 +2871,7 @@ int WaylandThread::window_state_get_preferred_buffer_scale(WindowState *p_ws) { int max_size = 1; // ================================ IMPORTANT ================================= - // NOTE: Due to a Godot limitation, we can't really rescale the whole UI yet. + // NOTE: Due to a Blazium limitation, we can't really rescale the whole UI yet. // Because of this reason, all platforms have resorted to forcing the highest // scale possible of a system on any window, despite of what screen it's onto. // On this backend everything's already in place for dynamic window scale @@ -4032,7 +4032,7 @@ Vector WaylandThread::selection_get_mime(const String &p_mime) const { if (ss->wl_data_source_selection) { // We have a source so the stuff we're pasting is ours. We'll have to pass the - // data directly or we'd stall waiting for Godot (ourselves) to send us the + // data directly or we'd stall waiting for Blazium (ourselves) to send us the // data :P OfferState *os = wl_data_offer_get_offer_state(ss->wl_data_offer_selection); @@ -4075,7 +4075,7 @@ Vector WaylandThread::primary_get_mime(const String &p_mime) const { if (ss->wp_primary_selection_source) { // We have a source so the stuff we're pasting is ours. We'll have to pass the - // data directly or we'd stall waiting for Godot (ourselves) to send us the + // data directly or we'd stall waiting for Blazium (ourselves) to send us the // data :P OfferState *os = wp_primary_selection_offer_get_offer_state(ss->wp_primary_selection_offer); diff --git a/platform/linuxbsd/wayland/wayland_thread.h b/platform/linuxbsd/wayland/wayland_thread.h index 76a14dbd6a4d..f4136c448388 100644 --- a/platform/linuxbsd/wayland/wayland_thread.h +++ b/platform/linuxbsd/wayland/wayland_thread.h @@ -83,7 +83,7 @@ class WaylandThread { public: - // Messages used for exchanging information between Godot's and Wayland's thread. + // Messages used for exchanging information between Blazium's and Wayland's thread. class Message : public RefCounted { public: Message() {} @@ -259,7 +259,7 @@ class WaylandThread { WaylandThread *wayland_thread; }; - // "High level" Godot-side screen data. + // "High level" Blazium-side screen data. struct ScreenData { // Geometry data. Point2i position; diff --git a/platform/linuxbsd/x11/display_server_x11.cpp b/platform/linuxbsd/x11/display_server_x11.cpp index 8a2f83be2d99..aa750f19a71a 100644 --- a/platform/linuxbsd/x11/display_server_x11.cpp +++ b/platform/linuxbsd/x11/display_server_x11.cpp @@ -3607,7 +3607,7 @@ void DisplayServerX11::_handle_key_event(WindowID p_window, XKeyEvent *p_event, #endif } - /* Phase 2, obtain a Godot keycode from the keysym */ + /* Phase 2, obtain a Blazium keycode from the keysym */ // KeyMappingX11 just translated the X11 keysym to a PIGUI // keysym, so it works in all platforms the same. @@ -4087,7 +4087,7 @@ void DisplayServerX11::_set_input_focus(Window p_window, int p_revert_to) { XGetInputFocus(x11_display, &focused_window, &focus_ret_state); // Only attempt to change focus if the window isn't already focused, in order to - // prevent issues with Godot stealing input focus with alternative window managers. + // prevent issues with Blazium stealing input focus with alternative window managers. if (p_window != focused_window) { XSetInputFocus(x11_display, p_window, p_revert_to, CurrentTime); } @@ -4537,7 +4537,7 @@ void DisplayServerX11::process_events() { xi.state[index] = pos; if (xi.state.size() == 1) { // X11 may send a motion event when a touch gesture begins, that would result - // in a spurious mouse motion event being sent to Godot; remember it to be able to filter it out + // in a spurious mouse motion event being sent to Blazium; remember it to be able to filter it out xi.mouse_pos_to_filter = pos; } Input::get_singleton()->parse_input_event(st); @@ -5228,13 +5228,13 @@ void DisplayServerX11::_update_context(WindowData &wd) { CharString name_str; switch (context) { case CONTEXT_EDITOR: - name_str = "Godot_Editor"; + name_str = "Blazium_Editor"; break; case CONTEXT_PROJECTMAN: - name_str = "Godot_ProjectList"; + name_str = "Blazium_ProjectList"; break; case CONTEXT_ENGINE: - name_str = "Godot_Engine"; + name_str = "Blazium_Engine"; break; } @@ -5638,7 +5638,7 @@ DisplayServerX11::WindowID DisplayServerX11::_create_window(WindowMode p_mode, V } /* set the titlebar name */ - XStoreName(x11_display, wd.x11_window, "Godot"); + XStoreName(x11_display, wd.x11_window, "Blazium"); XSetWMProtocols(x11_display, wd.x11_window, &wm_delete, 1); if (xdnd_aware != None) { XChangeProperty(x11_display, wd.x11_window, xdnd_aware, XA_ATOM, 32, PropModeReplace, (unsigned char *)&xdnd_version, 1); @@ -6217,7 +6217,7 @@ DisplayServerX11::DisplayServerX11(const String &p_rendering_driver, WindowMode if (use_prime) { print_line("Found discrete GPU, setting DRI_PRIME=1 to use it."); - print_line("Note: Set DRI_PRIME=0 in the environment to disable Godot from using the discrete GPU."); + print_line("Note: Set DRI_PRIME=0 in the environment to disable Blazium from using the discrete GPU."); setenv("DRI_PRIME", "1", 1); } } diff --git a/platform/linuxbsd/x11/key_mapping_x11.cpp b/platform/linuxbsd/x11/key_mapping_x11.cpp index b589a2a57344..26ea5798fc1f 100644 --- a/platform/linuxbsd/x11/key_mapping_x11.cpp +++ b/platform/linuxbsd/x11/key_mapping_x11.cpp @@ -31,7 +31,7 @@ #include "key_mapping_x11.h" void KeyMappingX11::initialize() { - // X11 Keysym to Godot Key map. + // X11 Keysym to Blazium Key map. xkeysym_map[XK_Escape] = Key::ESCAPE; xkeysym_map[XK_Tab] = Key::TAB; @@ -191,7 +191,7 @@ void KeyMappingX11::initialize() { xkeysym_map[XF86XK_LaunchC] = Key::LAUNCHE; xkeysym_map[XF86XK_LaunchD] = Key::LAUNCHF; - // Scancode to Godot Key map. + // Scancode to Blazium Key map. scancode_map[0x09] = Key::ESCAPE; scancode_map[0x0A] = Key::KEY_1; scancode_map[0x0B] = Key::KEY_2; @@ -349,7 +349,7 @@ void KeyMappingX11::initialize() { scancode_map[0xD4] = Key::F34; scancode_map[0xD5] = Key::F35; - // Godot to scancode map. + // Blazium to scancode map. for (const KeyValue &E : scancode_map) { scancode_map_inv[E.value] = E.key; } diff --git a/platform/macos/README.md b/platform/macos/README.md index 205c59e05d62..243f40966015 100644 --- a/platform/macos/README.md +++ b/platform/macos/README.md @@ -15,5 +15,5 @@ packaging macOS export templates. - Instructions on building this platform port from source. - [Exporting for macOS](https://docs.godotengine.org/en/latest/tutorials/export/exporting_for_macos.html) - Instructions on using the compiled export templates to export a project. -- [Running Godot apps on macOS](https://docs.godotengine.org/en/latest/tutorials/export/running_on_macos.html) - - Instructions on running Godot projects on macOS. +- [Running Blazium apps on macOS](https://docs.godotengine.org/en/latest/tutorials/export/running_on_macos.html) + - Instructions on running Blazium projects on macOS. diff --git a/platform/macos/SCsub b/platform/macos/SCsub index a10262c524e6..8d78b22bce7a 100644 --- a/platform/macos/SCsub +++ b/platform/macos/SCsub @@ -34,7 +34,7 @@ def generate_bundle(target, source, env): if not os.path.isdir(app_dir + "/Contents/MacOS"): os.mkdir(app_dir + "/Contents/MacOS") if target_bin != "": - shutil.copy(target_bin, app_dir + "/Contents/MacOS/Godot") + shutil.copy(target_bin, app_dir + "/Contents/MacOS/Blazium") if "mono" in env.module_version_string: shutil.copytree(Dir("#bin/GodotSharp").abspath, app_dir + "/Contents/Resources/GodotSharp") version = get_build_version(False) diff --git a/platform/macos/display_server_macos.mm b/platform/macos/display_server_macos.mm index cd2d8a60ace3..d445c0697f50 100644 --- a/platform/macos/display_server_macos.mm +++ b/platform/macos/display_server_macos.mm @@ -86,7 +86,7 @@ wpos = wpos.clamp(srect.position, srect.position + srect.size - p_rect.size / 3); } // macOS native y-coordinate relative to _get_screens_origin() is negative, - // Godot passes a positive value. + // Blazium passes a positive value. wpos.y *= -1; wpos += _get_screens_origin(); wpos /= scale; @@ -298,7 +298,7 @@ // Returns the native top-left screen coordinate of the smallest rectangle // that encompasses all screens. Needed in get_screen_position(), // window_get_position, and window_set_position() - // to convert between macOS native screen coordinates and the ones expected by Godot. + // to convert between macOS native screen coordinates and the ones expected by Blazium. if (displays_arrangement_dirty) { const_cast(this)->_update_displays_arrangement(); @@ -1512,7 +1512,7 @@ p_screen = _get_screen_index(p_screen); Point2i position = _get_native_screen_position(p_screen) - _get_screens_origin(); // macOS native y-coordinate relative to _get_screens_origin() is negative, - // Godot expects a positive value. + // Blazium expects a positive value. position.y *= -1; return position; } @@ -1597,7 +1597,7 @@ Color DisplayServerMacOS::screen_get_pixel(const Point2i &p_position) const { Point2i position = p_position; // macOS native y-coordinate relative to _get_screens_origin() is negative, - // Godot passes a positive value. + // Blazium passes a positive value. position.y *= -1; position += _get_screens_origin(); position /= screen_get_max_scale(); @@ -1698,8 +1698,8 @@ if (p_enable) { String app_name_string = GLOBAL_GET("application/config/name"); - NSString *name = [NSString stringWithUTF8String:(app_name_string.is_empty() ? "Godot Engine" : app_name_string.utf8().get_data())]; - NSString *reason = @"Godot Engine running with display/window/energy_saving/keep_screen_on = true"; + NSString *name = [NSString stringWithUTF8String:(app_name_string.is_empty() ? "Blazium Engine" : app_name_string.utf8().get_data())]; + NSString *reason = @"Blazium Engine running with display/window/energy_saving/keep_screen_on = true"; IOPMAssertionCreateWithDescription(kIOPMAssertPreventUserIdleDisplaySleep, (__bridge CFStringRef)name, (__bridge CFStringRef)reason, (__bridge CFStringRef)reason, nullptr, 0, nullptr, &screen_keep_on_assertion); } } @@ -1971,7 +1971,7 @@ pos *= scale; pos -= _get_screens_origin(); // macOS native y-coordinate relative to _get_screens_origin() is negative, - // Godot expects a positive value. + // Blazium expects a positive value. pos.y *= -1; return pos; } @@ -1992,7 +1992,7 @@ pos *= scale; pos -= _get_screens_origin(); // macOS native y-coordinate relative to _get_screens_origin() is negative, - // Godot expects a positive value. + // Blazium expects a positive value. pos.y *= -1; return pos; } @@ -2009,7 +2009,7 @@ Point2i position = p_position; // macOS native y-coordinate relative to _get_screens_origin() is negative, - // Godot passes a positive value. + // Blazium passes a positive value. position.y *= -1; position += _get_screens_origin(); position /= screen_get_max_scale(); @@ -3247,7 +3247,7 @@ rect.position *= scale; rect.position -= _get_screens_origin(); // macOS native y-coordinate relative to _get_screens_origin() is negative, - // Godot expects a positive value. + // Blazium expects a positive value. rect.position.y *= -1; return rect; } diff --git a/platform/macos/doc_classes/EditorExportPlatformMacOS.xml b/platform/macos/doc_classes/EditorExportPlatformMacOS.xml index 34ad52bbf615..120bb0502985 100644 --- a/platform/macos/doc_classes/EditorExportPlatformMacOS.xml +++ b/platform/macos/doc_classes/EditorExportPlatformMacOS.xml @@ -7,7 +7,7 @@ $DOCS_URL/tutorials/export/exporting_for_macos.html - $DOCS_URL/tutorials//export/running_on_macos.html + $DOCS_URL/tutorials//export/running_on_macos.html diff --git a/platform/macos/export/export_plugin.cpp b/platform/macos/export/export_plugin.cpp index 057fb4ec1653..2fe166809ed3 100644 --- a/platform/macos/export/export_plugin.cpp +++ b/platform/macos/export/export_plugin.cpp @@ -902,7 +902,7 @@ void EditorExportPlatformMacOS::_fix_plist(const Ref &p_pres } /** - * If we're running the macOS version of the Godot editor we'll: + * If we're running the macOS version of the Blazium editor we'll: * - export our application bundle to a temporary folder * - attempt to code sign it * - and then wrap it up in a DMG diff --git a/platform/macos/joypad_macos.mm b/platform/macos/joypad_macos.mm index beb32d9129c8..f42957af34a2 100644 --- a/platform/macos/joypad_macos.mm +++ b/platform/macos/joypad_macos.mm @@ -340,7 +340,7 @@ - (void)addMacOSJoypad:(GCController *)controller { controller.playerIndex = [self getFreePlayerIndex]; } - // Tell Godot about our new controller. + // Tell Blazium about our new controller. Input::get_singleton()->joy_connection_changed(joy_id, true, String::utf8([controller.vendorName UTF8String])); Joypad *joypad = [[Joypad alloc] init:controller]; @@ -380,7 +380,7 @@ - (void)controllerWasDisconnected:(NSNotification *)notification { NSArray *keys = [self getAllKeysForController:controller]; for (NSNumber *key in keys) { - // Tell Godot this joystick is no longer there. + // Tell Blazium this joystick is no longer there. int joy_id = [key intValue]; Input::get_singleton()->joy_connection_changed(joy_id, false, ""); diff --git a/platform/macos/key_mapping_macos.mm b/platform/macos/key_mapping_macos.mm index b5e72048e713..838a60fb3206 100644 --- a/platform/macos/key_mapping_macos.mm +++ b/platform/macos/key_mapping_macos.mm @@ -342,7 +342,7 @@ return numpad_keys.has(p_key); } -// Translates a macOS keycode to a Godot keycode. +// Translates a macOS keycode to a Blazium keycode. Key KeyMappingMacOS::translate_key(unsigned int p_key) { const Key *key = keysym_map.getptr(p_key); if (key) { @@ -351,7 +351,7 @@ return Key::NONE; } -// Translates a Godot keycode back to a macOS keycode. +// Translates a Blazium keycode back to a macOS keycode. unsigned int KeyMappingMacOS::unmap_key(Key p_key) { const unsigned int *key = keysym_map_inv.getptr(p_key); if (key) { @@ -411,7 +411,7 @@ } } -// Translates a macOS keycode to a Godot key location. +// Translates a macOS keycode to a Blazium key location. KeyLocation KeyMappingMacOS::translate_location(unsigned int p_key) { const KeyLocation *location = location_map.getptr(p_key); if (location) { diff --git a/platform/macos/native_menu_macos.mm b/platform/macos/native_menu_macos.mm index 802d58dc2692..dbffce4dfaf3 100644 --- a/platform/macos/native_menu_macos.mm +++ b/platform/macos/native_menu_macos.mm @@ -288,7 +288,7 @@ if (ds) { Point2i position = p_position; // macOS native y-coordinate relative to _get_screens_origin() is negative, - // Godot passes a positive value. + // Blazium passes a positive value. position.y *= -1; position += ds->_get_screens_origin(); position /= ds->screen_get_max_scale(); diff --git a/platform/web/SCsub b/platform/web/SCsub index e81f2ec51600..e09c070a3d7a 100644 --- a/platform/web/SCsub +++ b/platform/web/SCsub @@ -77,7 +77,7 @@ if env["dlink_enabled"]: # The main emscripten runtime, with exported standard libraries. sys = sys_env.Program(build_targets, ["web_runtime.cpp"]) - # The side library, containing all Godot code. + # The side library, containing all Blazium code. wasm = env.add_program("#bin/godot.side${PROGSUFFIX}.wasm", web_files) build = sys + [wasm[0]] else: diff --git a/platform/web/detect.py b/platform/web/detect.py index bf75c2f9fcf3..f7a3a3ce02e6 100644 --- a/platform/web/detect.py +++ b/platform/web/detect.py @@ -32,7 +32,7 @@ def get_opts(): return [ ("initial_memory", "Initial WASM memory (in MiB)", 32), - # Matches default values from before Emscripten 3.1.27. New defaults are too low for Godot. + # Matches default values from before Emscripten 3.1.27. New defaults are too low for Blazium. ("stack_size", "WASM stack size (in KiB)", 5120), ("default_pthread_stack_size", "WASM pthread default stack size (in KiB)", 2048), BoolVariable("use_assertions", "Use Emscripten runtime assertions", False), @@ -199,6 +199,14 @@ def configure(env: "SConsEnvironment"): cc_version = get_compiler_version(env) cc_semver = (cc_version["major"], cc_version["minor"], cc_version["patch"]) +<<<<<<< HEAD +======= + # Minimum emscripten requirements. + if cc_semver < (3, 1, 62): + print_error("The minimum emscripten version to build Blazium is 3.1.62, detected: %s.%s.%s" % cc_semver) + sys.exit(255) + +>>>>>>> a534a98048 (Alot of rebranding, check for errors please) env.Prepend(CPPPATH=["#platform/web"]) env.Append(CPPDEFINES=["WEB_ENABLED", "UNIX_ENABLED"]) @@ -278,8 +286,8 @@ def configure(env: "SConsEnvironment"): # Reduce code size by generating less support code (e.g. skip NodeJS support). env.Append(LINKFLAGS=["-sENVIRONMENT=web,worker"]) - # Wrap the JavaScript support code around a closure named Godot. - env.Append(LINKFLAGS=["-sMODULARIZE=1", "-sEXPORT_NAME='Godot'"]) + # Wrap the JavaScript support code around a closure named Blazium. + env.Append(LINKFLAGS=["-sMODULARIZE=1", "-sEXPORT_NAME='Blazium'"]) # Force long jump mode to 'wasm' env.Append(CCFLAGS=["-sSUPPORT_LONGJMP='wasm'"]) diff --git a/platform/web/display_server_web.cpp b/platform/web/display_server_web.cpp index 4e55cc137a32..9519e25aedc5 100644 --- a/platform/web/display_server_web.cpp +++ b/platform/web/display_server_web.cpp @@ -901,7 +901,7 @@ void DisplayServerWeb::process_joypads() { } for (int b = 0; b < s_btns_num; b++) { // Buttons 6 and 7 in the standard mapping need to be - // axis to be handled as JoyAxis::TRIGGER by Godot. + // axis to be handled as JoyAxis::TRIGGER by Blazium. if (s_standard && (b == 6)) { input->joy_axis(idx, JoyAxis::TRIGGER_LEFT, s_btns[b]); } else if (s_standard && (b == 7)) { diff --git a/platform/web/doc_classes/EditorExportPlatformWeb.xml b/platform/web/doc_classes/EditorExportPlatformWeb.xml index 755308de9a9e..82dd4f423baf 100644 --- a/platform/web/doc_classes/EditorExportPlatformWeb.xml +++ b/platform/web/doc_classes/EditorExportPlatformWeb.xml @@ -5,7 +5,7 @@ The Web exporter customizes how a web build is handled. In the editor's "Export" window, it is created when adding a new "Web" preset. - [b]Note:[/b] Godot on Web is rendered inside a [code]<canvas>[/code] tag. Normally, the canvas cannot be positioned or resized manually, but otherwise acts as the main [Window] of the application. + [b]Note:[/b] Blazium on Web is rendered inside a [code]<canvas>[/code] tag. Normally, the canvas cannot be positioned or resized manually, but otherwise acts as the main [Window] of the application. $DOCS_URL/tutorials/export/exporting_for_web.html @@ -19,7 +19,7 @@ File path to the custom export template used for release builds. If left empty, the default template is used. - Determines how the canvas should be resized by Godot. + Determines how the canvas should be resized by Blazium. - [b]None:[/b] The canvas is not automatically resized. - [b]Project:[/b] The size of the canvas is dependent on the [ProjectSettings]. - [b]Adaptive:[/b] The canvas is automatically resized to fit as much of the web page as possible. diff --git a/platform/web/emscripten_helpers.py b/platform/web/emscripten_helpers.py index 8fcabb21c74e..60dbd1a17855 100644 --- a/platform/web/emscripten_helpers.py +++ b/platform/web/emscripten_helpers.py @@ -64,7 +64,7 @@ def create_template_zip(env, js, wasm, worker, side): out_files.append(zip_dir.File(binary_name + ".worker.js")) # Dynamic linking (extensions) specific. if env["dlink_enabled"]: - in_files.append(side) # Side wasm (contains the actual Godot code). + in_files.append(side) # Side wasm (contains the actual Blazium code). out_files.append(zip_dir.File(binary_name + ".side.wasm")) service_worker = "#misc/dist/html/service-worker.js" diff --git a/platform/web/eslint.config.cjs b/platform/web/eslint.config.cjs index 8913a738f635..03d0af032ef7 100644 --- a/platform/web/eslint.config.cjs +++ b/platform/web/eslint.config.cjs @@ -7,7 +7,7 @@ const pluginReference = require('eslint-plugin-html'); const stylistic = require('@stylistic/eslint-plugin'); if (process && process.env && process.env.npm_command && !fs.existsSync('./platform/web/eslint.config.cjs')) { - throw Error('eslint must be run from the Godot project root folder'); + throw Error('eslint must be run from the Blazium project root folder'); } const emscriptenGlobals = { diff --git a/platform/web/export/export_plugin.cpp b/platform/web/export/export_plugin.cpp index d8c1b6033d0a..d86209bd2c79 100644 --- a/platform/web/export/export_plugin.cpp +++ b/platform/web/export/export_plugin.cpp @@ -217,7 +217,7 @@ Error EditorExportPlatformWeb::_add_manifest_icon(const String &p_path, const St Error EditorExportPlatformWeb::_build_pwa(const Ref &p_preset, const String p_path, const Vector &p_shared_objects) { String proj_name = GLOBAL_GET("application/config/name"); if (proj_name.is_empty()) { - proj_name = "Godot Game"; + proj_name = "Blazium Game"; } // Service worker @@ -387,7 +387,7 @@ Ref EditorExportPlatformWeb::get_logo() const { bool EditorExportPlatformWeb::has_valid_export_configuration(const Ref &p_preset, String &r_error, bool &r_missing_templates, bool p_debug) const { #ifdef MODULE_MONO_ENABLED // Don't check for additional errors, as this particular error cannot be resolved. - r_error += TTR("Exporting to Web is currently not supported in Godot 4 when using C#/.NET. Use Godot 3 to target Web with C#/Mono instead.") + "\n"; + r_error += TTR("Exporting to Web is currently not supported in Blazium 4 when using C#/.NET. Use Blazium 3 to target Web with C#/Mono instead.") + "\n"; r_error += TTR("If this project does not use C#, use a non-C# editor build to export the project.") + "\n"; return false; #else diff --git a/platform/web/js/engine/config.js b/platform/web/js/engine/config.js index 61b488cf81cb..27bc5b5ace9e 100644 --- a/platform/web/js/engine/config.js +++ b/platform/web/js/engine/config.js @@ -37,7 +37,7 @@ const InternalConfig = function (initConfig) { // eslint-disable-line no-unused- */ canvas: null, /** - * The name of the WASM file without the extension. (Set by Godot Editor export process). + * The name of the WASM file without the extension. (Set by Blazium Editor export process). * * @memberof EngineConfig * @default @@ -64,14 +64,14 @@ const InternalConfig = function (initConfig) { // eslint-disable-line no-unused- */ locale: null, /** - * The canvas resize policy determines how the canvas should be resized by Godot. + * The canvas resize policy determines how the canvas should be resized by Blazium. * - * ``0`` means Godot won't do any resizing. This is useful if you want to control the canvas size from + * ``0`` means Blazium won't do any resizing. This is useful if you want to control the canvas size from * javascript code in your template. * - * ``1`` means Godot will resize the canvas on start, and when changing window size via engine functions. + * ``1`` means Blazium will resize the canvas on start, and when changing window size via engine functions. * - * ``2`` means Godot will adapt the canvas size to match the whole browser window. + * ``2`` means Blazium will adapt the canvas size to match the whole browser window. * * @memberof EngineConfig * @type {number} @@ -134,12 +134,12 @@ const InternalConfig = function (initConfig) { // eslint-disable-line no-unused- */ fileSizes: [], /** - * A callback function for handling Godot's ``OS.execute`` calls. + * A callback function for handling Blazium's ``OS.execute`` calls. * * This is for example used in the Web Editor template to switch between project manager and editor, and for running the game. * * @callback EngineConfig.onExecute - * @param {string} path The path that Godot's wants executed. + * @param {string} path The path that Blazium's wants executed. * @param {Array.} args The arguments of the "command" to execute. */ /** @@ -148,12 +148,12 @@ const InternalConfig = function (initConfig) { // eslint-disable-line no-unused- */ onExecute: null, /** - * A callback function for being notified when the Godot instance quits. + * A callback function for being notified when the Blazium instance quits. * * **Note**: This function will not be called if the engine crashes or become unresponsive. * * @callback EngineConfig.onExit - * @param {number} status_code The status code returned by Godot on exit. + * @param {number} status_code The status code returned by Blazium on exit. */ /** * @ignore @@ -246,7 +246,7 @@ const InternalConfig = function (initConfig) { // eslint-disable-line no-unused- this.onPrint = parse('onPrint', this.onPrint); this.onProgress = parse('onProgress', this.onProgress); - // Godot config + // Blazium config this.canvas = parse('canvas', this.canvas); this.executable = parse('executable', this.executable); this.mainPack = parse('mainPack', this.mainPack); @@ -345,7 +345,7 @@ const InternalConfig = function (initConfig) { // eslint-disable-line no-unused- locale = locale.replace('-', '_'); const onExit = this.onExit; - // Godot configuration. + // Blazium configuration. return { 'canvas': this.canvas, 'canvasResizePolicy': this.canvasResizePolicy, diff --git a/platform/web/js/engine/engine.js b/platform/web/js/engine/engine.js index 04c4c44c5eee..8979d8d76c62 100644 --- a/platform/web/js/engine/engine.js +++ b/platform/web/js/engine/engine.js @@ -159,7 +159,7 @@ const Engine = (function () { } catch (e) { return Promise.reject(e); } - // Godot configuration. + // Blazium configuration. me.rtenv['initConfig'](config); // Preload GDExtension libraries. diff --git a/platform/web/js/libs/library_godot_audio.js b/platform/web/js/libs/library_godot_audio.js index 40fb0c356ca0..8f46dc628331 100644 --- a/platform/web/js/libs/library_godot_audio.js +++ b/platform/web/js/libs/library_godot_audio.js @@ -796,7 +796,7 @@ class SampleNode { } /** - * Collection of nodes to represents a Godot Engine audio bus. + * Collection of nodes to represents a Blazium Engine audio bus. * @class */ class Bus { @@ -2168,7 +2168,7 @@ const GodotAudioScript = { } } - // Let Godot process the input/output. + // Let Blazium process the input/output. onprocess(); // Write the output. diff --git a/platform/web/js/libs/library_godot_input.js b/platform/web/js/libs/library_godot_input.js index 6e3b97023dc5..74c01d229b8a 100644 --- a/platform/web/js/libs/library_godot_input.js +++ b/platform/web/js/libs/library_godot_input.js @@ -449,7 +449,7 @@ const GodotInputDragDrop = { mergeInto(LibraryManager.library, GodotInputDragDrop); /* - * Godot exposed input functions. + * Blazium exposed input functions. */ const GodotInput = { $GodotInput__deps: ['$GodotRuntime', '$GodotConfig', '$GodotEventListeners', '$GodotInputGamepads', '$GodotInputDragDrop', '$GodotIME'], diff --git a/platform/web/js/libs/library_godot_os.js b/platform/web/js/libs/library_godot_os.js index 568212275ba5..63035ded7bb0 100644 --- a/platform/web/js/libs/library_godot_os.js +++ b/platform/web/js/libs/library_godot_os.js @@ -341,7 +341,7 @@ const GodotOS = { godot_js_os_hw_concurrency_get__proxy: 'sync', godot_js_os_hw_concurrency_get__sig: 'i', godot_js_os_hw_concurrency_get: function () { - // TODO Godot core needs fixing to avoid spawning too many threads (> 24). + // TODO Blazium core needs fixing to avoid spawning too many threads (> 24). const concurrency = navigator.hardwareConcurrency || 1; return concurrency < 2 ? concurrency : 2; }, @@ -369,7 +369,7 @@ autoAddDeps(GodotOS, '$GodotOS'); mergeInto(LibraryManager.library, GodotOS); /* - * Godot event listeners. + * Blazium event listeners. * Keeps track of registered event listeners so it can remove them on shutdown. */ const GodotEventListeners = { diff --git a/platform/web/package.json b/platform/web/package.json index 588af2ff3b6a..856e32413d02 100644 --- a/platform/web/package.json +++ b/platform/web/package.json @@ -2,8 +2,8 @@ "name": "godot", "private": true, "version": "1.0.0", - "description": "Development and linting setup for Godot's Web platform code", - "author": "Godot Engine contributors", + "description": "Development and linting setup for Blazium's Web platform code", + "author": "Blazium & Godot Engine contributors", "license": "MIT", "scripts": { "docs": "jsdoc --template js/jsdoc2rst/ js/engine/engine.js js/engine/config.js js/engine/features.js --destination ''", diff --git a/platform/windows/detect.py b/platform/windows/detect.py index b4830c5908ef..569197708a21 100644 --- a/platform/windows/detect.py +++ b/platform/windows/detect.py @@ -54,7 +54,7 @@ def try_cmd(test, prefix, arch): def can_build(): if os.name == "nt": # Building natively on Windows - # If VCINSTALLDIR is set in the OS environ, use traditional Godot logic to set up MSVC + # If VCINSTALLDIR is set in the OS environ, use traditional Blazium logic to set up MSVC if os.getenv("VCINSTALLDIR"): # MSVC, manual setup return True @@ -170,7 +170,7 @@ def get_opts(): # Direct3D 12 SDK dependencies folder. d3d12_deps_folder = os.getenv("LOCALAPPDATA") if d3d12_deps_folder: - d3d12_deps_folder = os.path.join(d3d12_deps_folder, "Godot", "build_deps") + d3d12_deps_folder = os.path.join(d3d12_deps_folder, "Blazium", "build_deps") else: # Cross-compiling, the deps install script puts things in `bin`. # Getting an absolute path to it is a bit hacky in Python. @@ -312,7 +312,7 @@ def setup_msvc_auto(env: "SConsEnvironment"): # Our x86_64 and arm64 are the same, and we need to map the 32-bit # architectures to other names since MSVC isn't as explicit. # The rest we don't need to worry about because they are - # aliases or aren't supported by Godot (itanium & ia64). + # aliases or aren't supported by Blazium (itanium & ia64). msvc_arch_aliases = {"x86_32": "x86", "arm32": "arm"} if env["arch"] in msvc_arch_aliases.keys(): env["TARGET_ARCH"] = msvc_arch_aliases[env["arch"]] diff --git a/platform/windows/display_server_windows.cpp b/platform/windows/display_server_windows.cpp index 74d651d495ba..ff3744f1f41b 100644 --- a/platform/windows/display_server_windows.cpp +++ b/platform/windows/display_server_windows.cpp @@ -679,7 +679,7 @@ Error DisplayServerWindows::_file_dialog_with_options_show(const String &p_title } String appname; if (Engine::get_singleton()->is_editor_hint()) { - appname = "Godot.GodotEditor." + String(VERSION_BRANCH); + appname = "Blazium.GodotEditor." + String(VERSION_BRANCH); } else { String name = GLOBAL_GET("application/config/name"); String version = GLOBAL_GET("application/config/version"); @@ -693,7 +693,7 @@ Error DisplayServerWindows::_file_dialog_with_options_show(const String &p_title } } clean_app_name = clean_app_name.substr(0, 120 - version.length()).trim_suffix("."); - appname = "Godot." + clean_app_name + "." + version; + appname = "Blazium." + clean_app_name + "." + version; } FileDialogData *fd = memnew(FileDialogData); @@ -1388,7 +1388,7 @@ void DisplayServerWindows::screen_set_keep_on(bool p_enable) { } if (p_enable) { - const String reason = "Godot Engine running with display/window/energy_saving/keep_screen_on = true"; + const String reason = "Blazium Engine running with display/window/energy_saving/keep_screen_on = true"; Char16String reason_utf16 = reason.utf16(); REASON_CONTEXT context; @@ -3013,7 +3013,7 @@ Key DisplayServerWindows::keyboard_get_keycode_from_physical(Key p_keycode) cons // Unlike a similar Linux/BSD check which matches full Latin-1 range, // we limit these to ASCII to fix some layouts, including Arabic ones if (char_code >= 32 && char_code <= 127) { - // Godot uses 'braces' instead of 'brackets' + // Blazium uses 'braces' instead of 'brackets' if (char_code == (unsigned int)Key::BRACKETLEFT || char_code == (unsigned int)Key::BRACKETRIGHT) { char_code += 32; } @@ -5725,7 +5725,7 @@ DisplayServer::WindowID DisplayServerWindows::_create_window(WindowMode p_mode, PROPVARIANT val; String appname; if (Engine::get_singleton()->is_editor_hint()) { - appname = "Godot.GodotEditor." + String(VERSION_FULL_CONFIG); + appname = "Blazium.GodotEditor." + String(VERSION_FULL_CONFIG); } else { String name = GLOBAL_GET("application/config/name"); String version = GLOBAL_GET("application/config/version"); @@ -5739,7 +5739,7 @@ DisplayServer::WindowID DisplayServerWindows::_create_window(WindowMode p_mode, } } clean_app_name = clean_app_name.substr(0, 120 - version.length()).trim_suffix("."); - appname = "Godot." + clean_app_name + "." + version; + appname = "Blazium." + clean_app_name + "." + version; } InitPropVariantFromString((PCWSTR)appname.utf16().get_data(), &val); prop_store->SetValue(PKEY_AppUserModel_ID, val); @@ -6247,7 +6247,7 @@ DisplayServerWindows::DisplayServerWindows(const String &p_rendering_driver, Win String appname; if (Engine::get_singleton()->is_editor_hint()) { - appname = "Godot.GodotEditor." + String(VERSION_FULL_CONFIG); + appname = "Blazium.GodotEditor." + String(VERSION_FULL_CONFIG); } else { String name = GLOBAL_GET("application/config/name"); String version = GLOBAL_GET("application/config/version"); @@ -6261,7 +6261,7 @@ DisplayServerWindows::DisplayServerWindows(const String &p_rendering_driver, Win } } clean_app_name = clean_app_name.substr(0, 120 - version.length()).trim_suffix("."); - appname = "Godot." + clean_app_name + "." + version; + appname = "Blazium." + clean_app_name + "." + version; #ifndef TOOLS_ENABLED // Set for exported projects only. diff --git a/platform/windows/godot_res.rc b/platform/windows/godot_res.rc index 86191ad9d98c..26e6b2853717 100644 --- a/platform/windows/godot_res.rc +++ b/platform/windows/godot_res.rc @@ -17,12 +17,12 @@ BEGIN BEGIN BLOCK "040904b0" BEGIN - VALUE "CompanyName", "Godot Engine" + VALUE "CompanyName", "Blazium Engine" VALUE "FileDescription", VERSION_NAME VALUE "FileVersion", VERSION_NUMBER VALUE "ProductName", VERSION_NAME VALUE "Licence", "MIT" - VALUE "LegalCopyright", "(c) 2007-present Juan Linietsky, Ariel Manzur and Godot Engine contributors" + VALUE "LegalCopyright", "(c) 2024-present Blazium Engine & 2007-present Juan Linietsky, Ariel Manzur and Godot Engine contributors" VALUE "Info", "https://godotengine.org" VALUE "ProductVersion", VERSION_FULL_BUILD END diff --git a/platform/windows/godot_res_wrap.rc b/platform/windows/godot_res_wrap.rc index 27ad26cbc549..aa5c4fed8075 100644 --- a/platform/windows/godot_res_wrap.rc +++ b/platform/windows/godot_res_wrap.rc @@ -12,12 +12,12 @@ BEGIN BEGIN BLOCK "040904b0" BEGIN - VALUE "CompanyName", "Godot Engine" + VALUE "CompanyName", "Blazium Engine" VALUE "FileDescription", VERSION_NAME " (Console)" VALUE "FileVersion", VERSION_NUMBER VALUE "ProductName", VERSION_NAME " (Console)" VALUE "Licence", "MIT" - VALUE "LegalCopyright", "(c) 2007-present Juan Linietsky, Ariel Manzur and Godot Engine contributors" + VALUE "LegalCopyright", "(c) 2024-present Blazium Engine & 2007-present Juan Linietsky, Ariel Manzur and Godot Engine contributors" VALUE "Info", "https://godotengine.org" VALUE "ProductVersion", VERSION_FULL_BUILD END diff --git a/platform/windows/key_mapping_windows.cpp b/platform/windows/key_mapping_windows.cpp index 20905d0fe90f..d3cc3aea8d81 100644 --- a/platform/windows/key_mapping_windows.cpp +++ b/platform/windows/key_mapping_windows.cpp @@ -32,7 +32,7 @@ #include "core/templates/hash_map.h" -// This provides translation from Windows virtual key codes to Godot and back. +// This provides translation from Windows virtual key codes to Blazium and back. // See WinUser.h and the below for documentation: // https://docs.microsoft.com/en-us/windows/win32/inputdev/virtual-key-codes diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp index 7572912cf6fd..7b17f80d947a 100644 --- a/platform/windows/os_windows.cpp +++ b/platform/windows/os_windows.cpp @@ -210,7 +210,7 @@ void OS_Windows::initialize() { process_map = memnew((HashMap)); - // Add current Godot PID to the list of known PIDs + // Add current Blazium PID to the list of known PIDs ProcessInfo current_pi = {}; PROCESS_INFORMATION current_pi_pi = {}; current_pi.pi = current_pi_pi; diff --git a/scene/2d/light_2d.cpp b/scene/2d/light_2d.cpp index 50c5873781e7..fb1d5a28a657 100644 --- a/scene/2d/light_2d.cpp +++ b/scene/2d/light_2d.cpp @@ -442,7 +442,7 @@ real_t PointLight2D::get_texture_scale() const { #ifndef DISABLE_DEPRECATED bool PointLight2D::_set(const StringName &p_name, const Variant &p_value) { - if (p_name == "mode" && p_value.is_num()) { // Compatibility with Godot 3.x. + if (p_name == "mode" && p_value.is_num()) { // Compatibility with Blazium 3.x. set_blend_mode((BlendMode)(int)p_value); return true; } diff --git a/scene/2d/navigation_agent_2d.cpp b/scene/2d/navigation_agent_2d.cpp index d0fae611d88a..3be3485aebcf 100644 --- a/scene/2d/navigation_agent_2d.cpp +++ b/scene/2d/navigation_agent_2d.cpp @@ -178,7 +178,7 @@ void NavigationAgent2D::_bind_methods() { } #ifndef DISABLE_DEPRECATED -// Compatibility with Godot 4.0 beta 10 or below. +// Compatibility with Blazium 4.0 beta 10 or below. // Functions in block below all renamed or replaced in 4.0 beta 1X avoidance rework. bool NavigationAgent2D::_set(const StringName &p_name, const Variant &p_value) { if (p_name == "time_horizon") { diff --git a/scene/2d/touch_screen_button.cpp b/scene/2d/touch_screen_button.cpp index ff409272c549..99acca379df1 100644 --- a/scene/2d/touch_screen_button.cpp +++ b/scene/2d/touch_screen_button.cpp @@ -370,10 +370,10 @@ bool TouchScreenButton::is_passby_press_enabled() const { #ifndef DISABLE_DEPRECATED bool TouchScreenButton::_set(const StringName &p_name, const Variant &p_value) { - if (p_name == CoreStringName(normal)) { // Compatibility with Godot 3.x. + if (p_name == CoreStringName(normal)) { // Compatibility with Blazium 3.x. set_texture_normal(p_value); return true; - } else if (p_name == SceneStringName(pressed)) { // Compatibility with Godot 3.x. + } else if (p_name == SceneStringName(pressed)) { // Compatibility with Blazium 3.x. set_texture_pressed(p_value); return true; } diff --git a/scene/3d/decal.cpp b/scene/3d/decal.cpp index 8702b1d3da0d..310462e638d3 100644 --- a/scene/3d/decal.cpp +++ b/scene/3d/decal.cpp @@ -259,7 +259,7 @@ void Decal::_bind_methods() { #ifndef DISABLE_DEPRECATED bool Decal::_set(const StringName &p_name, const Variant &p_value) { - if (p_name == "extents") { // Compatibility with Godot 3.x. + if (p_name == "extents") { // Compatibility with Blazium 3.x. set_size((Vector3)p_value * 2); return true; } @@ -267,7 +267,7 @@ bool Decal::_set(const StringName &p_name, const Variant &p_value) { } bool Decal::_get(const StringName &p_name, Variant &r_property) const { - if (p_name == "extents") { // Compatibility with Godot 3.x. + if (p_name == "extents") { // Compatibility with Blazium 3.x. r_property = size / 2; return true; } diff --git a/scene/3d/fog_volume.cpp b/scene/3d/fog_volume.cpp index 195074ba2f7b..27e0af4593aa 100644 --- a/scene/3d/fog_volume.cpp +++ b/scene/3d/fog_volume.cpp @@ -55,7 +55,7 @@ void FogVolume::_validate_property(PropertyInfo &p_property) const { #ifndef DISABLE_DEPRECATED bool FogVolume::_set(const StringName &p_name, const Variant &p_value) { - if (p_name == "extents") { // Compatibility with Godot 3.x. + if (p_name == "extents") { // Compatibility with Blazium 3.x. set_size((Vector3)p_value * 2); return true; } @@ -63,7 +63,7 @@ bool FogVolume::_set(const StringName &p_name, const Variant &p_value) { } bool FogVolume::_get(const StringName &p_name, Variant &r_property) const { - if (p_name == "extents") { // Compatibility with Godot 3.x. + if (p_name == "extents") { // Compatibility with Blazium 3.x. r_property = size / 2; return true; } diff --git a/scene/3d/gpu_particles_collision_3d.cpp b/scene/3d/gpu_particles_collision_3d.cpp index 9791f23bc357..143aba7a03b9 100644 --- a/scene/3d/gpu_particles_collision_3d.cpp +++ b/scene/3d/gpu_particles_collision_3d.cpp @@ -103,7 +103,7 @@ void GPUParticlesCollisionBox3D::_bind_methods() { #ifndef DISABLE_DEPRECATED bool GPUParticlesCollisionBox3D::_set(const StringName &p_name, const Variant &p_value) { - if (p_name == "extents") { // Compatibility with Godot 3.x. + if (p_name == "extents") { // Compatibility with Blazium 3.x. set_size((Vector3)p_value * 2); return true; } @@ -111,7 +111,7 @@ bool GPUParticlesCollisionBox3D::_set(const StringName &p_name, const Variant &p } bool GPUParticlesCollisionBox3D::_get(const StringName &p_name, Variant &r_property) const { - if (p_name == "extents") { // Compatibility with Godot 3.x. + if (p_name == "extents") { // Compatibility with Blazium 3.x. r_property = size / 2; return true; } @@ -568,7 +568,7 @@ void GPUParticlesCollisionSDF3D::_bind_methods() { #ifndef DISABLE_DEPRECATED bool GPUParticlesCollisionSDF3D::_set(const StringName &p_name, const Variant &p_value) { - if (p_name == "extents") { // Compatibility with Godot 3.x. + if (p_name == "extents") { // Compatibility with Blazium 3.x. set_size((Vector3)p_value * 2); return true; } @@ -576,7 +576,7 @@ bool GPUParticlesCollisionSDF3D::_set(const StringName &p_name, const Variant &p } bool GPUParticlesCollisionSDF3D::_get(const StringName &p_name, Variant &r_property) const { - if (p_name == "extents") { // Compatibility with Godot 3.x. + if (p_name == "extents") { // Compatibility with Blazium 3.x. r_property = size / 2; return true; } @@ -743,7 +743,7 @@ void GPUParticlesCollisionHeightField3D::_bind_methods() { #ifndef DISABLE_DEPRECATED bool GPUParticlesCollisionHeightField3D::_set(const StringName &p_name, const Variant &p_value) { - if (p_name == "extents") { // Compatibility with Godot 3.x. + if (p_name == "extents") { // Compatibility with Blazium 3.x. set_size((Vector3)p_value * 2); return true; } @@ -751,7 +751,7 @@ bool GPUParticlesCollisionHeightField3D::_set(const StringName &p_name, const Va } bool GPUParticlesCollisionHeightField3D::_get(const StringName &p_name, Variant &r_property) const { - if (p_name == "extents") { // Compatibility with Godot 3.x. + if (p_name == "extents") { // Compatibility with Blazium 3.x. r_property = size / 2; return true; } @@ -920,7 +920,7 @@ void GPUParticlesAttractorBox3D::_bind_methods() { #ifndef DISABLE_DEPRECATED bool GPUParticlesAttractorBox3D::_set(const StringName &p_name, const Variant &p_value) { - if (p_name == "extents") { // Compatibility with Godot 3.x. + if (p_name == "extents") { // Compatibility with Blazium 3.x. set_size((Vector3)p_value * 2); return true; } @@ -928,7 +928,7 @@ bool GPUParticlesAttractorBox3D::_set(const StringName &p_name, const Variant &p } bool GPUParticlesAttractorBox3D::_get(const StringName &p_name, Variant &r_property) const { - if (p_name == "extents") { // Compatibility with Godot 3.x. + if (p_name == "extents") { // Compatibility with Blazium 3.x. r_property = size / 2; return true; } @@ -972,7 +972,7 @@ void GPUParticlesAttractorVectorField3D::_bind_methods() { #ifndef DISABLE_DEPRECATED bool GPUParticlesAttractorVectorField3D::_set(const StringName &p_name, const Variant &p_value) { - if (p_name == "extents") { // Compatibility with Godot 3.x. + if (p_name == "extents") { // Compatibility with Blazium 3.x. set_size((Vector3)p_value * 2); return true; } @@ -980,7 +980,7 @@ bool GPUParticlesAttractorVectorField3D::_set(const StringName &p_name, const Va } bool GPUParticlesAttractorVectorField3D::_get(const StringName &p_name, Variant &r_property) const { - if (p_name == "extents") { // Compatibility with Godot 3.x. + if (p_name == "extents") { // Compatibility with Blazium 3.x. r_property = size / 2; return true; } diff --git a/scene/3d/navigation_agent_3d.cpp b/scene/3d/navigation_agent_3d.cpp index 5bbb724e2fa0..07e353a582f3 100644 --- a/scene/3d/navigation_agent_3d.cpp +++ b/scene/3d/navigation_agent_3d.cpp @@ -189,7 +189,7 @@ void NavigationAgent3D::_bind_methods() { } #ifndef DISABLE_DEPRECATED -// Compatibility with Godot 4.0 beta 10 or below. +// Compatibility with Blazium 4.0 beta 10 or below. // Functions in block below all renamed or replaced in 4.0 beta 1X avoidance rework. bool NavigationAgent3D::_set(const StringName &p_name, const Variant &p_value) { if (p_name == "time_horizon") { diff --git a/scene/3d/reflection_probe.cpp b/scene/3d/reflection_probe.cpp index b6ec55286dd0..cee0362c1117 100644 --- a/scene/3d/reflection_probe.cpp +++ b/scene/3d/reflection_probe.cpp @@ -268,7 +268,7 @@ void ReflectionProbe::_bind_methods() { #ifndef DISABLE_DEPRECATED bool ReflectionProbe::_set(const StringName &p_name, const Variant &p_value) { - if (p_name == "extents") { // Compatibility with Godot 3.x. + if (p_name == "extents") { // Compatibility with Blazium 3.x. set_size((Vector3)p_value * 2); return true; } @@ -276,7 +276,7 @@ bool ReflectionProbe::_set(const StringName &p_name, const Variant &p_value) { } bool ReflectionProbe::_get(const StringName &p_name, Variant &r_property) const { - if (p_name == "extents") { // Compatibility with Godot 3.x. + if (p_name == "extents") { // Compatibility with Blazium 3.x. r_property = size / 2; return true; } diff --git a/scene/3d/voxel_gi.cpp b/scene/3d/voxel_gi.cpp index 80ff176a98d0..1375b5beb471 100644 --- a/scene/3d/voxel_gi.cpp +++ b/scene/3d/voxel_gi.cpp @@ -238,7 +238,7 @@ void VoxelGIData::_bind_methods() { #ifndef DISABLE_DEPRECATED bool VoxelGI::_set(const StringName &p_name, const Variant &p_value) { - if (p_name == "extents") { // Compatibility with Godot 3.x. + if (p_name == "extents") { // Compatibility with Blazium 3.x. set_size((Vector3)p_value * 2); return true; } @@ -246,7 +246,7 @@ bool VoxelGI::_set(const StringName &p_name, const Variant &p_value) { } bool VoxelGI::_get(const StringName &p_name, Variant &r_property) const { - if (p_name == "extents") { // Compatibility with Godot 3.x. + if (p_name == "extents") { // Compatibility with Blazium 3.x. r_property = size / 2; return true; } diff --git a/scene/3d/xr_body_modifier_3d.cpp b/scene/3d/xr_body_modifier_3d.cpp index cf73882a7b54..dbac57f064bf 100644 --- a/scene/3d/xr_body_modifier_3d.cpp +++ b/scene/3d/xr_body_modifier_3d.cpp @@ -83,7 +83,7 @@ XRBodyModifier3D::BoneUpdate XRBodyModifier3D::get_bone_update() const { } void XRBodyModifier3D::_get_joint_data() { - // Table of Godot Humanoid bone names. + // Table of Blazium Humanoid bone names. static const String bone_names[XRBodyTracker::JOINT_MAX] = { "Root", // XRBodyTracker::JOINT_ROOT diff --git a/scene/SCsub b/scene/SCsub index b4b2d6dd0a42..020e4ff3a7a2 100644 --- a/scene/SCsub +++ b/scene/SCsub @@ -4,7 +4,7 @@ Import("env") env.scene_sources = [] -# Godot source files +# Blazium source files env.add_source_files(env.scene_sources, "*.cpp") # Chain load SCsubs diff --git a/scene/animation/SCsub b/scene/animation/SCsub index d0aa0bc8aa65..5a3c36729f5b 100644 --- a/scene/animation/SCsub +++ b/scene/animation/SCsub @@ -10,7 +10,7 @@ env_thirdparty = env.Clone() env_thirdparty.disable_warnings() env.scene_sources += thirdparty_obj -# Godot source files +# Blazium source files scene_obj = [] diff --git a/scene/gui/graph_edit.cpp b/scene/gui/graph_edit.cpp index 60b3e371a0a6..20d2c15ff6ba 100644 --- a/scene/gui/graph_edit.cpp +++ b/scene/gui/graph_edit.cpp @@ -376,7 +376,7 @@ void GraphEdit::_update_scroll_offset() { set_block_minimum_size_adjust(false); awaiting_scroll_offset_update = false; - // In Godot, signals on value change are avoided by convention. + // In Blazium, signals on value change are avoided by convention. if (!setting_scroll_offset) { emit_signal(SNAME("scroll_offset_changed"), get_scroll_offset()); } diff --git a/scene/main/node.h b/scene/main/node.h index ee195ddef965..f94c2c528f94 100644 --- a/scene/main/node.h +++ b/scene/main/node.h @@ -814,7 +814,7 @@ Error Node::rpc_id(int p_peer_id, const StringName &p_method, VarArgs... p_args) #endif // Add these macro to your class's 'get_configuration_warnings' function to have warnings show up in the scene tree inspector. -#define DEPRECATED_NODE_WARNING warnings.push_back(RTR("This node is marked as deprecated and will be removed in future versions.\nPlease check the Godot documentation for information about migration.")); +#define DEPRECATED_NODE_WARNING warnings.push_back(RTR("This node is marked as deprecated and will be removed in future versions.\nPlease check the Blazium documentation for information about migration.")); #define EXPERIMENTAL_NODE_WARNING warnings.push_back(RTR("This node is marked as experimental and may be subject to removal or major changes in future versions.")); #endif // NODE_H diff --git a/scene/main/scene_tree.h b/scene/main/scene_tree.h index 6f0a61ec51ed..ea3000211e23 100644 --- a/scene/main/scene_tree.h +++ b/scene/main/scene_tree.h @@ -282,13 +282,13 @@ class SceneTree : public MainLoop { void notify_group_flags(uint32_t p_call_flags, const StringName &p_group, int p_notification); void set_group_flags(uint32_t p_call_flags, const StringName &p_group, const String &p_name, const Variant &p_value); - // `notify_group()` is immediate by default since Godot 4.0. + // `notify_group()` is immediate by default since Blazium 4.0. void notify_group(const StringName &p_group, int p_notification); - // `set_group()` is immediate by default since Godot 4.0. + // `set_group()` is immediate by default since Blazium 4.0. void set_group(const StringName &p_group, const String &p_name, const Variant &p_value); template - // `call_group()` is immediate by default since Godot 4.0. + // `call_group()` is immediate by default since Blazium 4.0. void call_group(const StringName &p_group, const StringName &p_function, VarArgs... p_args) { Variant args[sizeof...(p_args) + 1] = { p_args..., Variant() }; // +1 makes sure zero sized arrays are also supported. const Variant *argptrs[sizeof...(p_args) + 1]; diff --git a/scene/resources/2d/rectangle_shape_2d.cpp b/scene/resources/2d/rectangle_shape_2d.cpp index 65b165329302..5ebd90e55c67 100644 --- a/scene/resources/2d/rectangle_shape_2d.cpp +++ b/scene/resources/2d/rectangle_shape_2d.cpp @@ -39,7 +39,7 @@ void RectangleShape2D::_update_shape() { #ifndef DISABLE_DEPRECATED bool RectangleShape2D::_set(const StringName &p_name, const Variant &p_value) { - if (p_name == "extents") { // Compatibility with Godot 3.x. + if (p_name == "extents") { // Compatibility with Blazium 3.x. // Convert to `size`, twice as big. set_size((Size2)p_value * 2); return true; @@ -48,7 +48,7 @@ bool RectangleShape2D::_set(const StringName &p_name, const Variant &p_value) { } bool RectangleShape2D::_get(const StringName &p_name, Variant &r_property) const { - if (p_name == "extents") { // Compatibility with Godot 3.x. + if (p_name == "extents") { // Compatibility with Blazium 3.x. // Convert to `extents`, half as big. r_property = size / 2; return true; diff --git a/scene/resources/2d/skeleton/skeleton_modification_2d_physicalbones.cpp b/scene/resources/2d/skeleton/skeleton_modification_2d_physicalbones.cpp index 001000fa17ba..01cf1335cc6d 100644 --- a/scene/resources/2d/skeleton/skeleton_modification_2d_physicalbones.cpp +++ b/scene/resources/2d/skeleton/skeleton_modification_2d_physicalbones.cpp @@ -36,7 +36,7 @@ bool SkeletonModification2DPhysicalBones::_set(const StringName &p_path, const V String path = p_path; #ifdef TOOLS_ENABLED - // Exposes a way to fetch the PhysicalBone2D nodes from the Godot editor. + // Exposes a way to fetch the PhysicalBone2D nodes from the Blazium editor. if (is_setup) { if (Engine::get_singleton()->is_editor_hint()) { if (path.begins_with("fetch_bones")) { diff --git a/scene/resources/3d/box_shape_3d.cpp b/scene/resources/3d/box_shape_3d.cpp index 313aeb1bca48..ad4582ee626e 100644 --- a/scene/resources/3d/box_shape_3d.cpp +++ b/scene/resources/3d/box_shape_3d.cpp @@ -58,7 +58,7 @@ void BoxShape3D::_update_shape() { #ifndef DISABLE_DEPRECATED bool BoxShape3D::_set(const StringName &p_name, const Variant &p_value) { - if (p_name == "extents") { // Compatibility with Godot 3.x. + if (p_name == "extents") { // Compatibility with Blazium 3.x. // Convert to `size`, twice as big. set_size((Vector3)p_value * 2); return true; @@ -67,7 +67,7 @@ bool BoxShape3D::_set(const StringName &p_name, const Variant &p_value) { } bool BoxShape3D::_get(const StringName &p_name, Variant &r_property) const { - if (p_name == "extents") { // Compatibility with Godot 3.x. + if (p_name == "extents") { // Compatibility with Blazium 3.x. // Convert to `extents`, half as big. r_property = size / 2; return true; diff --git a/scene/resources/SCsub b/scene/resources/SCsub index 2b6aa88d2c0c..51d1418ab777 100644 --- a/scene/resources/SCsub +++ b/scene/resources/SCsub @@ -13,7 +13,7 @@ env_thirdparty.disable_warnings() env_thirdparty.add_source_files(thirdparty_obj, thirdparty_sources) env.scene_sources += thirdparty_obj -# Godot source files +# Blazium source files scene_obj = [] diff --git a/scene/resources/animation.cpp b/scene/resources/animation.cpp index e00bf569390f..a34b30f8605c 100644 --- a/scene/resources/animation.cpp +++ b/scene/resources/animation.cpp @@ -429,7 +429,7 @@ bool Animation::_set(const StringName &p_name, const Variant &p_value) { return false; } #ifndef DISABLE_DEPRECATED - } else if (prop_name == "loop" && p_value.operator bool()) { // Compatibility with Godot 3.x. + } else if (prop_name == "loop" && p_value.operator bool()) { // Compatibility with Blazium 3.x. loop_mode = Animation::LoopMode::LOOP_LINEAR; return true; #endif // DISABLE_DEPRECATED diff --git a/scene/resources/font.cpp b/scene/resources/font.cpp index 6b65ea4cfb97..f294679e2069 100644 --- a/scene/resources/font.cpp +++ b/scene/resources/font.cpp @@ -1894,7 +1894,7 @@ Error FontFile::_load_bitmap_font(const String &p_path, List *r_image_fi ERR_FAIL_V_MSG(ERR_CANT_CREATE, "Unsupported BMFont texture format."); } } else { - if ((ch[3] == 0) && (ch[0] == 4) && (ch[1] == 4) && (ch[2] == 4) && img->get_format() == Image::FORMAT_RGBA8) { // might be RGBA8 color, no outline (color part of the image should be sold white, but some apps designed for Godot 3 generate color fonts with this config) + if ((ch[3] == 0) && (ch[0] == 4) && (ch[1] == 4) && (ch[2] == 4) && img->get_format() == Image::FORMAT_RGBA8) { // might be RGBA8 color, no outline (color part of the image should be sold white, but some apps designed for Blazium 3 generate color fonts with this config) outline = 0; set_texture_image(0, Vector2i(base_size, 0), page, img); } else if ((ch[0] == 0) && (ch[1] == 0) && (ch[2] == 0) && (ch[3] == 0)) { // RGBA8 color, no outline diff --git a/scene/resources/material.cpp b/scene/resources/material.cpp index d07dee667426..b703f0f9fe06 100644 --- a/scene/resources/material.cpp +++ b/scene/resources/material.cpp @@ -3546,7 +3546,7 @@ bool StandardMaterial3D::_set(const StringName &p_name, const Variant &p_value) idx++; } - WARN_PRINT("Godot 3.x SpatialMaterial remapped parameter not found: " + String(p_name)); + WARN_PRINT("Blazium 3.x SpatialMaterial remapped parameter not found: " + String(p_name)); return true; } } diff --git a/scene/resources/particle_process_material.cpp b/scene/resources/particle_process_material.cpp index ee986f5820dc..20a122c02e02 100644 --- a/scene/resources/particle_process_material.cpp +++ b/scene/resources/particle_process_material.cpp @@ -1005,7 +1005,7 @@ void ParticleProcessMaterial::_update_shader() { code += "\n"; code += " vec3 noise_direction = get_noise_direction(TRANSFORM[3].xyz);\n"; - // Godot detects when the COLLIDED keyword is used. If it's used anywhere in the shader then Godot will generate the screen space SDF for collisions. + // Blazium detects when the COLLIDED keyword is used. If it's used anywhere in the shader then Blazium will generate the screen space SDF for collisions. // We don't need it as long as collision is disabled. Refer to GH-83744 for more info. if (collision_mode == COLLISION_RIGID) { code += " if (!COLLIDED) {\n"; diff --git a/scene/resources/surface_tool.cpp b/scene/resources/surface_tool.cpp index 3273bc3c0070..2d2163f9c27f 100644 --- a/scene/resources/surface_tool.cpp +++ b/scene/resources/surface_tool.cpp @@ -1153,7 +1153,7 @@ void SurfaceTool::mikktSetTSpaceDefault(const SMikkTSpaceContext *pContext, cons if (vtx != nullptr) { vtx->tangent = Vector3(fvTangent[0], fvTangent[1], fvTangent[2]); - vtx->binormal = Vector3(-fvBiTangent[0], -fvBiTangent[1], -fvBiTangent[2]); // for some reason these are reversed, something with the coordinate system in Godot + vtx->binormal = Vector3(-fvBiTangent[0], -fvBiTangent[1], -fvBiTangent[2]); // for some reason these are reversed, something with the coordinate system in Blazium } } diff --git a/scene/theme/default_theme.cpp b/scene/theme/default_theme.cpp index b2a3843b026e..fe01eecd7762 100644 --- a/scene/theme/default_theme.cpp +++ b/scene/theme/default_theme.cpp @@ -93,7 +93,7 @@ static Ref generate_icon(int p_index) { ERR_FAIL_COND_V_MSG(err != OK, Ref(), "Failed generating icon, unsupported or invalid SVG data in default theme."); #else // If the SVG module is disabled, we can't really display the UI well, but at least we won't crash. - // 16 pixels is used as it's the most common base size for Godot icons. + // 16 pixels is used as it's the most common base size for Blazium icons. img = Image::create_empty(Math::round(16 * scale), Math::round(16 * scale), false, Image::FORMAT_RGBA8); #endif From 6784a1f9ee7ec5ba57c9d6dca209c07e5d7e9beb Mon Sep 17 00:00:00 2001 From: Christoffer Sundbom Date: Sat, 12 Oct 2024 18:50:37 +0200 Subject: [PATCH 2/6] was an error of a merge eftover in web/detect.py --- platform/web/detect.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/platform/web/detect.py b/platform/web/detect.py index f7a3a3ce02e6..45fb1c618608 100644 --- a/platform/web/detect.py +++ b/platform/web/detect.py @@ -199,14 +199,6 @@ def configure(env: "SConsEnvironment"): cc_version = get_compiler_version(env) cc_semver = (cc_version["major"], cc_version["minor"], cc_version["patch"]) -<<<<<<< HEAD -======= - # Minimum emscripten requirements. - if cc_semver < (3, 1, 62): - print_error("The minimum emscripten version to build Blazium is 3.1.62, detected: %s.%s.%s" % cc_semver) - sys.exit(255) - ->>>>>>> a534a98048 (Alot of rebranding, check for errors please) env.Prepend(CPPPATH=["#platform/web"]) env.Append(CPPDEFINES=["WEB_ENABLED", "UNIX_ENABLED"]) From d849a296aad42c88cc2a076be42b3e74602600da Mon Sep 17 00:00:00 2001 From: Christoffer Sundbom Date: Sat, 12 Oct 2024 18:53:25 +0200 Subject: [PATCH 3/6] was another merge leftover --- platform/android/java/build.gradle | 4 ---- 1 file changed, 4 deletions(-) diff --git a/platform/android/java/build.gradle b/platform/android/java/build.gradle index a90396a7ae54..4fc9594206d3 100644 --- a/platform/android/java/build.gradle +++ b/platform/android/java/build.gradle @@ -46,7 +46,6 @@ def getSconsTaskName(String flavor, String buildType, String abi) { } /** -<<<<<<< HEAD * Copy the generated 'android_debug.apk' binary template into the Godot bin directory. * Depends on the app build task to ensure the binary is generated prior to copying. */ @@ -147,9 +146,6 @@ task copyReleaseAARToBin(type: Copy) { /** * Generate Godot gradle build template by zipping the source files from the app directory, as well -======= - * Generate Blazium gradle build template by zipping the source files from the app directory, as well ->>>>>>> a534a98048 (Alot of rebranding, check for errors please) * as the AAR files generated by 'copyDebugAAR', 'copyDevAAR' and 'copyReleaseAAR'. * The zip file also includes some gradle tools to enable gradle builds from the Blazium Editor. */ From 092d5c7bec02b5de2327b3b74eaf54a18f84fa99 Mon Sep 17 00:00:00 2001 From: Christoffer Sundbom Date: Sat, 12 Oct 2024 18:55:22 +0200 Subject: [PATCH 4/6] more merge error fixes --- platform/android/java/build.gradle | 79 ------------------- .../org/godotengine/editor/GodotEditor.kt | 4 - .../lib/src/org/godotengine/godot/Godot.kt | 59 -------------- .../godotengine/godot/io/file/FileErrors.kt | 6 -- .../godot/utils/ProcessPhoenix.java | 20 ----- 5 files changed, 168 deletions(-) diff --git a/platform/android/java/build.gradle b/platform/android/java/build.gradle index 4fc9594206d3..871c39acebd1 100644 --- a/platform/android/java/build.gradle +++ b/platform/android/java/build.gradle @@ -212,57 +212,12 @@ def generateBuildTasks(String flavor = "template") { && targetLibs.listFiles().length > 0)) { String capitalizedTarget = target.capitalize() if (isTemplate) { -<<<<<<< HEAD // Copy the generated aar library files to the build directory. tasks += "copy${capitalizedTarget}AARToAppModule" // Copy the generated aar library files to the bin directory. tasks += "copy${capitalizedTarget}AARToBin" // Copy the prebuilt binary templates to the bin directory. tasks += "copy${capitalizedTarget}BinaryToBin" -======= - // Copy the Blazium android library archive file into the app module libs directory. - // Depends on the library build task to ensure the AAR file is generated prior to copying. - String copyAARTaskName = "copy${capitalizedTarget}AARToAppModule" - if (tasks.findByName(copyAARTaskName) != null) { - buildTasks += tasks.getByName(copyAARTaskName) - } else { - buildTasks += tasks.create(name: copyAARTaskName, type: Copy) { - dependsOn ":lib:assembleTemplate${capitalizedTarget}" - from('lib/build/outputs/aar') - include("godot-lib.template_${targetSuffix}.aar") - into("app/libs/${target}") - } - } - - // Copy the Blazium android library archive file into the root bin directory. - // Depends on the library build task to ensure the AAR file is generated prior to copying. - String copyAARToBinTaskName = "copy${capitalizedTarget}AARToBin" - if (tasks.findByName(copyAARToBinTaskName) != null) { - buildTasks += tasks.getByName(copyAARToBinTaskName) - } else { - buildTasks += tasks.create(name: copyAARToBinTaskName, type: Copy) { - dependsOn ":lib:assembleTemplate${capitalizedTarget}" - from('lib/build/outputs/aar') - include("godot-lib.template_${targetSuffix}.aar") - into(binDir) - } - } - - // Copy the generated binary template into the Blazium bin directory. - // Depends on the app build task to ensure the binary is generated prior to copying. - String copyBinaryTaskName = "copy${capitalizedEdition}${capitalizedTarget}BinaryToBin" - if (tasks.findByName(copyBinaryTaskName) != null) { - buildTasks += tasks.getByName(copyBinaryTaskName) - } else { - buildTasks += tasks.create(name: copyBinaryTaskName, type: Copy) { - String filenameSuffix = edition == "mono" ? "${edition}${capitalizedTarget}" : target - dependsOn ":app:assemble${capitalizedEdition}${capitalizedTarget}" - from("app/build/outputs/apk/${edition}/${target}") - into(binDir) - include("android_${filenameSuffix}.apk") - } - } ->>>>>>> a534a98048 (Alot of rebranding, check for errors please) } else { // Copy the generated editor apk to the bin directory. tasks += "copyEditor${capitalizedTarget}ApkToBin" @@ -320,11 +275,7 @@ task copyEditorDevAabToBin(type: Copy) { } /** -<<<<<<< HEAD * Generate the Godot Editor Android apk. -======= - * Generate the Blazium Editor binaries for Android devices. ->>>>>>> a534a98048 (Alot of rebranding, check for errors please) * * Note: Unless the 'generateNativeLibs` argument is specified, the Blazium 'tools' shared libraries * must have been generated (via scons) prior to running this gradle task. @@ -332,23 +283,7 @@ task copyEditorDevAabToBin(type: Copy) { */ task generateGodotEditor { gradle.startParameter.excludedTaskNames += templateExcludedBuildTask() -<<<<<<< HEAD dependsOn = generateBuildTasks("editor") -======= - dependsOn = generateBuildTasks("editor", "standard", "android") -} - -/** - * Generate the Blazium Editor binaries for HorizonOS devices. - * - * Note: Unless the 'generateNativeLibs` argument is specified, the Blazium 'tools' shared libraries - * must have been generated (via scons) prior to running this gradle task. - * The task will only build the binaries for which the shared libraries is available. - */ -task generateGodotHorizonOSEditor { - gradle.startParameter.excludedTaskNames += templateExcludedBuildTask() - dependsOn = generateBuildTasks("editor", "standard", "horizonos") ->>>>>>> a534a98048 (Alot of rebranding, check for errors please) } /** @@ -362,20 +297,6 @@ task generateGodotTemplates { } /** -<<<<<<< HEAD -======= - * Master task used to coordinate the tasks defined above to generate the set of Blazium templates - * for the 'mono' edition of the engine. - */ -task generateGodotMonoTemplates { - gradle.startParameter.excludedTaskNames += templateExcludedBuildTask() - dependsOn = generateBuildTasks("template", "mono") - - finalizedBy 'zipGradleBuild' -} - -/** ->>>>>>> a534a98048 (Alot of rebranding, check for errors please) * Generates the same output as generateGodotTemplates but with dev symbols */ task generateDevTemplate { diff --git a/platform/android/java/editor/src/main/java/org/godotengine/editor/GodotEditor.kt b/platform/android/java/editor/src/main/java/org/godotengine/editor/GodotEditor.kt index 626aba5c7f33..16af1bf0dc56 100644 --- a/platform/android/java/editor/src/main/java/org/godotengine/editor/GodotEditor.kt +++ b/platform/android/java/editor/src/main/java/org/godotengine/editor/GodotEditor.kt @@ -55,13 +55,9 @@ import kotlin.math.min * * This provides the basic templates for the activities making up this application. * Each derived activity runs in its own process, which enable up to have several instances of -<<<<<<< HEAD:platform/android/java/editor/src/main/java/org/godotengine/editor/GodotEditor.kt * the Godot engine up and running at the same time. * * It also plays the role of the primary editor window. -======= - * the Blazium engine up and running at the same time. ->>>>>>> a534a98048 (Alot of rebranding, check for errors please):platform/android/java/editor/src/main/java/org/godotengine/editor/BaseGodotEditor.kt */ open class GodotEditor : GodotActivity() { diff --git a/platform/android/java/lib/src/org/godotengine/godot/Godot.kt b/platform/android/java/lib/src/org/godotengine/godot/Godot.kt index 6271b2ad599c..ed74d992c1a0 100644 --- a/platform/android/java/lib/src/org/godotengine/godot/Godot.kt +++ b/platform/android/java/lib/src/org/godotengine/godot/Godot.kt @@ -209,15 +209,8 @@ class Godot(private val context: Context) : SensorEventListener { val window = activity.window window.addFlags(WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON) -<<<<<<< HEAD Log.v(TAG, "Initializing Godot plugin registry") GodotPluginRegistry.initializePluginRegistry(this, primaryHost.getHostPlugins(this)) -======= - Log.v(TAG, "Initializing Blazium plugin registry") - val runtimePlugins = mutableSetOf(AndroidRuntimePlugin(this)) - runtimePlugins.addAll(primaryHost.getHostPlugins(this)) - GodotPluginRegistry.initializePluginRegistry(this, runtimePlugins) ->>>>>>> a534a98048 (Alot of rebranding, check for errors please) if (io == null) { io = GodotIO(activity) } @@ -318,59 +311,7 @@ class Godot(private val context: Context) : SensorEventListener { } /** -<<<<<<< HEAD * Initializes the native layer of the Godot engine. -======= - * Toggle immersive mode. - * Must be called from the UI thread. - */ - private fun enableImmersiveMode(enabled: Boolean, override: Boolean = false) { - val activity = getActivity() ?: return - val window = activity.window ?: return - - if (!useImmersive.compareAndSet(!enabled, enabled) && !override) { - return - } - - WindowCompat.setDecorFitsSystemWindows(window, !enabled) - val controller = WindowInsetsControllerCompat(window, window.decorView) - if (enabled) { - controller.hide(WindowInsetsCompat.Type.systemBars()) - controller.systemBarsBehavior = WindowInsetsControllerCompat.BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE - } else { - val fullScreenThemeValue = TypedValue() - val hasStatusBar = if (activity.theme.resolveAttribute(android.R.attr.windowFullscreen, fullScreenThemeValue, true) && fullScreenThemeValue.type == TypedValue.TYPE_INT_BOOLEAN) { - fullScreenThemeValue.data == 0 - } else { - // Fallback to checking the editor build - !isEditorBuild() - } - - val types = if (hasStatusBar) { - WindowInsetsCompat.Type.navigationBars() or WindowInsetsCompat.Type.statusBars() - } else { - WindowInsetsCompat.Type.navigationBars() - } - controller.show(types) - } - } - - /** - * Invoked from the render thread to toggle the immersive mode. - */ - @Keep - private fun nativeEnableImmersiveMode(enabled: Boolean) { - runOnUiThread { - enableImmersiveMode(enabled) - } - } - - @Keep - fun isInImmersiveMode() = useImmersive.get() - - /** - * Initializes the native layer of the Blazium engine. ->>>>>>> a534a98048 (Alot of rebranding, check for errors please) * * This must be preceded by [onCreate] and followed by [onInitRenderView] to complete * initialization of the engine. diff --git a/platform/android/java/lib/src/org/godotengine/godot/io/file/FileErrors.kt b/platform/android/java/lib/src/org/godotengine/godot/io/file/FileErrors.kt index 076d9729e737..2df0195de7fa 100644 --- a/platform/android/java/lib/src/org/godotengine/godot/io/file/FileErrors.kt +++ b/platform/android/java/lib/src/org/godotengine/godot/io/file/FileErrors.kt @@ -31,13 +31,7 @@ package org.godotengine.godot.io.file /** -<<<<<<< HEAD:platform/android/java/lib/src/org/godotengine/godot/io/file/FileErrors.kt * Set of errors that may occur when performing data access. -======= - * Primary window of the Blazium Editor. - * - * This is the implementation of the editor used when running on HorizonOS devices. ->>>>>>> a534a98048 (Alot of rebranding, check for errors please):platform/android/java/editor/src/horizonos/java/org/godotengine/editor/GodotEditor.kt */ internal enum class FileErrors(val nativeValue: Int) { OK(0), diff --git a/platform/android/java/lib/src/org/godotengine/godot/utils/ProcessPhoenix.java b/platform/android/java/lib/src/org/godotengine/godot/utils/ProcessPhoenix.java index cd56d319dbea..e935adde6cf9 100644 --- a/platform/android/java/lib/src/org/godotengine/godot/utils/ProcessPhoenix.java +++ b/platform/android/java/lib/src/org/godotengine/godot/utils/ProcessPhoenix.java @@ -44,12 +44,6 @@ */ public final class ProcessPhoenix extends Activity { private static final String KEY_RESTART_INTENTS = "phoenix_restart_intents"; -<<<<<<< HEAD -======= - // -- BLAZIUM start -- - private static final String KEY_RESTART_ACTIVITY_OPTIONS = "phoenix_restart_activity_options"; - // -- BLAZIUM end -- ->>>>>>> a534a98048 (Alot of rebranding, check for errors please) private static final String KEY_MAIN_PROCESS_PID = "phoenix_main_process_pid"; /** @@ -62,10 +56,6 @@ public static void triggerRebirth(Context context) { triggerRebirth(context, getRestartIntent(context)); } -<<<<<<< HEAD -======= - // -- BLAZIUM start -- ->>>>>>> a534a98048 (Alot of rebranding, check for errors please) /** * Call to restart the application process using the specified intents. *

@@ -121,21 +111,11 @@ private static Intent getRestartIntent(Context context) { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); -<<<<<<< HEAD // -- GODOT start -- ArrayList intents = getIntent().getParcelableArrayListExtra(KEY_RESTART_INTENTS); startActivities(intents.toArray(new Intent[intents.size()])); forceQuit(this, getIntent().getIntExtra(KEY_MAIN_PROCESS_PID, -1)); // -- GODOT end -- -======= - // -- BLAZIUM start -- - Intent launchIntent = getIntent(); - ArrayList intents = launchIntent.getParcelableArrayListExtra(KEY_RESTART_INTENTS); - Bundle activityOptions = launchIntent.getBundleExtra(KEY_RESTART_ACTIVITY_OPTIONS); - startActivities(intents.toArray(new Intent[intents.size()]), activityOptions); - forceQuit(this, launchIntent.getIntExtra(KEY_MAIN_PROCESS_PID, -1)); - // -- BLAZIUM end -- ->>>>>>> a534a98048 (Alot of rebranding, check for errors please) } /** From 1308ff533b9600629e492080c909dd6bd3af96b8 Mon Sep 17 00:00:00 2001 From: Christoffer Sundbom Date: Sat, 12 Oct 2024 22:34:50 +0200 Subject: [PATCH 5/6] a couple more fixes, like namechange ico and so --- .../lib/src/org/godotengine/godot/utils/ProcessPhoenix.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/platform/android/java/lib/src/org/godotengine/godot/utils/ProcessPhoenix.java b/platform/android/java/lib/src/org/godotengine/godot/utils/ProcessPhoenix.java index e935adde6cf9..709ed9db56f9 100644 --- a/platform/android/java/lib/src/org/godotengine/godot/utils/ProcessPhoenix.java +++ b/platform/android/java/lib/src/org/godotengine/godot/utils/ProcessPhoenix.java @@ -75,7 +75,7 @@ public static void triggerRebirth(Context context, Intent... nextIntents) { context.startActivity(intent); } - // -- GODOT start -- + // -- BLAZIUM start -- /** * Finish the activity and kill its process */ @@ -111,11 +111,11 @@ private static Intent getRestartIntent(Context context) { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); - // -- GODOT start -- + // -- BLAZIUM start -- ArrayList intents = getIntent().getParcelableArrayListExtra(KEY_RESTART_INTENTS); startActivities(intents.toArray(new Intent[intents.size()])); forceQuit(this, getIntent().getIntExtra(KEY_MAIN_PROCESS_PID, -1)); - // -- GODOT end -- + // -- BLAZIUM end -- } /** From a8e8c173dcb23fd7bf2770192b81175db68f2d8c Mon Sep 17 00:00:00 2001 From: Christoffer Sundbom Date: Sat, 12 Oct 2024 22:37:52 +0200 Subject: [PATCH 6/6] removed an unnessesary folder --- .../src/org/godotengine/godot/error/Error.kt | 100 ------------------ 1 file changed, 100 deletions(-) delete mode 100644 platform/android/java/lib/src/org/godotengine/godot/error/Error.kt diff --git a/platform/android/java/lib/src/org/godotengine/godot/error/Error.kt b/platform/android/java/lib/src/org/godotengine/godot/error/Error.kt deleted file mode 100644 index 1dccd9be6574..000000000000 --- a/platform/android/java/lib/src/org/godotengine/godot/error/Error.kt +++ /dev/null @@ -1,100 +0,0 @@ -/**************************************************************************/ -/* Error.kt */ -/**************************************************************************/ -/* This file is part of: */ -/* GODOT ENGINE */ -/* https://godotengine.org */ -/**************************************************************************/ -/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ -/* */ -/* Permission is hereby granted, free of charge, to any person obtaining */ -/* a copy of this software and associated documentation files (the */ -/* "Software"), to deal in the Software without restriction, including */ -/* without limitation the rights to use, copy, modify, merge, publish, */ -/* distribute, sublicense, and/or sell copies of the Software, and to */ -/* permit persons to whom the Software is furnished to do so, subject to */ -/* the following conditions: */ -/* */ -/* The above copyright notice and this permission notice shall be */ -/* included in all copies or substantial portions of the Software. */ -/* */ -/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ -/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ -/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */ -/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ -/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ -/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ -/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -/**************************************************************************/ - -package org.godotengine.godot.error - -/** - * Blazium error list. - * - * This enum MUST match its native counterpart in 'core/error/error_list.h' - */ -enum class Error(private val description: String) { - OK("OK"), // (0) - FAILED("Failed"), ///< Generic fail error - ERR_UNAVAILABLE("Unavailable"), ///< What is requested is unsupported/unavailable - ERR_UNCONFIGURED("Unconfigured"), ///< The object being used hasn't been properly set up yet - ERR_UNAUTHORIZED("Unauthorized"), ///< Missing credentials for requested resource - ERR_PARAMETER_RANGE_ERROR("Parameter out of range"), ///< Parameter given out of range (5) - ERR_OUT_OF_MEMORY("Out of memory"), ///< Out of memory - ERR_FILE_NOT_FOUND("File not found"), - ERR_FILE_BAD_DRIVE("File: Bad drive"), - ERR_FILE_BAD_PATH("File: Bad path"), - ERR_FILE_NO_PERMISSION("File: Permission denied"), // (10) - ERR_FILE_ALREADY_IN_USE("File already in use"), - ERR_FILE_CANT_OPEN("Can't open file"), - ERR_FILE_CANT_WRITE("Can't write file"), - ERR_FILE_CANT_READ("Can't read file"), - ERR_FILE_UNRECOGNIZED("File unrecognized"), // (15) - ERR_FILE_CORRUPT("File corrupt"), - ERR_FILE_MISSING_DEPENDENCIES("Missing dependencies for file"), - ERR_FILE_EOF("End of file"), - ERR_CANT_OPEN("Can't open"), ///< Can't open a resource/socket/file - ERR_CANT_CREATE("Can't create"), // (20) - ERR_QUERY_FAILED("Query failed"), - ERR_ALREADY_IN_USE("Already in use"), - ERR_LOCKED("Locked"), ///< resource is locked - ERR_TIMEOUT("Timeout"), - ERR_CANT_CONNECT("Can't connect"), // (25) - ERR_CANT_RESOLVE("Can't resolve"), - ERR_CONNECTION_ERROR("Connection error"), - ERR_CANT_ACQUIRE_RESOURCE("Can't acquire resource"), - ERR_CANT_FORK("Can't fork"), - ERR_INVALID_DATA("Invalid data"), ///< Data passed is invalid (30) - ERR_INVALID_PARAMETER("Invalid parameter"), ///< Parameter passed is invalid - ERR_ALREADY_EXISTS("Already exists"), ///< When adding, item already exists - ERR_DOES_NOT_EXIST("Does not exist"), ///< When retrieving/erasing, if item does not exist - ERR_DATABASE_CANT_READ("Can't read database"), ///< database is full - ERR_DATABASE_CANT_WRITE("Can't write database"), ///< database is full (35) - ERR_COMPILATION_FAILED("Compilation failed"), - ERR_METHOD_NOT_FOUND("Method not found"), - ERR_LINK_FAILED("Link failed"), - ERR_SCRIPT_FAILED("Script failed"), - ERR_CYCLIC_LINK("Cyclic link detected"), // (40) - ERR_INVALID_DECLARATION("Invalid declaration"), - ERR_DUPLICATE_SYMBOL("Duplicate symbol"), - ERR_PARSE_ERROR("Parse error"), - ERR_BUSY("Busy"), - ERR_SKIP("Skip"), // (45) - ERR_HELP("Help"), ///< user requested help!! - ERR_BUG("Bug"), ///< a bug in the software certainly happened, due to a double check failing or unexpected behavior. - ERR_PRINTER_ON_FIRE("Printer on fire"); /// the parallel port printer is engulfed in flames - - companion object { - internal fun fromNativeValue(nativeValue: Int): Error? { - return Error.entries.getOrNull(nativeValue) - } - } - - internal fun toNativeValue(): Int = this.ordinal - - override fun toString(): String { - return description - } -}