diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d04bc5d49ea..5655a1fee35 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -37,7 +37,7 @@ repos: stages: [manual] # Not automatically triggered, invoked via `pre-commit run --hook-stage manual clang-tidy` - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.8.4 + rev: v0.9.4 hooks: - id: ruff args: [--fix] @@ -48,7 +48,7 @@ repos: types_or: [text] - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.13.0 + rev: v1.14.1 hooks: - id: mypy files: \.py$ diff --git a/SConstruct b/SConstruct index 67180bb3cdf..7fce851c00b 100644 --- a/SConstruct +++ b/SConstruct @@ -107,22 +107,11 @@ for x in sorted(glob.glob("platform/*")): sys.path.remove(tmppath) sys.modules.pop("detect") -custom_tools = ["default"] - -platform_arg = ARGUMENTS.get("platform", ARGUMENTS.get("p", False)) - -if platform_arg == "android": - custom_tools = ["clang", "clang++", "as", "ar", "link"] -elif platform_arg == "web": - # Use generic POSIX build toolchain for Emscripten. - custom_tools = ["cc", "c++", "ar", "link", "textfile", "zip"] -elif os.name == "nt" and methods.get_cmdline_bool("use_mingw", False): - custom_tools = ["mingw"] - # We let SCons build its default ENV as it includes OS-specific things which we don't -# want to have to pull in manually. +# want to have to pull in manually. However we enforce no "tools", which we register +# further down after parsing our platform-specific configuration. # Then we prepend PATH to make it take precedence, while preserving SCons' own entries. -env = Environment(tools=custom_tools) +env = Environment(tools=[]) env.PrependENVPath("PATH", os.getenv("PATH")) env.PrependENVPath("PKG_CONFIG_PATH", os.getenv("PKG_CONFIG_PATH")) if "TERM" in os.environ: # Used for colored output. @@ -168,11 +157,7 @@ if profile: opts = Variables(customs, ARGUMENTS) # Target build options -if env.scons_version >= (4, 3): - opts.Add(["platform", "p"], "Target platform (%s)" % "|".join(platform_list), "") -else: - opts.Add("platform", "Target platform (%s)" % "|".join(platform_list), "") - opts.Add("p", "Alias for 'platform'", "") +opts.Add((["platform", "p"], "Target platform (%s)" % "|".join(platform_list), "")) opts.Add(EnumVariable("target", "Compilation target", "editor", ("editor", "template_release", "template_debug"))) opts.Add(EnumVariable("arch", "CPU architecture", "auto", ["auto"] + architectures, architecture_aliases)) opts.Add(BoolVariable("dev_build", "Developer build with dev-only debugging code (DEV_ENABLED)", False)) @@ -312,10 +297,7 @@ if env["import_env_vars"]: # Platform selection: validate input, and add options. -if env.scons_version < (4, 3) and not env["platform"]: - env["platform"] = env["p"] - -if env["platform"] == "": +if not env["platform"]: # Missing `platform` argument, try to detect platform automatically if ( sys.platform.startswith("linux") @@ -330,8 +312,8 @@ if env["platform"] == "": elif sys.platform == "win32": env["platform"] = "windows" - if env["platform"] != "": - print(f'Automatically detected platform: {env["platform"]}') + if env["platform"]: + print(f"Automatically detected platform: {env['platform']}") # Deprecated aliases kept for compatibility. if env["platform"] in compatibility_platform_aliases: @@ -352,7 +334,7 @@ if env["platform"] not in platform_list: if env["platform"] == "list": print(text) - elif env["platform"] == "": + elif not env["platform"]: print_error("Could not detect platform automatically.\n" + text) else: print_error(f'Invalid target platform "{env["platform"]}".\n' + text) @@ -434,6 +416,23 @@ env.modules_detected = modules_detected opts.Update(env, {**ARGUMENTS, **env.Dictionary()}) Help(opts.GenerateHelpText(env)) + +# FIXME: Tool assignment happening at this stage is a direct consequence of getting the platform logic AFTER the SCons +# environment was already been constructed. Fixing this would require a broader refactor where all options are setup +# ahead of time with native validator/converter functions. +tmppath = "./platform/" + env["platform"] +sys.path.insert(0, tmppath) +import detect + +custom_tools = ["default"] +try: # Platform custom tools are optional + custom_tools = detect.get_tools(env) +except AttributeError: + pass +for tool in custom_tools: + env.Tool(tool) + + # add default include paths env.Prepend(CPPPATH=["#"]) @@ -515,10 +514,6 @@ if not env["deprecated"]: if env["precision"] == "double": env.Append(CPPDEFINES=["REAL_T_IS_DOUBLE"]) -tmppath = "./platform/" + env["platform"] -sys.path.insert(0, tmppath) -import detect - # Default num_jobs to local cpu count if not user specified. # SCons has a peculiarity where user-specified options won't be overridden # by SetOption, so we can rely on this to know if we should use our default. @@ -587,7 +582,7 @@ if env["dev_mode"]: if env["production"]: env["use_static_cpp"] = methods.get_cmdline_bool("use_static_cpp", True) env["debug_symbols"] = methods.get_cmdline_bool("debug_symbols", False) - if platform_arg == "android": + if env["platform"] == "android": env["swappy"] = methods.get_cmdline_bool("swappy", True) # LTO "auto" means we handle the preferred option in each platform detect.py. env["lto"] = ARGUMENTS.get("lto", "auto") @@ -1003,8 +998,7 @@ if env["disable_3d"]: if env["disable_advanced_gui"]: if env.editor_build: print_error( - "Build option `disable_advanced_gui=yes` cannot be used for editor builds, " - "only for export template builds." + "Build option `disable_advanced_gui=yes` cannot be used for editor builds, only for export template builds." ) Exit(255) else: diff --git a/core/config/project_settings.cpp b/core/config/project_settings.cpp index 2a52c840552..f0b4f8e8881 100644 --- a/core/config/project_settings.cpp +++ b/core/config/project_settings.cpp @@ -1265,10 +1265,10 @@ void ProjectSettings::refresh_global_class_list() { Array script_classes = get_global_class_list(); for (int i = 0; i < script_classes.size(); i++) { Dictionary c = script_classes[i]; - if (!c.has("class") || !c.has("language") || !c.has("path") || !c.has("base")) { + if (!c.has("class") || !c.has("language") || !c.has("path") || !c.has("base") || !c.has("is_abstract") || !c.has("is_tool")) { continue; } - ScriptServer::add_global_class(c["class"], c["base"], c["language"], c["path"]); + ScriptServer::add_global_class(c["class"], c["base"], c["language"], c["path"], c["is_abstract"], c["is_tool"]); } } diff --git a/core/input/input.cpp b/core/input/input.cpp index 6c5682b4b79..64d85893d70 100644 --- a/core/input/input.cpp +++ b/core/input/input.cpp @@ -79,6 +79,10 @@ Input *Input::singleton = nullptr; void (*Input::set_mouse_mode_func)(Input::MouseMode) = nullptr; Input::MouseMode (*Input::get_mouse_mode_func)() = nullptr; +void (*Input::set_mouse_mode_override_func)(Input::MouseMode) = nullptr; +Input::MouseMode (*Input::get_mouse_mode_override_func)() = nullptr; +void (*Input::set_mouse_mode_override_enabled_func)(bool) = nullptr; +bool (*Input::is_mouse_mode_override_enabled_func)() = nullptr; void (*Input::warp_mouse_func)(const Vector2 &p_position) = nullptr; Input::CursorShape (*Input::get_current_cursor_shape_func)() = nullptr; void (*Input::set_custom_mouse_cursor_func)(const Ref &, Input::CursorShape, const Vector2 &) = nullptr; @@ -88,51 +92,29 @@ Input *Input::get_singleton() { } void Input::set_mouse_mode(MouseMode p_mode) { - ERR_FAIL_INDEX((int)p_mode, 5); - - if (p_mode == mouse_mode) { - return; - } - - // Allow to be set even if overridden, to see if the platform allows the mode. + ERR_FAIL_INDEX(p_mode, MouseMode::MOUSE_MODE_MAX); set_mouse_mode_func(p_mode); - mouse_mode = get_mouse_mode_func(); - - if (mouse_mode_override_enabled) { - set_mouse_mode_func(mouse_mode_override); - } } Input::MouseMode Input::get_mouse_mode() const { - return mouse_mode; + return get_mouse_mode_func(); } -void Input::set_mouse_mode_override_enabled(bool p_enabled) { - if (p_enabled == mouse_mode_override_enabled) { - return; - } - - mouse_mode_override_enabled = p_enabled; - - if (p_enabled) { - set_mouse_mode_func(mouse_mode_override); - mouse_mode_override = get_mouse_mode_func(); - } else { - set_mouse_mode_func(mouse_mode); - } +void Input::set_mouse_mode_override(MouseMode p_mode) { + ERR_FAIL_INDEX(p_mode, MouseMode::MOUSE_MODE_MAX); + set_mouse_mode_override_func(p_mode); } -void Input::set_mouse_mode_override(MouseMode p_mode) { - ERR_FAIL_INDEX((int)p_mode, 5); +Input::MouseMode Input::get_mouse_mode_override() const { + return get_mouse_mode_override_func(); +} - if (p_mode == mouse_mode_override) { - return; - } +void Input::set_mouse_mode_override_enabled(bool p_override_enabled) { + set_mouse_mode_override_enabled_func(p_override_enabled); +} - if (mouse_mode_override_enabled) { - set_mouse_mode_func(p_mode); - mouse_mode_override = get_mouse_mode_func(); - } +bool Input::is_mouse_mode_override_enabled() { + return is_mouse_mode_override_enabled_func(); } void Input::_bind_methods() { @@ -201,6 +183,7 @@ void Input::_bind_methods() { BIND_ENUM_CONSTANT(MOUSE_MODE_CAPTURED); BIND_ENUM_CONSTANT(MOUSE_MODE_CONFINED); BIND_ENUM_CONSTANT(MOUSE_MODE_CONFINED_HIDDEN); + BIND_ENUM_CONSTANT(MOUSE_MODE_MAX); BIND_ENUM_CONSTANT(CURSOR_ARROW); BIND_ENUM_CONSTANT(CURSOR_IBEAM); diff --git a/core/input/input.h b/core/input/input.h index fc8cea21193..2033accd42b 100644 --- a/core/input/input.h +++ b/core/input/input.h @@ -49,12 +49,14 @@ class Input : public Object { static constexpr uint64_t MAX_EVENT = 32; public: + // Keep synced with "DisplayServer::MouseMode" enum. enum MouseMode { MOUSE_MODE_VISIBLE, MOUSE_MODE_HIDDEN, MOUSE_MODE_CAPTURED, MOUSE_MODE_CONFINED, MOUSE_MODE_CONFINED_HIDDEN, + MOUSE_MODE_MAX, }; #undef CursorShape @@ -107,10 +109,6 @@ class Input : public Object { bool legacy_just_pressed_behavior = false; bool disable_input = false; - MouseMode mouse_mode = MOUSE_MODE_VISIBLE; - bool mouse_mode_override_enabled = false; - MouseMode mouse_mode_override = MOUSE_MODE_VISIBLE; - struct ActionState { uint64_t pressed_physics_frame = UINT64_MAX; uint64_t pressed_process_frame = UINT64_MAX; @@ -270,6 +268,10 @@ class Input : public Object { static void (*set_mouse_mode_func)(MouseMode); static MouseMode (*get_mouse_mode_func)(); + static void (*set_mouse_mode_override_func)(MouseMode); + static MouseMode (*get_mouse_mode_override_func)(); + static void (*set_mouse_mode_override_enabled_func)(bool); + static bool (*is_mouse_mode_override_enabled_func)(); static void (*warp_mouse_func)(const Vector2 &p_position); static CursorShape (*get_current_cursor_shape_func)(); @@ -288,8 +290,10 @@ class Input : public Object { public: void set_mouse_mode(MouseMode p_mode); MouseMode get_mouse_mode() const; - void set_mouse_mode_override_enabled(bool p_enabled); void set_mouse_mode_override(MouseMode p_mode); + MouseMode get_mouse_mode_override() const; + void set_mouse_mode_override_enabled(bool p_override_enabled); + bool is_mouse_mode_override_enabled(); #ifdef TOOLS_ENABLED void get_argument_options(const StringName &p_function, int p_idx, List *r_options) const override; diff --git a/core/io/file_access.cpp b/core/io/file_access.cpp index 389aabdc926..adcd308c349 100644 --- a/core/io/file_access.cpp +++ b/core/io/file_access.cpp @@ -453,7 +453,7 @@ String FileAccess::get_line() const { uint8_t c = get_8(); while (!eof_reached()) { - if (c == '\n' || c == '\0') { + if (c == '\n' || c == '\0' || get_error() != OK) { line.push_back(0); return String::utf8(line.get_data()); } else if (c != '\r') { diff --git a/core/math/basis.cpp b/core/math/basis.cpp index abd16f5519a..4b154aba613 100644 --- a/core/math/basis.cpp +++ b/core/math/basis.cpp @@ -457,6 +457,11 @@ void Basis::get_rotation_axis_angle_local(Vector3 &p_axis, real_t &p_angle) cons } Vector3 Basis::get_euler(EulerOrder p_order) const { + // This epsilon value results in angles within a +/- 0.04 degree range being simplified/truncated. + // Based on testing, this is the largest the epsilon can be without the angle truncation becoming + // visually noticeable. + const real_t epsilon = 0.00000025; + switch (p_order) { case EulerOrder::XYZ: { // Euler angles in XYZ convention. @@ -468,8 +473,8 @@ Vector3 Basis::get_euler(EulerOrder p_order) const { Vector3 euler; real_t sy = rows[0][2]; - if (sy < (1.0f - (real_t)CMP_EPSILON)) { - if (sy > -(1.0f - (real_t)CMP_EPSILON)) { + if (sy < (1.0f - epsilon)) { + if (sy > -(1.0f - epsilon)) { // is this a pure Y rotation? if (rows[1][0] == 0 && rows[0][1] == 0 && rows[1][2] == 0 && rows[2][1] == 0 && rows[1][1] == 1) { // return the simplest form (human friendlier in editor and scripts) @@ -503,8 +508,8 @@ Vector3 Basis::get_euler(EulerOrder p_order) const { Vector3 euler; real_t sz = rows[0][1]; - if (sz < (1.0f - (real_t)CMP_EPSILON)) { - if (sz > -(1.0f - (real_t)CMP_EPSILON)) { + if (sz < (1.0f - epsilon)) { + if (sz > -(1.0f - epsilon)) { euler.x = Math::atan2(rows[2][1], rows[1][1]); euler.y = Math::atan2(rows[0][2], rows[0][0]); euler.z = Math::asin(-sz); @@ -534,8 +539,8 @@ Vector3 Basis::get_euler(EulerOrder p_order) const { real_t m12 = rows[1][2]; - if (m12 < (1 - (real_t)CMP_EPSILON)) { - if (m12 > -(1 - (real_t)CMP_EPSILON)) { + if (m12 < (1 - epsilon)) { + if (m12 > -(1 - epsilon)) { // is this a pure X rotation? if (rows[1][0] == 0 && rows[0][1] == 0 && rows[0][2] == 0 && rows[2][0] == 0 && rows[0][0] == 1) { // return the simplest form (human friendlier in editor and scripts) @@ -570,8 +575,8 @@ Vector3 Basis::get_euler(EulerOrder p_order) const { Vector3 euler; real_t sz = rows[1][0]; - if (sz < (1.0f - (real_t)CMP_EPSILON)) { - if (sz > -(1.0f - (real_t)CMP_EPSILON)) { + if (sz < (1.0f - epsilon)) { + if (sz > -(1.0f - epsilon)) { euler.x = Math::atan2(-rows[1][2], rows[1][1]); euler.y = Math::atan2(-rows[2][0], rows[0][0]); euler.z = Math::asin(sz); @@ -598,8 +603,8 @@ Vector3 Basis::get_euler(EulerOrder p_order) const { // -cx*sy sx cx*cy Vector3 euler; real_t sx = rows[2][1]; - if (sx < (1.0f - (real_t)CMP_EPSILON)) { - if (sx > -(1.0f - (real_t)CMP_EPSILON)) { + if (sx < (1.0f - epsilon)) { + if (sx > -(1.0f - epsilon)) { euler.x = Math::asin(sx); euler.y = Math::atan2(-rows[2][0], rows[2][2]); euler.z = Math::atan2(-rows[0][1], rows[1][1]); @@ -626,8 +631,8 @@ Vector3 Basis::get_euler(EulerOrder p_order) const { // -sy cy*sx cy*cx Vector3 euler; real_t sy = rows[2][0]; - if (sy < (1.0f - (real_t)CMP_EPSILON)) { - if (sy > -(1.0f - (real_t)CMP_EPSILON)) { + if (sy < (1.0f - epsilon)) { + if (sy > -(1.0f - epsilon)) { euler.x = Math::atan2(rows[2][1], rows[2][2]); euler.y = Math::asin(-sy); euler.z = Math::atan2(rows[1][0], rows[0][0]); diff --git a/core/object/class_db.cpp b/core/object/class_db.cpp index 95db2e89977..b9f25501632 100644 --- a/core/object/class_db.cpp +++ b/core/object/class_db.cpp @@ -1868,9 +1868,12 @@ void ClassDB::_bind_compatibility(ClassInfo *type, MethodBind *p_method) { void ClassDB::_bind_method_custom(const StringName &p_class, MethodBind *p_method, bool p_compatibility) { OBJTYPE_WLOCK; + StringName method_name = p_method->get_name(); + ClassInfo *type = classes.getptr(p_class); if (!type) { - ERR_FAIL_MSG(vformat("Couldn't bind custom method '%s' for instance '%s'.", p_method->get_name(), p_class)); + memdelete(p_method); + ERR_FAIL_MSG(vformat("Couldn't bind custom method '%s' for instance '%s'.", method_name, p_class)); } if (p_compatibility) { @@ -1878,16 +1881,17 @@ void ClassDB::_bind_method_custom(const StringName &p_class, MethodBind *p_metho return; } - if (type->method_map.has(p_method->get_name())) { + if (type->method_map.has(method_name)) { // overloading not supported - ERR_FAIL_MSG(vformat("Method already bound '%s::%s'.", p_class, p_method->get_name())); + memdelete(p_method); + ERR_FAIL_MSG(vformat("Method already bound '%s::%s'.", p_class, method_name)); } #ifdef DEBUG_METHODS_ENABLED - type->method_order.push_back(p_method->get_name()); + type->method_order.push_back(method_name); #endif - type->method_map[p_method->get_name()] = p_method; + type->method_map[method_name] = p_method; } MethodBind *ClassDB::_bind_vararg_method(MethodBind *p_bind, const StringName &p_name, const Vector &p_default_args, bool p_compatibility) { diff --git a/core/object/make_virtuals.py b/core/object/make_virtuals.py index 325477692a6..13775ecdde0 100644 --- a/core/object/make_virtuals.py +++ b/core/object/make_virtuals.py @@ -154,7 +154,7 @@ def generate_version(argcount, const=False, returns=False, required=False, compa callptrargsptr += ", " argtext += f"m_type{i + 1}" callargtext += f"m_type{i + 1} arg{i + 1}" - callsiargs += f"_to_variant(arg{i + 1})" + callsiargs += f"arg{i + 1}" callsiargptrs += f"&vargs[{i}]" callptrargs += ( f"PtrToArg::EncodeT argval{i + 1} = (PtrToArg::EncodeT)arg{i + 1};\\\n" @@ -240,37 +240,6 @@ def run(target, source, env): #define _GDVIRTUAL_GET_DEPRECATED(m_name, m_name_sn, m_compat) #endif -// MSVC WORKAROUND START -// FIXME The below helper functions are needed to work around an MSVC bug. -// They should be removed (by modifying core/object/make_virtuals.py) once the bug ceases to be triggered. -// The bug is triggered by the following code: -// `Variant(arg)` -// Through the introduction of the move constructor, MSVC forgets that `operator Variant()` -// is also a valid way to resolve this call. So for some argument types, it fails the call because -// it cannot convert to `Variant`. -// The function `_to_variant` helps the compiler select `.operator Variant()` for appropriate arguments using SFINAE. - -template -struct has_variant_operator : std::false_type {}; - -template -struct has_variant_operator().operator Variant())>> : std::true_type {}; - -// Function that is enabled if T has `.operator Variant()`. -template -_ALWAYS_INLINE_ typename std::enable_if::value, Variant>::type -_to_variant(T&& t) { - return std::forward(t).operator Variant(); -} - -// Function that is enabled if T does not have `.operator Variant()`. -template -_ALWAYS_INLINE_ typename std::enable_if::value, Variant>::type -_to_variant(T&& t) { - return Variant(std::forward(t)); -} -// MSVC WORKAROUND END - """ for i in range(max_versions + 1): diff --git a/core/object/script_language.cpp b/core/object/script_language.cpp index 9f21f88a3e6..918d021be43 100644 --- a/core/object/script_language.cpp +++ b/core/object/script_language.cpp @@ -271,10 +271,10 @@ void ScriptServer::init_languages() { for (const Variant &script_class : script_classes) { Dictionary c = script_class; - if (!c.has("class") || !c.has("language") || !c.has("path") || !c.has("base")) { + if (!c.has("class") || !c.has("language") || !c.has("path") || !c.has("base") || !c.has("is_abstract") || !c.has("is_tool")) { continue; } - add_global_class(c["class"], c["base"], c["language"], c["path"]); + add_global_class(c["class"], c["base"], c["language"], c["path"], c["is_abstract"], c["is_tool"]); } ProjectSettings::get_singleton()->clear("_global_script_classes"); } @@ -283,10 +283,10 @@ void ScriptServer::init_languages() { Array script_classes = ProjectSettings::get_singleton()->get_global_class_list(); for (const Variant &script_class : script_classes) { Dictionary c = script_class; - if (!c.has("class") || !c.has("language") || !c.has("path") || !c.has("base")) { + if (!c.has("class") || !c.has("language") || !c.has("path") || !c.has("base") || !c.has("is_abstract") || !c.has("is_tool")) { continue; } - add_global_class(c["class"], c["base"], c["language"], c["path"]); + add_global_class(c["class"], c["base"], c["language"], c["path"], c["is_abstract"], c["is_tool"]); } } @@ -392,7 +392,7 @@ void ScriptServer::global_classes_clear() { inheriters_cache.clear(); } -void ScriptServer::add_global_class(const StringName &p_class, const StringName &p_base, const StringName &p_language, const String &p_path) { +void ScriptServer::add_global_class(const StringName &p_class, const StringName &p_base, const StringName &p_language, const String &p_path, bool p_is_abstract, bool p_is_tool) { ERR_FAIL_COND_MSG(p_class == p_base || (global_classes.has(p_base) && get_global_class_native_base(p_base) == p_class), "Cyclic inheritance in script class."); GlobalScriptClass *existing = global_classes.getptr(p_class); if (existing) { @@ -401,6 +401,8 @@ void ScriptServer::add_global_class(const StringName &p_class, const StringName existing->base = p_base; existing->path = p_path; existing->language = p_language; + existing->is_abstract = p_is_abstract; + existing->is_tool = p_is_tool; inheriters_cache_dirty = true; } } else { @@ -409,6 +411,8 @@ void ScriptServer::add_global_class(const StringName &p_class, const StringName g.language = p_language; g.path = p_path; g.base = p_base; + g.is_abstract = p_is_abstract; + g.is_tool = p_is_tool; global_classes[p_class] = g; inheriters_cache_dirty = true; } @@ -482,6 +486,16 @@ StringName ScriptServer::get_global_class_native_base(const String &p_class) { return base; } +bool ScriptServer::is_global_class_abstract(const String &p_class) { + ERR_FAIL_COND_V(!global_classes.has(p_class), false); + return global_classes[p_class].is_abstract; +} + +bool ScriptServer::is_global_class_tool(const String &p_class) { + ERR_FAIL_COND_V(!global_classes.has(p_class), false); + return global_classes[p_class].is_tool; +} + void ScriptServer::get_global_class_list(List *r_global_classes) { List classes; for (const KeyValue &E : global_classes) { @@ -509,12 +523,15 @@ void ScriptServer::save_global_classes() { get_global_class_list(&gc); Array gcarr; for (const StringName &E : gc) { + const GlobalScriptClass &global_class = global_classes[E]; Dictionary d; d["class"] = E; - d["language"] = global_classes[E].language; - d["path"] = global_classes[E].path; - d["base"] = global_classes[E].base; + d["language"] = global_class.language; + d["path"] = global_class.path; + d["base"] = global_class.base; d["icon"] = class_icons.get(E, ""); + d["is_abstract"] = global_class.is_abstract; + d["is_tool"] = global_class.is_tool; gcarr.push_back(d); } ProjectSettings::get_singleton()->store_global_class_list(gcarr); diff --git a/core/object/script_language.h b/core/object/script_language.h index f4aca2784c8..c2427fa51b8 100644 --- a/core/object/script_language.h +++ b/core/object/script_language.h @@ -64,6 +64,8 @@ class ScriptServer { StringName language; String path; StringName base; + bool is_abstract = false; + bool is_tool = false; }; static HashMap global_classes; @@ -88,7 +90,7 @@ class ScriptServer { static void thread_exit(); static void global_classes_clear(); - static void add_global_class(const StringName &p_class, const StringName &p_base, const StringName &p_language, const String &p_path); + static void add_global_class(const StringName &p_class, const StringName &p_base, const StringName &p_language, const String &p_path, bool p_is_abstract, bool p_is_tool); static void remove_global_class(const StringName &p_class); static void remove_global_class_by_path(const String &p_path); static bool is_global_class(const StringName &p_class); @@ -96,6 +98,8 @@ class ScriptServer { static String get_global_class_path(const String &p_class); static StringName get_global_class_base(const String &p_class); static StringName get_global_class_native_base(const String &p_class); + static bool is_global_class_abstract(const String &p_class); + static bool is_global_class_tool(const String &p_class); static void get_global_class_list(List *r_global_classes); static void get_inheriters_list(const StringName &p_base_type, List *r_classes); static void save_global_classes(); @@ -445,7 +449,7 @@ class ScriptLanguage : public Object { virtual void frame(); virtual bool handles_global_class_type(const String &p_type) const { return false; } - virtual String get_global_class_name(const String &p_path, String *r_base_type = nullptr, String *r_icon_path = nullptr) const { return String(); } + virtual String get_global_class_name(const String &p_path, String *r_base_type = nullptr, String *r_icon_path = nullptr, bool *r_is_abstract = nullptr, bool *r_is_tool = nullptr) const { return String(); } virtual ~ScriptLanguage() {} }; diff --git a/core/object/script_language_extension.h b/core/object/script_language_extension.h index 4aaac37f0de..d14e3f044da 100644 --- a/core/object/script_language_extension.h +++ b/core/object/script_language_extension.h @@ -674,7 +674,7 @@ class ScriptLanguageExtension : public ScriptLanguage { GDVIRTUAL1RC_REQUIRED(Dictionary, _get_global_class_name, const String &) - virtual String get_global_class_name(const String &p_path, String *r_base_type = nullptr, String *r_icon_path = nullptr) const override { + virtual String get_global_class_name(const String &p_path, String *r_base_type = nullptr, String *r_icon_path = nullptr, bool *r_is_abstract = nullptr, bool *r_is_tool = nullptr) const override { Dictionary ret; GDVIRTUAL_CALL(_get_global_class_name, p_path, ret); if (!ret.has("name")) { @@ -686,6 +686,12 @@ class ScriptLanguageExtension : public ScriptLanguage { if (r_icon_path != nullptr && ret.has("icon_path")) { *r_icon_path = ret["icon_path"]; } + if (r_is_abstract != nullptr && ret.has("is_abstract")) { + *r_is_abstract = ret["is_abstract"]; + } + if (r_is_tool != nullptr && ret.has("is_tool")) { + *r_is_tool = ret["is_tool"]; + } return ret["name"]; } }; diff --git a/core/string/ucaps.h b/core/string/ucaps.h index 062b038296a..614b8ffc22b 100644 --- a/core/string/ucaps.h +++ b/core/string/ucaps.h @@ -33,10 +33,12 @@ #ifndef UCAPS_H #define UCAPS_H -//satan invented unicode? -#define CAPS_LEN 666 +// This file was generated using the `misc/scripts/ucaps_fetch.py` script. -static const int caps_table[CAPS_LEN][2] = { +#define LTU_LEN 1477 +#define UTL_LEN 1460 + +static const int caps_table[LTU_LEN][2] = { { 0x0061, 0x0041 }, { 0x0062, 0x0042 }, { 0x0063, 0x0043 }, @@ -63,6 +65,7 @@ static const int caps_table[CAPS_LEN][2] = { { 0x0078, 0x0058 }, { 0x0079, 0x0059 }, { 0x007A, 0x005A }, + { 0x00B5, 0x039C }, { 0x00E0, 0x00C0 }, { 0x00E1, 0x00C1 }, { 0x00E2, 0x00C2 }, @@ -156,12 +159,18 @@ static const int caps_table[CAPS_LEN][2] = { { 0x017A, 0x0179 }, { 0x017C, 0x017B }, { 0x017E, 0x017D }, + { 0x017F, 0x0053 }, + { 0x0180, 0x0243 }, { 0x0183, 0x0182 }, { 0x0185, 0x0184 }, { 0x0188, 0x0187 }, { 0x018C, 0x018B }, { 0x0192, 0x0191 }, + { 0x0195, 0x01F6 }, { 0x0199, 0x0198 }, + { 0x019A, 0x023D }, + { 0x019B, 0xA7DC }, + { 0x019E, 0x0220 }, { 0x01A1, 0x01A0 }, { 0x01A3, 0x01A2 }, { 0x01A5, 0x01A4 }, @@ -172,8 +181,12 @@ static const int caps_table[CAPS_LEN][2] = { { 0x01B6, 0x01B5 }, { 0x01B9, 0x01B8 }, { 0x01BD, 0x01BC }, + { 0x01BF, 0x01F7 }, + { 0x01C5, 0x01C4 }, { 0x01C6, 0x01C4 }, + { 0x01C8, 0x01C7 }, { 0x01C9, 0x01C7 }, + { 0x01CB, 0x01CA }, { 0x01CC, 0x01CA }, { 0x01CE, 0x01CD }, { 0x01D0, 0x01CF }, @@ -183,6 +196,7 @@ static const int caps_table[CAPS_LEN][2] = { { 0x01D8, 0x01D7 }, { 0x01DA, 0x01D9 }, { 0x01DC, 0x01DB }, + { 0x01DD, 0x018E }, { 0x01DF, 0x01DE }, { 0x01E1, 0x01E0 }, { 0x01E3, 0x01E2 }, @@ -192,8 +206,10 @@ static const int caps_table[CAPS_LEN][2] = { { 0x01EB, 0x01EA }, { 0x01ED, 0x01EC }, { 0x01EF, 0x01EE }, + { 0x01F2, 0x01F1 }, { 0x01F3, 0x01F1 }, { 0x01F5, 0x01F4 }, + { 0x01F9, 0x01F8 }, { 0x01FB, 0x01FA }, { 0x01FD, 0x01FC }, { 0x01FF, 0x01FE }, @@ -209,24 +225,73 @@ static const int caps_table[CAPS_LEN][2] = { { 0x0213, 0x0212 }, { 0x0215, 0x0214 }, { 0x0217, 0x0216 }, + { 0x0219, 0x0218 }, + { 0x021B, 0x021A }, + { 0x021D, 0x021C }, + { 0x021F, 0x021E }, + { 0x0223, 0x0222 }, + { 0x0225, 0x0224 }, + { 0x0227, 0x0226 }, + { 0x0229, 0x0228 }, + { 0x022B, 0x022A }, + { 0x022D, 0x022C }, + { 0x022F, 0x022E }, + { 0x0231, 0x0230 }, + { 0x0233, 0x0232 }, + { 0x023C, 0x023B }, + { 0x023F, 0x2C7E }, + { 0x0240, 0x2C7F }, + { 0x0242, 0x0241 }, + { 0x0247, 0x0246 }, + { 0x0249, 0x0248 }, + { 0x024B, 0x024A }, + { 0x024D, 0x024C }, + { 0x024F, 0x024E }, + { 0x0250, 0x2C6F }, + { 0x0251, 0x2C6D }, + { 0x0252, 0x2C70 }, { 0x0253, 0x0181 }, { 0x0254, 0x0186 }, + { 0x0256, 0x0189 }, { 0x0257, 0x018A }, - { 0x0258, 0x018E }, { 0x0259, 0x018F }, { 0x025B, 0x0190 }, + { 0x025C, 0xA7AB }, { 0x0260, 0x0193 }, + { 0x0261, 0xA7AC }, { 0x0263, 0x0194 }, + { 0x0264, 0xA7CB }, + { 0x0265, 0xA78D }, + { 0x0266, 0xA7AA }, { 0x0268, 0x0197 }, { 0x0269, 0x0196 }, + { 0x026A, 0xA7AE }, + { 0x026B, 0x2C62 }, + { 0x026C, 0xA7AD }, { 0x026F, 0x019C }, + { 0x0271, 0x2C6E }, { 0x0272, 0x019D }, { 0x0275, 0x019F }, + { 0x027D, 0x2C64 }, + { 0x0280, 0x01A6 }, + { 0x0282, 0xA7C5 }, { 0x0283, 0x01A9 }, + { 0x0287, 0xA7B1 }, { 0x0288, 0x01AE }, + { 0x0289, 0x0244 }, { 0x028A, 0x01B1 }, { 0x028B, 0x01B2 }, + { 0x028C, 0x0245 }, { 0x0292, 0x01B7 }, + { 0x029D, 0xA7B2 }, + { 0x029E, 0xA7B0 }, + { 0x0345, 0x0399 }, + { 0x0371, 0x0370 }, + { 0x0373, 0x0372 }, + { 0x0377, 0x0376 }, + { 0x037B, 0x03FD }, + { 0x037C, 0x03FE }, + { 0x037D, 0x03FF }, { 0x03AC, 0x0386 }, { 0x03AD, 0x0388 }, { 0x03AE, 0x0389 }, @@ -248,6 +313,7 @@ static const int caps_table[CAPS_LEN][2] = { { 0x03BF, 0x039F }, { 0x03C0, 0x03A0 }, { 0x03C1, 0x03A1 }, + { 0x03C2, 0x03A3 }, { 0x03C3, 0x03A3 }, { 0x03C4, 0x03A4 }, { 0x03C5, 0x03A5 }, @@ -260,6 +326,16 @@ static const int caps_table[CAPS_LEN][2] = { { 0x03CC, 0x038C }, { 0x03CD, 0x038E }, { 0x03CE, 0x038F }, + { 0x03D0, 0x0392 }, + { 0x03D1, 0x0398 }, + { 0x03D5, 0x03A6 }, + { 0x03D6, 0x03A0 }, + { 0x03D7, 0x03CF }, + { 0x03D9, 0x03D8 }, + { 0x03DB, 0x03DA }, + { 0x03DD, 0x03DC }, + { 0x03DF, 0x03DE }, + { 0x03E1, 0x03E0 }, { 0x03E3, 0x03E2 }, { 0x03E5, 0x03E4 }, { 0x03E7, 0x03E6 }, @@ -267,6 +343,13 @@ static const int caps_table[CAPS_LEN][2] = { { 0x03EB, 0x03EA }, { 0x03ED, 0x03EC }, { 0x03EF, 0x03EE }, + { 0x03F0, 0x039A }, + { 0x03F1, 0x03A1 }, + { 0x03F2, 0x03F9 }, + { 0x03F3, 0x037F }, + { 0x03F5, 0x0395 }, + { 0x03F8, 0x03F7 }, + { 0x03FB, 0x03FA }, { 0x0430, 0x0410 }, { 0x0431, 0x0411 }, { 0x0432, 0x0412 }, @@ -299,6 +382,7 @@ static const int caps_table[CAPS_LEN][2] = { { 0x044D, 0x042D }, { 0x044E, 0x042E }, { 0x044F, 0x042F }, + { 0x0450, 0x0400 }, { 0x0451, 0x0401 }, { 0x0452, 0x0402 }, { 0x0453, 0x0403 }, @@ -311,6 +395,7 @@ static const int caps_table[CAPS_LEN][2] = { { 0x045A, 0x040A }, { 0x045B, 0x040B }, { 0x045C, 0x040C }, + { 0x045D, 0x040D }, { 0x045E, 0x040E }, { 0x045F, 0x040F }, { 0x0461, 0x0460 }, @@ -330,6 +415,9 @@ static const int caps_table[CAPS_LEN][2] = { { 0x047D, 0x047C }, { 0x047F, 0x047E }, { 0x0481, 0x0480 }, + { 0x048B, 0x048A }, + { 0x048D, 0x048C }, + { 0x048F, 0x048E }, { 0x0491, 0x0490 }, { 0x0493, 0x0492 }, { 0x0495, 0x0494 }, @@ -356,8 +444,12 @@ static const int caps_table[CAPS_LEN][2] = { { 0x04BF, 0x04BE }, { 0x04C2, 0x04C1 }, { 0x04C4, 0x04C3 }, + { 0x04C6, 0x04C5 }, { 0x04C8, 0x04C7 }, + { 0x04CA, 0x04C9 }, { 0x04CC, 0x04CB }, + { 0x04CE, 0x04CD }, + { 0x04CF, 0x04C0 }, { 0x04D1, 0x04D0 }, { 0x04D3, 0x04D2 }, { 0x04D5, 0x04D4 }, @@ -372,11 +464,40 @@ static const int caps_table[CAPS_LEN][2] = { { 0x04E7, 0x04E6 }, { 0x04E9, 0x04E8 }, { 0x04EB, 0x04EA }, + { 0x04ED, 0x04EC }, { 0x04EF, 0x04EE }, { 0x04F1, 0x04F0 }, { 0x04F3, 0x04F2 }, { 0x04F5, 0x04F4 }, + { 0x04F7, 0x04F6 }, { 0x04F9, 0x04F8 }, + { 0x04FB, 0x04FA }, + { 0x04FD, 0x04FC }, + { 0x04FF, 0x04FE }, + { 0x0501, 0x0500 }, + { 0x0503, 0x0502 }, + { 0x0505, 0x0504 }, + { 0x0507, 0x0506 }, + { 0x0509, 0x0508 }, + { 0x050B, 0x050A }, + { 0x050D, 0x050C }, + { 0x050F, 0x050E }, + { 0x0511, 0x0510 }, + { 0x0513, 0x0512 }, + { 0x0515, 0x0514 }, + { 0x0517, 0x0516 }, + { 0x0519, 0x0518 }, + { 0x051B, 0x051A }, + { 0x051D, 0x051C }, + { 0x051F, 0x051E }, + { 0x0521, 0x0520 }, + { 0x0523, 0x0522 }, + { 0x0525, 0x0524 }, + { 0x0527, 0x0526 }, + { 0x0529, 0x0528 }, + { 0x052B, 0x052A }, + { 0x052D, 0x052C }, + { 0x052F, 0x052E }, { 0x0561, 0x0531 }, { 0x0562, 0x0532 }, { 0x0563, 0x0533 }, @@ -415,44 +536,71 @@ static const int caps_table[CAPS_LEN][2] = { { 0x0584, 0x0554 }, { 0x0585, 0x0555 }, { 0x0586, 0x0556 }, - { 0x10D0, 0x10A0 }, - { 0x10D1, 0x10A1 }, - { 0x10D2, 0x10A2 }, - { 0x10D3, 0x10A3 }, - { 0x10D4, 0x10A4 }, - { 0x10D5, 0x10A5 }, - { 0x10D6, 0x10A6 }, - { 0x10D7, 0x10A7 }, - { 0x10D8, 0x10A8 }, - { 0x10D9, 0x10A9 }, - { 0x10DA, 0x10AA }, - { 0x10DB, 0x10AB }, - { 0x10DC, 0x10AC }, - { 0x10DD, 0x10AD }, - { 0x10DE, 0x10AE }, - { 0x10DF, 0x10AF }, - { 0x10E0, 0x10B0 }, - { 0x10E1, 0x10B1 }, - { 0x10E2, 0x10B2 }, - { 0x10E3, 0x10B3 }, - { 0x10E4, 0x10B4 }, - { 0x10E5, 0x10B5 }, - { 0x10E6, 0x10B6 }, - { 0x10E7, 0x10B7 }, - { 0x10E8, 0x10B8 }, - { 0x10E9, 0x10B9 }, - { 0x10EA, 0x10BA }, - { 0x10EB, 0x10BB }, - { 0x10EC, 0x10BC }, - { 0x10ED, 0x10BD }, - { 0x10EE, 0x10BE }, - { 0x10EF, 0x10BF }, - { 0x10F0, 0x10C0 }, - { 0x10F1, 0x10C1 }, - { 0x10F2, 0x10C2 }, - { 0x10F3, 0x10C3 }, - { 0x10F4, 0x10C4 }, - { 0x10F5, 0x10C5 }, + { 0x10D0, 0x1C90 }, + { 0x10D1, 0x1C91 }, + { 0x10D2, 0x1C92 }, + { 0x10D3, 0x1C93 }, + { 0x10D4, 0x1C94 }, + { 0x10D5, 0x1C95 }, + { 0x10D6, 0x1C96 }, + { 0x10D7, 0x1C97 }, + { 0x10D8, 0x1C98 }, + { 0x10D9, 0x1C99 }, + { 0x10DA, 0x1C9A }, + { 0x10DB, 0x1C9B }, + { 0x10DC, 0x1C9C }, + { 0x10DD, 0x1C9D }, + { 0x10DE, 0x1C9E }, + { 0x10DF, 0x1C9F }, + { 0x10E0, 0x1CA0 }, + { 0x10E1, 0x1CA1 }, + { 0x10E2, 0x1CA2 }, + { 0x10E3, 0x1CA3 }, + { 0x10E4, 0x1CA4 }, + { 0x10E5, 0x1CA5 }, + { 0x10E6, 0x1CA6 }, + { 0x10E7, 0x1CA7 }, + { 0x10E8, 0x1CA8 }, + { 0x10E9, 0x1CA9 }, + { 0x10EA, 0x1CAA }, + { 0x10EB, 0x1CAB }, + { 0x10EC, 0x1CAC }, + { 0x10ED, 0x1CAD }, + { 0x10EE, 0x1CAE }, + { 0x10EF, 0x1CAF }, + { 0x10F0, 0x1CB0 }, + { 0x10F1, 0x1CB1 }, + { 0x10F2, 0x1CB2 }, + { 0x10F3, 0x1CB3 }, + { 0x10F4, 0x1CB4 }, + { 0x10F5, 0x1CB5 }, + { 0x10F6, 0x1CB6 }, + { 0x10F7, 0x1CB7 }, + { 0x10F8, 0x1CB8 }, + { 0x10F9, 0x1CB9 }, + { 0x10FA, 0x1CBA }, + { 0x10FD, 0x1CBD }, + { 0x10FE, 0x1CBE }, + { 0x10FF, 0x1CBF }, + { 0x13F8, 0x13F0 }, + { 0x13F9, 0x13F1 }, + { 0x13FA, 0x13F2 }, + { 0x13FB, 0x13F3 }, + { 0x13FC, 0x13F4 }, + { 0x13FD, 0x13F5 }, + { 0x1C80, 0x0412 }, + { 0x1C81, 0x0414 }, + { 0x1C82, 0x041E }, + { 0x1C83, 0x0421 }, + { 0x1C84, 0x0422 }, + { 0x1C85, 0x0422 }, + { 0x1C86, 0x042A }, + { 0x1C87, 0x0462 }, + { 0x1C88, 0xA64A }, + { 0x1C8A, 0x1C89 }, + { 0x1D79, 0xA77D }, + { 0x1D7D, 0x2C63 }, + { 0x1D8E, 0xA7C6 }, { 0x1E01, 0x1E00 }, { 0x1E03, 0x1E02 }, { 0x1E05, 0x1E04 }, @@ -528,6 +676,7 @@ static const int caps_table[CAPS_LEN][2] = { { 0x1E91, 0x1E90 }, { 0x1E93, 0x1E92 }, { 0x1E95, 0x1E94 }, + { 0x1E9B, 0x1E60 }, { 0x1EA1, 0x1EA0 }, { 0x1EA3, 0x1EA2 }, { 0x1EA5, 0x1EA4 }, @@ -573,6 +722,9 @@ static const int caps_table[CAPS_LEN][2] = { { 0x1EF5, 0x1EF4 }, { 0x1EF7, 0x1EF6 }, { 0x1EF9, 0x1EF8 }, + { 0x1EFB, 0x1EFA }, + { 0x1EFD, 0x1EFC }, + { 0x1EFF, 0x1EFE }, { 0x1F00, 0x1F08 }, { 0x1F01, 0x1F09 }, { 0x1F02, 0x1F0A }, @@ -621,6 +773,20 @@ static const int caps_table[CAPS_LEN][2] = { { 0x1F65, 0x1F6D }, { 0x1F66, 0x1F6E }, { 0x1F67, 0x1F6F }, + { 0x1F70, 0x1FBA }, + { 0x1F71, 0x1FBB }, + { 0x1F72, 0x1FC8 }, + { 0x1F73, 0x1FC9 }, + { 0x1F74, 0x1FCA }, + { 0x1F75, 0x1FCB }, + { 0x1F76, 0x1FDA }, + { 0x1F77, 0x1FDB }, + { 0x1F78, 0x1FF8 }, + { 0x1F79, 0x1FF9 }, + { 0x1F7A, 0x1FEA }, + { 0x1F7B, 0x1FEB }, + { 0x1F7C, 0x1FFA }, + { 0x1F7D, 0x1FFB }, { 0x1F80, 0x1F88 }, { 0x1F81, 0x1F89 }, { 0x1F82, 0x1F8A }, @@ -647,10 +813,33 @@ static const int caps_table[CAPS_LEN][2] = { { 0x1FA7, 0x1FAF }, { 0x1FB0, 0x1FB8 }, { 0x1FB1, 0x1FB9 }, + { 0x1FB3, 0x1FBC }, + { 0x1FBE, 0x0399 }, + { 0x1FC3, 0x1FCC }, { 0x1FD0, 0x1FD8 }, { 0x1FD1, 0x1FD9 }, { 0x1FE0, 0x1FE8 }, { 0x1FE1, 0x1FE9 }, + { 0x1FE5, 0x1FEC }, + { 0x1FF3, 0x1FFC }, + { 0x214E, 0x2132 }, + { 0x2170, 0x2160 }, + { 0x2171, 0x2161 }, + { 0x2172, 0x2162 }, + { 0x2173, 0x2163 }, + { 0x2174, 0x2164 }, + { 0x2175, 0x2165 }, + { 0x2176, 0x2166 }, + { 0x2177, 0x2167 }, + { 0x2178, 0x2168 }, + { 0x2179, 0x2169 }, + { 0x217A, 0x216A }, + { 0x217B, 0x216B }, + { 0x217C, 0x216C }, + { 0x217D, 0x216D }, + { 0x217E, 0x216E }, + { 0x217F, 0x216F }, + { 0x2184, 0x2183 }, { 0x24D0, 0x24B6 }, { 0x24D1, 0x24B7 }, { 0x24D2, 0x24B8 }, @@ -677,6 +866,348 @@ static const int caps_table[CAPS_LEN][2] = { { 0x24E7, 0x24CD }, { 0x24E8, 0x24CE }, { 0x24E9, 0x24CF }, + { 0x2C30, 0x2C00 }, + { 0x2C31, 0x2C01 }, + { 0x2C32, 0x2C02 }, + { 0x2C33, 0x2C03 }, + { 0x2C34, 0x2C04 }, + { 0x2C35, 0x2C05 }, + { 0x2C36, 0x2C06 }, + { 0x2C37, 0x2C07 }, + { 0x2C38, 0x2C08 }, + { 0x2C39, 0x2C09 }, + { 0x2C3A, 0x2C0A }, + { 0x2C3B, 0x2C0B }, + { 0x2C3C, 0x2C0C }, + { 0x2C3D, 0x2C0D }, + { 0x2C3E, 0x2C0E }, + { 0x2C3F, 0x2C0F }, + { 0x2C40, 0x2C10 }, + { 0x2C41, 0x2C11 }, + { 0x2C42, 0x2C12 }, + { 0x2C43, 0x2C13 }, + { 0x2C44, 0x2C14 }, + { 0x2C45, 0x2C15 }, + { 0x2C46, 0x2C16 }, + { 0x2C47, 0x2C17 }, + { 0x2C48, 0x2C18 }, + { 0x2C49, 0x2C19 }, + { 0x2C4A, 0x2C1A }, + { 0x2C4B, 0x2C1B }, + { 0x2C4C, 0x2C1C }, + { 0x2C4D, 0x2C1D }, + { 0x2C4E, 0x2C1E }, + { 0x2C4F, 0x2C1F }, + { 0x2C50, 0x2C20 }, + { 0x2C51, 0x2C21 }, + { 0x2C52, 0x2C22 }, + { 0x2C53, 0x2C23 }, + { 0x2C54, 0x2C24 }, + { 0x2C55, 0x2C25 }, + { 0x2C56, 0x2C26 }, + { 0x2C57, 0x2C27 }, + { 0x2C58, 0x2C28 }, + { 0x2C59, 0x2C29 }, + { 0x2C5A, 0x2C2A }, + { 0x2C5B, 0x2C2B }, + { 0x2C5C, 0x2C2C }, + { 0x2C5D, 0x2C2D }, + { 0x2C5E, 0x2C2E }, + { 0x2C5F, 0x2C2F }, + { 0x2C61, 0x2C60 }, + { 0x2C65, 0x023A }, + { 0x2C66, 0x023E }, + { 0x2C68, 0x2C67 }, + { 0x2C6A, 0x2C69 }, + { 0x2C6C, 0x2C6B }, + { 0x2C73, 0x2C72 }, + { 0x2C76, 0x2C75 }, + { 0x2C81, 0x2C80 }, + { 0x2C83, 0x2C82 }, + { 0x2C85, 0x2C84 }, + { 0x2C87, 0x2C86 }, + { 0x2C89, 0x2C88 }, + { 0x2C8B, 0x2C8A }, + { 0x2C8D, 0x2C8C }, + { 0x2C8F, 0x2C8E }, + { 0x2C91, 0x2C90 }, + { 0x2C93, 0x2C92 }, + { 0x2C95, 0x2C94 }, + { 0x2C97, 0x2C96 }, + { 0x2C99, 0x2C98 }, + { 0x2C9B, 0x2C9A }, + { 0x2C9D, 0x2C9C }, + { 0x2C9F, 0x2C9E }, + { 0x2CA1, 0x2CA0 }, + { 0x2CA3, 0x2CA2 }, + { 0x2CA5, 0x2CA4 }, + { 0x2CA7, 0x2CA6 }, + { 0x2CA9, 0x2CA8 }, + { 0x2CAB, 0x2CAA }, + { 0x2CAD, 0x2CAC }, + { 0x2CAF, 0x2CAE }, + { 0x2CB1, 0x2CB0 }, + { 0x2CB3, 0x2CB2 }, + { 0x2CB5, 0x2CB4 }, + { 0x2CB7, 0x2CB6 }, + { 0x2CB9, 0x2CB8 }, + { 0x2CBB, 0x2CBA }, + { 0x2CBD, 0x2CBC }, + { 0x2CBF, 0x2CBE }, + { 0x2CC1, 0x2CC0 }, + { 0x2CC3, 0x2CC2 }, + { 0x2CC5, 0x2CC4 }, + { 0x2CC7, 0x2CC6 }, + { 0x2CC9, 0x2CC8 }, + { 0x2CCB, 0x2CCA }, + { 0x2CCD, 0x2CCC }, + { 0x2CCF, 0x2CCE }, + { 0x2CD1, 0x2CD0 }, + { 0x2CD3, 0x2CD2 }, + { 0x2CD5, 0x2CD4 }, + { 0x2CD7, 0x2CD6 }, + { 0x2CD9, 0x2CD8 }, + { 0x2CDB, 0x2CDA }, + { 0x2CDD, 0x2CDC }, + { 0x2CDF, 0x2CDE }, + { 0x2CE1, 0x2CE0 }, + { 0x2CE3, 0x2CE2 }, + { 0x2CEC, 0x2CEB }, + { 0x2CEE, 0x2CED }, + { 0x2CF3, 0x2CF2 }, + { 0x2D00, 0x10A0 }, + { 0x2D01, 0x10A1 }, + { 0x2D02, 0x10A2 }, + { 0x2D03, 0x10A3 }, + { 0x2D04, 0x10A4 }, + { 0x2D05, 0x10A5 }, + { 0x2D06, 0x10A6 }, + { 0x2D07, 0x10A7 }, + { 0x2D08, 0x10A8 }, + { 0x2D09, 0x10A9 }, + { 0x2D0A, 0x10AA }, + { 0x2D0B, 0x10AB }, + { 0x2D0C, 0x10AC }, + { 0x2D0D, 0x10AD }, + { 0x2D0E, 0x10AE }, + { 0x2D0F, 0x10AF }, + { 0x2D10, 0x10B0 }, + { 0x2D11, 0x10B1 }, + { 0x2D12, 0x10B2 }, + { 0x2D13, 0x10B3 }, + { 0x2D14, 0x10B4 }, + { 0x2D15, 0x10B5 }, + { 0x2D16, 0x10B6 }, + { 0x2D17, 0x10B7 }, + { 0x2D18, 0x10B8 }, + { 0x2D19, 0x10B9 }, + { 0x2D1A, 0x10BA }, + { 0x2D1B, 0x10BB }, + { 0x2D1C, 0x10BC }, + { 0x2D1D, 0x10BD }, + { 0x2D1E, 0x10BE }, + { 0x2D1F, 0x10BF }, + { 0x2D20, 0x10C0 }, + { 0x2D21, 0x10C1 }, + { 0x2D22, 0x10C2 }, + { 0x2D23, 0x10C3 }, + { 0x2D24, 0x10C4 }, + { 0x2D25, 0x10C5 }, + { 0x2D27, 0x10C7 }, + { 0x2D2D, 0x10CD }, + { 0xA641, 0xA640 }, + { 0xA643, 0xA642 }, + { 0xA645, 0xA644 }, + { 0xA647, 0xA646 }, + { 0xA649, 0xA648 }, + { 0xA64B, 0xA64A }, + { 0xA64D, 0xA64C }, + { 0xA64F, 0xA64E }, + { 0xA651, 0xA650 }, + { 0xA653, 0xA652 }, + { 0xA655, 0xA654 }, + { 0xA657, 0xA656 }, + { 0xA659, 0xA658 }, + { 0xA65B, 0xA65A }, + { 0xA65D, 0xA65C }, + { 0xA65F, 0xA65E }, + { 0xA661, 0xA660 }, + { 0xA663, 0xA662 }, + { 0xA665, 0xA664 }, + { 0xA667, 0xA666 }, + { 0xA669, 0xA668 }, + { 0xA66B, 0xA66A }, + { 0xA66D, 0xA66C }, + { 0xA681, 0xA680 }, + { 0xA683, 0xA682 }, + { 0xA685, 0xA684 }, + { 0xA687, 0xA686 }, + { 0xA689, 0xA688 }, + { 0xA68B, 0xA68A }, + { 0xA68D, 0xA68C }, + { 0xA68F, 0xA68E }, + { 0xA691, 0xA690 }, + { 0xA693, 0xA692 }, + { 0xA695, 0xA694 }, + { 0xA697, 0xA696 }, + { 0xA699, 0xA698 }, + { 0xA69B, 0xA69A }, + { 0xA723, 0xA722 }, + { 0xA725, 0xA724 }, + { 0xA727, 0xA726 }, + { 0xA729, 0xA728 }, + { 0xA72B, 0xA72A }, + { 0xA72D, 0xA72C }, + { 0xA72F, 0xA72E }, + { 0xA733, 0xA732 }, + { 0xA735, 0xA734 }, + { 0xA737, 0xA736 }, + { 0xA739, 0xA738 }, + { 0xA73B, 0xA73A }, + { 0xA73D, 0xA73C }, + { 0xA73F, 0xA73E }, + { 0xA741, 0xA740 }, + { 0xA743, 0xA742 }, + { 0xA745, 0xA744 }, + { 0xA747, 0xA746 }, + { 0xA749, 0xA748 }, + { 0xA74B, 0xA74A }, + { 0xA74D, 0xA74C }, + { 0xA74F, 0xA74E }, + { 0xA751, 0xA750 }, + { 0xA753, 0xA752 }, + { 0xA755, 0xA754 }, + { 0xA757, 0xA756 }, + { 0xA759, 0xA758 }, + { 0xA75B, 0xA75A }, + { 0xA75D, 0xA75C }, + { 0xA75F, 0xA75E }, + { 0xA761, 0xA760 }, + { 0xA763, 0xA762 }, + { 0xA765, 0xA764 }, + { 0xA767, 0xA766 }, + { 0xA769, 0xA768 }, + { 0xA76B, 0xA76A }, + { 0xA76D, 0xA76C }, + { 0xA76F, 0xA76E }, + { 0xA77A, 0xA779 }, + { 0xA77C, 0xA77B }, + { 0xA77F, 0xA77E }, + { 0xA781, 0xA780 }, + { 0xA783, 0xA782 }, + { 0xA785, 0xA784 }, + { 0xA787, 0xA786 }, + { 0xA78C, 0xA78B }, + { 0xA791, 0xA790 }, + { 0xA793, 0xA792 }, + { 0xA794, 0xA7C4 }, + { 0xA797, 0xA796 }, + { 0xA799, 0xA798 }, + { 0xA79B, 0xA79A }, + { 0xA79D, 0xA79C }, + { 0xA79F, 0xA79E }, + { 0xA7A1, 0xA7A0 }, + { 0xA7A3, 0xA7A2 }, + { 0xA7A5, 0xA7A4 }, + { 0xA7A7, 0xA7A6 }, + { 0xA7A9, 0xA7A8 }, + { 0xA7B5, 0xA7B4 }, + { 0xA7B7, 0xA7B6 }, + { 0xA7B9, 0xA7B8 }, + { 0xA7BB, 0xA7BA }, + { 0xA7BD, 0xA7BC }, + { 0xA7BF, 0xA7BE }, + { 0xA7C1, 0xA7C0 }, + { 0xA7C3, 0xA7C2 }, + { 0xA7C8, 0xA7C7 }, + { 0xA7CA, 0xA7C9 }, + { 0xA7CD, 0xA7CC }, + { 0xA7D1, 0xA7D0 }, + { 0xA7D7, 0xA7D6 }, + { 0xA7D9, 0xA7D8 }, + { 0xA7DB, 0xA7DA }, + { 0xA7F6, 0xA7F5 }, + { 0xAB53, 0xA7B3 }, + { 0xAB70, 0x13A0 }, + { 0xAB71, 0x13A1 }, + { 0xAB72, 0x13A2 }, + { 0xAB73, 0x13A3 }, + { 0xAB74, 0x13A4 }, + { 0xAB75, 0x13A5 }, + { 0xAB76, 0x13A6 }, + { 0xAB77, 0x13A7 }, + { 0xAB78, 0x13A8 }, + { 0xAB79, 0x13A9 }, + { 0xAB7A, 0x13AA }, + { 0xAB7B, 0x13AB }, + { 0xAB7C, 0x13AC }, + { 0xAB7D, 0x13AD }, + { 0xAB7E, 0x13AE }, + { 0xAB7F, 0x13AF }, + { 0xAB80, 0x13B0 }, + { 0xAB81, 0x13B1 }, + { 0xAB82, 0x13B2 }, + { 0xAB83, 0x13B3 }, + { 0xAB84, 0x13B4 }, + { 0xAB85, 0x13B5 }, + { 0xAB86, 0x13B6 }, + { 0xAB87, 0x13B7 }, + { 0xAB88, 0x13B8 }, + { 0xAB89, 0x13B9 }, + { 0xAB8A, 0x13BA }, + { 0xAB8B, 0x13BB }, + { 0xAB8C, 0x13BC }, + { 0xAB8D, 0x13BD }, + { 0xAB8E, 0x13BE }, + { 0xAB8F, 0x13BF }, + { 0xAB90, 0x13C0 }, + { 0xAB91, 0x13C1 }, + { 0xAB92, 0x13C2 }, + { 0xAB93, 0x13C3 }, + { 0xAB94, 0x13C4 }, + { 0xAB95, 0x13C5 }, + { 0xAB96, 0x13C6 }, + { 0xAB97, 0x13C7 }, + { 0xAB98, 0x13C8 }, + { 0xAB99, 0x13C9 }, + { 0xAB9A, 0x13CA }, + { 0xAB9B, 0x13CB }, + { 0xAB9C, 0x13CC }, + { 0xAB9D, 0x13CD }, + { 0xAB9E, 0x13CE }, + { 0xAB9F, 0x13CF }, + { 0xABA0, 0x13D0 }, + { 0xABA1, 0x13D1 }, + { 0xABA2, 0x13D2 }, + { 0xABA3, 0x13D3 }, + { 0xABA4, 0x13D4 }, + { 0xABA5, 0x13D5 }, + { 0xABA6, 0x13D6 }, + { 0xABA7, 0x13D7 }, + { 0xABA8, 0x13D8 }, + { 0xABA9, 0x13D9 }, + { 0xABAA, 0x13DA }, + { 0xABAB, 0x13DB }, + { 0xABAC, 0x13DC }, + { 0xABAD, 0x13DD }, + { 0xABAE, 0x13DE }, + { 0xABAF, 0x13DF }, + { 0xABB0, 0x13E0 }, + { 0xABB1, 0x13E1 }, + { 0xABB2, 0x13E2 }, + { 0xABB3, 0x13E3 }, + { 0xABB4, 0x13E4 }, + { 0xABB5, 0x13E5 }, + { 0xABB6, 0x13E6 }, + { 0xABB7, 0x13E7 }, + { 0xABB8, 0x13E8 }, + { 0xABB9, 0x13E9 }, + { 0xABBA, 0x13EA }, + { 0xABBB, 0x13EB }, + { 0xABBC, 0x13EC }, + { 0xABBD, 0x13ED }, + { 0xABBE, 0x13EE }, + { 0xABBF, 0x13EF }, { 0xFF41, 0xFF21 }, { 0xFF42, 0xFF22 }, { 0xFF43, 0xFF23 }, @@ -703,9 +1234,291 @@ static const int caps_table[CAPS_LEN][2] = { { 0xFF58, 0xFF38 }, { 0xFF59, 0xFF39 }, { 0xFF5A, 0xFF3A }, + { 0x10428, 0x10400 }, + { 0x10429, 0x10401 }, + { 0x1042A, 0x10402 }, + { 0x1042B, 0x10403 }, + { 0x1042C, 0x10404 }, + { 0x1042D, 0x10405 }, + { 0x1042E, 0x10406 }, + { 0x1042F, 0x10407 }, + { 0x10430, 0x10408 }, + { 0x10431, 0x10409 }, + { 0x10432, 0x1040A }, + { 0x10433, 0x1040B }, + { 0x10434, 0x1040C }, + { 0x10435, 0x1040D }, + { 0x10436, 0x1040E }, + { 0x10437, 0x1040F }, + { 0x10438, 0x10410 }, + { 0x10439, 0x10411 }, + { 0x1043A, 0x10412 }, + { 0x1043B, 0x10413 }, + { 0x1043C, 0x10414 }, + { 0x1043D, 0x10415 }, + { 0x1043E, 0x10416 }, + { 0x1043F, 0x10417 }, + { 0x10440, 0x10418 }, + { 0x10441, 0x10419 }, + { 0x10442, 0x1041A }, + { 0x10443, 0x1041B }, + { 0x10444, 0x1041C }, + { 0x10445, 0x1041D }, + { 0x10446, 0x1041E }, + { 0x10447, 0x1041F }, + { 0x10448, 0x10420 }, + { 0x10449, 0x10421 }, + { 0x1044A, 0x10422 }, + { 0x1044B, 0x10423 }, + { 0x1044C, 0x10424 }, + { 0x1044D, 0x10425 }, + { 0x1044E, 0x10426 }, + { 0x1044F, 0x10427 }, + { 0x104D8, 0x104B0 }, + { 0x104D9, 0x104B1 }, + { 0x104DA, 0x104B2 }, + { 0x104DB, 0x104B3 }, + { 0x104DC, 0x104B4 }, + { 0x104DD, 0x104B5 }, + { 0x104DE, 0x104B6 }, + { 0x104DF, 0x104B7 }, + { 0x104E0, 0x104B8 }, + { 0x104E1, 0x104B9 }, + { 0x104E2, 0x104BA }, + { 0x104E3, 0x104BB }, + { 0x104E4, 0x104BC }, + { 0x104E5, 0x104BD }, + { 0x104E6, 0x104BE }, + { 0x104E7, 0x104BF }, + { 0x104E8, 0x104C0 }, + { 0x104E9, 0x104C1 }, + { 0x104EA, 0x104C2 }, + { 0x104EB, 0x104C3 }, + { 0x104EC, 0x104C4 }, + { 0x104ED, 0x104C5 }, + { 0x104EE, 0x104C6 }, + { 0x104EF, 0x104C7 }, + { 0x104F0, 0x104C8 }, + { 0x104F1, 0x104C9 }, + { 0x104F2, 0x104CA }, + { 0x104F3, 0x104CB }, + { 0x104F4, 0x104CC }, + { 0x104F5, 0x104CD }, + { 0x104F6, 0x104CE }, + { 0x104F7, 0x104CF }, + { 0x104F8, 0x104D0 }, + { 0x104F9, 0x104D1 }, + { 0x104FA, 0x104D2 }, + { 0x104FB, 0x104D3 }, + { 0x10597, 0x10570 }, + { 0x10598, 0x10571 }, + { 0x10599, 0x10572 }, + { 0x1059A, 0x10573 }, + { 0x1059B, 0x10574 }, + { 0x1059C, 0x10575 }, + { 0x1059D, 0x10576 }, + { 0x1059E, 0x10577 }, + { 0x1059F, 0x10578 }, + { 0x105A0, 0x10579 }, + { 0x105A1, 0x1057A }, + { 0x105A3, 0x1057C }, + { 0x105A4, 0x1057D }, + { 0x105A5, 0x1057E }, + { 0x105A6, 0x1057F }, + { 0x105A7, 0x10580 }, + { 0x105A8, 0x10581 }, + { 0x105A9, 0x10582 }, + { 0x105AA, 0x10583 }, + { 0x105AB, 0x10584 }, + { 0x105AC, 0x10585 }, + { 0x105AD, 0x10586 }, + { 0x105AE, 0x10587 }, + { 0x105AF, 0x10588 }, + { 0x105B0, 0x10589 }, + { 0x105B1, 0x1058A }, + { 0x105B3, 0x1058C }, + { 0x105B4, 0x1058D }, + { 0x105B5, 0x1058E }, + { 0x105B6, 0x1058F }, + { 0x105B7, 0x10590 }, + { 0x105B8, 0x10591 }, + { 0x105B9, 0x10592 }, + { 0x105BB, 0x10594 }, + { 0x105BC, 0x10595 }, + { 0x10CC0, 0x10C80 }, + { 0x10CC1, 0x10C81 }, + { 0x10CC2, 0x10C82 }, + { 0x10CC3, 0x10C83 }, + { 0x10CC4, 0x10C84 }, + { 0x10CC5, 0x10C85 }, + { 0x10CC6, 0x10C86 }, + { 0x10CC7, 0x10C87 }, + { 0x10CC8, 0x10C88 }, + { 0x10CC9, 0x10C89 }, + { 0x10CCA, 0x10C8A }, + { 0x10CCB, 0x10C8B }, + { 0x10CCC, 0x10C8C }, + { 0x10CCD, 0x10C8D }, + { 0x10CCE, 0x10C8E }, + { 0x10CCF, 0x10C8F }, + { 0x10CD0, 0x10C90 }, + { 0x10CD1, 0x10C91 }, + { 0x10CD2, 0x10C92 }, + { 0x10CD3, 0x10C93 }, + { 0x10CD4, 0x10C94 }, + { 0x10CD5, 0x10C95 }, + { 0x10CD6, 0x10C96 }, + { 0x10CD7, 0x10C97 }, + { 0x10CD8, 0x10C98 }, + { 0x10CD9, 0x10C99 }, + { 0x10CDA, 0x10C9A }, + { 0x10CDB, 0x10C9B }, + { 0x10CDC, 0x10C9C }, + { 0x10CDD, 0x10C9D }, + { 0x10CDE, 0x10C9E }, + { 0x10CDF, 0x10C9F }, + { 0x10CE0, 0x10CA0 }, + { 0x10CE1, 0x10CA1 }, + { 0x10CE2, 0x10CA2 }, + { 0x10CE3, 0x10CA3 }, + { 0x10CE4, 0x10CA4 }, + { 0x10CE5, 0x10CA5 }, + { 0x10CE6, 0x10CA6 }, + { 0x10CE7, 0x10CA7 }, + { 0x10CE8, 0x10CA8 }, + { 0x10CE9, 0x10CA9 }, + { 0x10CEA, 0x10CAA }, + { 0x10CEB, 0x10CAB }, + { 0x10CEC, 0x10CAC }, + { 0x10CED, 0x10CAD }, + { 0x10CEE, 0x10CAE }, + { 0x10CEF, 0x10CAF }, + { 0x10CF0, 0x10CB0 }, + { 0x10CF1, 0x10CB1 }, + { 0x10CF2, 0x10CB2 }, + { 0x10D70, 0x10D50 }, + { 0x10D71, 0x10D51 }, + { 0x10D72, 0x10D52 }, + { 0x10D73, 0x10D53 }, + { 0x10D74, 0x10D54 }, + { 0x10D75, 0x10D55 }, + { 0x10D76, 0x10D56 }, + { 0x10D77, 0x10D57 }, + { 0x10D78, 0x10D58 }, + { 0x10D79, 0x10D59 }, + { 0x10D7A, 0x10D5A }, + { 0x10D7B, 0x10D5B }, + { 0x10D7C, 0x10D5C }, + { 0x10D7D, 0x10D5D }, + { 0x10D7E, 0x10D5E }, + { 0x10D7F, 0x10D5F }, + { 0x10D80, 0x10D60 }, + { 0x10D81, 0x10D61 }, + { 0x10D82, 0x10D62 }, + { 0x10D83, 0x10D63 }, + { 0x10D84, 0x10D64 }, + { 0x10D85, 0x10D65 }, + { 0x118C0, 0x118A0 }, + { 0x118C1, 0x118A1 }, + { 0x118C2, 0x118A2 }, + { 0x118C3, 0x118A3 }, + { 0x118C4, 0x118A4 }, + { 0x118C5, 0x118A5 }, + { 0x118C6, 0x118A6 }, + { 0x118C7, 0x118A7 }, + { 0x118C8, 0x118A8 }, + { 0x118C9, 0x118A9 }, + { 0x118CA, 0x118AA }, + { 0x118CB, 0x118AB }, + { 0x118CC, 0x118AC }, + { 0x118CD, 0x118AD }, + { 0x118CE, 0x118AE }, + { 0x118CF, 0x118AF }, + { 0x118D0, 0x118B0 }, + { 0x118D1, 0x118B1 }, + { 0x118D2, 0x118B2 }, + { 0x118D3, 0x118B3 }, + { 0x118D4, 0x118B4 }, + { 0x118D5, 0x118B5 }, + { 0x118D6, 0x118B6 }, + { 0x118D7, 0x118B7 }, + { 0x118D8, 0x118B8 }, + { 0x118D9, 0x118B9 }, + { 0x118DA, 0x118BA }, + { 0x118DB, 0x118BB }, + { 0x118DC, 0x118BC }, + { 0x118DD, 0x118BD }, + { 0x118DE, 0x118BE }, + { 0x118DF, 0x118BF }, + { 0x16E60, 0x16E40 }, + { 0x16E61, 0x16E41 }, + { 0x16E62, 0x16E42 }, + { 0x16E63, 0x16E43 }, + { 0x16E64, 0x16E44 }, + { 0x16E65, 0x16E45 }, + { 0x16E66, 0x16E46 }, + { 0x16E67, 0x16E47 }, + { 0x16E68, 0x16E48 }, + { 0x16E69, 0x16E49 }, + { 0x16E6A, 0x16E4A }, + { 0x16E6B, 0x16E4B }, + { 0x16E6C, 0x16E4C }, + { 0x16E6D, 0x16E4D }, + { 0x16E6E, 0x16E4E }, + { 0x16E6F, 0x16E4F }, + { 0x16E70, 0x16E50 }, + { 0x16E71, 0x16E51 }, + { 0x16E72, 0x16E52 }, + { 0x16E73, 0x16E53 }, + { 0x16E74, 0x16E54 }, + { 0x16E75, 0x16E55 }, + { 0x16E76, 0x16E56 }, + { 0x16E77, 0x16E57 }, + { 0x16E78, 0x16E58 }, + { 0x16E79, 0x16E59 }, + { 0x16E7A, 0x16E5A }, + { 0x16E7B, 0x16E5B }, + { 0x16E7C, 0x16E5C }, + { 0x16E7D, 0x16E5D }, + { 0x16E7E, 0x16E5E }, + { 0x16E7F, 0x16E5F }, + { 0x1E922, 0x1E900 }, + { 0x1E923, 0x1E901 }, + { 0x1E924, 0x1E902 }, + { 0x1E925, 0x1E903 }, + { 0x1E926, 0x1E904 }, + { 0x1E927, 0x1E905 }, + { 0x1E928, 0x1E906 }, + { 0x1E929, 0x1E907 }, + { 0x1E92A, 0x1E908 }, + { 0x1E92B, 0x1E909 }, + { 0x1E92C, 0x1E90A }, + { 0x1E92D, 0x1E90B }, + { 0x1E92E, 0x1E90C }, + { 0x1E92F, 0x1E90D }, + { 0x1E930, 0x1E90E }, + { 0x1E931, 0x1E90F }, + { 0x1E932, 0x1E910 }, + { 0x1E933, 0x1E911 }, + { 0x1E934, 0x1E912 }, + { 0x1E935, 0x1E913 }, + { 0x1E936, 0x1E914 }, + { 0x1E937, 0x1E915 }, + { 0x1E938, 0x1E916 }, + { 0x1E939, 0x1E917 }, + { 0x1E93A, 0x1E918 }, + { 0x1E93B, 0x1E919 }, + { 0x1E93C, 0x1E91A }, + { 0x1E93D, 0x1E91B }, + { 0x1E93E, 0x1E91C }, + { 0x1E93F, 0x1E91D }, + { 0x1E940, 0x1E91E }, + { 0x1E941, 0x1E91F }, + { 0x1E942, 0x1E920 }, + { 0x1E943, 0x1E921 }, }; -static const int reverse_caps_table[CAPS_LEN - 1][2] = { +static const int reverse_caps_table[UTL_LEN][2] = { { 0x0041, 0x0061 }, { 0x0042, 0x0062 }, { 0x0043, 0x0063 }, @@ -715,7 +1528,6 @@ static const int reverse_caps_table[CAPS_LEN - 1][2] = { { 0x0047, 0x0067 }, { 0x0048, 0x0068 }, { 0x0049, 0x0069 }, - // { 0x0049, 0x0131 }, // dotless I { 0x004A, 0x006A }, { 0x004B, 0x006B }, { 0x004C, 0x006C }, @@ -787,6 +1599,7 @@ static const int reverse_caps_table[CAPS_LEN - 1][2] = { { 0x012A, 0x012B }, { 0x012C, 0x012D }, { 0x012E, 0x012F }, + { 0x0130, 0x0069 }, { 0x0132, 0x0133 }, { 0x0134, 0x0135 }, { 0x0136, 0x0137 }, @@ -830,9 +1643,10 @@ static const int reverse_caps_table[CAPS_LEN - 1][2] = { { 0x0184, 0x0185 }, { 0x0186, 0x0254 }, { 0x0187, 0x0188 }, + { 0x0189, 0x0256 }, { 0x018A, 0x0257 }, { 0x018B, 0x018C }, - { 0x018E, 0x0258 }, + { 0x018E, 0x01DD }, { 0x018F, 0x0259 }, { 0x0190, 0x025B }, { 0x0191, 0x0192 }, @@ -847,6 +1661,7 @@ static const int reverse_caps_table[CAPS_LEN - 1][2] = { { 0x01A0, 0x01A1 }, { 0x01A2, 0x01A3 }, { 0x01A4, 0x01A5 }, + { 0x01A6, 0x0280 }, { 0x01A7, 0x01A8 }, { 0x01A9, 0x0283 }, { 0x01AC, 0x01AD }, @@ -860,8 +1675,11 @@ static const int reverse_caps_table[CAPS_LEN - 1][2] = { { 0x01B8, 0x01B9 }, { 0x01BC, 0x01BD }, { 0x01C4, 0x01C6 }, + { 0x01C5, 0x01C6 }, { 0x01C7, 0x01C9 }, + { 0x01C8, 0x01C9 }, { 0x01CA, 0x01CC }, + { 0x01CB, 0x01CC }, { 0x01CD, 0x01CE }, { 0x01CF, 0x01D0 }, { 0x01D1, 0x01D2 }, @@ -880,7 +1698,11 @@ static const int reverse_caps_table[CAPS_LEN - 1][2] = { { 0x01EC, 0x01ED }, { 0x01EE, 0x01EF }, { 0x01F1, 0x01F3 }, + { 0x01F2, 0x01F3 }, { 0x01F4, 0x01F5 }, + { 0x01F6, 0x0195 }, + { 0x01F7, 0x01BF }, + { 0x01F8, 0x01F9 }, { 0x01FA, 0x01FB }, { 0x01FC, 0x01FD }, { 0x01FE, 0x01FF }, @@ -896,6 +1718,37 @@ static const int reverse_caps_table[CAPS_LEN - 1][2] = { { 0x0212, 0x0213 }, { 0x0214, 0x0215 }, { 0x0216, 0x0217 }, + { 0x0218, 0x0219 }, + { 0x021A, 0x021B }, + { 0x021C, 0x021D }, + { 0x021E, 0x021F }, + { 0x0220, 0x019E }, + { 0x0222, 0x0223 }, + { 0x0224, 0x0225 }, + { 0x0226, 0x0227 }, + { 0x0228, 0x0229 }, + { 0x022A, 0x022B }, + { 0x022C, 0x022D }, + { 0x022E, 0x022F }, + { 0x0230, 0x0231 }, + { 0x0232, 0x0233 }, + { 0x023A, 0x2C65 }, + { 0x023B, 0x023C }, + { 0x023D, 0x019A }, + { 0x023E, 0x2C66 }, + { 0x0241, 0x0242 }, + { 0x0243, 0x0180 }, + { 0x0244, 0x0289 }, + { 0x0245, 0x028C }, + { 0x0246, 0x0247 }, + { 0x0248, 0x0249 }, + { 0x024A, 0x024B }, + { 0x024C, 0x024D }, + { 0x024E, 0x024F }, + { 0x0370, 0x0371 }, + { 0x0372, 0x0373 }, + { 0x0376, 0x0377 }, + { 0x037F, 0x03F3 }, { 0x0386, 0x03AC }, { 0x0388, 0x03AD }, { 0x0389, 0x03AE }, @@ -929,6 +1782,12 @@ static const int reverse_caps_table[CAPS_LEN - 1][2] = { { 0x03A9, 0x03C9 }, { 0x03AA, 0x03CA }, { 0x03AB, 0x03CB }, + { 0x03CF, 0x03D7 }, + { 0x03D8, 0x03D9 }, + { 0x03DA, 0x03DB }, + { 0x03DC, 0x03DD }, + { 0x03DE, 0x03DF }, + { 0x03E0, 0x03E1 }, { 0x03E2, 0x03E3 }, { 0x03E4, 0x03E5 }, { 0x03E6, 0x03E7 }, @@ -936,6 +1795,14 @@ static const int reverse_caps_table[CAPS_LEN - 1][2] = { { 0x03EA, 0x03EB }, { 0x03EC, 0x03ED }, { 0x03EE, 0x03EF }, + { 0x03F4, 0x03B8 }, + { 0x03F7, 0x03F8 }, + { 0x03F9, 0x03F2 }, + { 0x03FA, 0x03FB }, + { 0x03FD, 0x037B }, + { 0x03FE, 0x037C }, + { 0x03FF, 0x037D }, + { 0x0400, 0x0450 }, { 0x0401, 0x0451 }, { 0x0402, 0x0452 }, { 0x0403, 0x0453 }, @@ -948,6 +1815,7 @@ static const int reverse_caps_table[CAPS_LEN - 1][2] = { { 0x040A, 0x045A }, { 0x040B, 0x045B }, { 0x040C, 0x045C }, + { 0x040D, 0x045D }, { 0x040E, 0x045E }, { 0x040F, 0x045F }, { 0x0410, 0x0430 }, @@ -999,6 +1867,9 @@ static const int reverse_caps_table[CAPS_LEN - 1][2] = { { 0x047C, 0x047D }, { 0x047E, 0x047F }, { 0x0480, 0x0481 }, + { 0x048A, 0x048B }, + { 0x048C, 0x048D }, + { 0x048E, 0x048F }, { 0x0490, 0x0491 }, { 0x0492, 0x0493 }, { 0x0494, 0x0495 }, @@ -1023,10 +1894,14 @@ static const int reverse_caps_table[CAPS_LEN - 1][2] = { { 0x04BA, 0x04BB }, { 0x04BC, 0x04BD }, { 0x04BE, 0x04BF }, + { 0x04C0, 0x04CF }, { 0x04C1, 0x04C2 }, { 0x04C3, 0x04C4 }, + { 0x04C5, 0x04C6 }, { 0x04C7, 0x04C8 }, + { 0x04C9, 0x04CA }, { 0x04CB, 0x04CC }, + { 0x04CD, 0x04CE }, { 0x04D0, 0x04D1 }, { 0x04D2, 0x04D3 }, { 0x04D4, 0x04D5 }, @@ -1041,11 +1916,40 @@ static const int reverse_caps_table[CAPS_LEN - 1][2] = { { 0x04E6, 0x04E7 }, { 0x04E8, 0x04E9 }, { 0x04EA, 0x04EB }, + { 0x04EC, 0x04ED }, { 0x04EE, 0x04EF }, { 0x04F0, 0x04F1 }, { 0x04F2, 0x04F3 }, { 0x04F4, 0x04F5 }, + { 0x04F6, 0x04F7 }, { 0x04F8, 0x04F9 }, + { 0x04FA, 0x04FB }, + { 0x04FC, 0x04FD }, + { 0x04FE, 0x04FF }, + { 0x0500, 0x0501 }, + { 0x0502, 0x0503 }, + { 0x0504, 0x0505 }, + { 0x0506, 0x0507 }, + { 0x0508, 0x0509 }, + { 0x050A, 0x050B }, + { 0x050C, 0x050D }, + { 0x050E, 0x050F }, + { 0x0510, 0x0511 }, + { 0x0512, 0x0513 }, + { 0x0514, 0x0515 }, + { 0x0516, 0x0517 }, + { 0x0518, 0x0519 }, + { 0x051A, 0x051B }, + { 0x051C, 0x051D }, + { 0x051E, 0x051F }, + { 0x0520, 0x0521 }, + { 0x0522, 0x0523 }, + { 0x0524, 0x0525 }, + { 0x0526, 0x0527 }, + { 0x0528, 0x0529 }, + { 0x052A, 0x052B }, + { 0x052C, 0x052D }, + { 0x052E, 0x052F }, { 0x0531, 0x0561 }, { 0x0532, 0x0562 }, { 0x0533, 0x0563 }, @@ -1084,44 +1988,179 @@ static const int reverse_caps_table[CAPS_LEN - 1][2] = { { 0x0554, 0x0584 }, { 0x0555, 0x0585 }, { 0x0556, 0x0586 }, - { 0x10A0, 0x10D0 }, - { 0x10A1, 0x10D1 }, - { 0x10A2, 0x10D2 }, - { 0x10A3, 0x10D3 }, - { 0x10A4, 0x10D4 }, - { 0x10A5, 0x10D5 }, - { 0x10A6, 0x10D6 }, - { 0x10A7, 0x10D7 }, - { 0x10A8, 0x10D8 }, - { 0x10A9, 0x10D9 }, - { 0x10AA, 0x10DA }, - { 0x10AB, 0x10DB }, - { 0x10AC, 0x10DC }, - { 0x10AD, 0x10DD }, - { 0x10AE, 0x10DE }, - { 0x10AF, 0x10DF }, - { 0x10B0, 0x10E0 }, - { 0x10B1, 0x10E1 }, - { 0x10B2, 0x10E2 }, - { 0x10B3, 0x10E3 }, - { 0x10B4, 0x10E4 }, - { 0x10B5, 0x10E5 }, - { 0x10B6, 0x10E6 }, - { 0x10B7, 0x10E7 }, - { 0x10B8, 0x10E8 }, - { 0x10B9, 0x10E9 }, - { 0x10BA, 0x10EA }, - { 0x10BB, 0x10EB }, - { 0x10BC, 0x10EC }, - { 0x10BD, 0x10ED }, - { 0x10BE, 0x10EE }, - { 0x10BF, 0x10EF }, - { 0x10C0, 0x10F0 }, - { 0x10C1, 0x10F1 }, - { 0x10C2, 0x10F2 }, - { 0x10C3, 0x10F3 }, - { 0x10C4, 0x10F4 }, - { 0x10C5, 0x10F5 }, + { 0x10A0, 0x2D00 }, + { 0x10A1, 0x2D01 }, + { 0x10A2, 0x2D02 }, + { 0x10A3, 0x2D03 }, + { 0x10A4, 0x2D04 }, + { 0x10A5, 0x2D05 }, + { 0x10A6, 0x2D06 }, + { 0x10A7, 0x2D07 }, + { 0x10A8, 0x2D08 }, + { 0x10A9, 0x2D09 }, + { 0x10AA, 0x2D0A }, + { 0x10AB, 0x2D0B }, + { 0x10AC, 0x2D0C }, + { 0x10AD, 0x2D0D }, + { 0x10AE, 0x2D0E }, + { 0x10AF, 0x2D0F }, + { 0x10B0, 0x2D10 }, + { 0x10B1, 0x2D11 }, + { 0x10B2, 0x2D12 }, + { 0x10B3, 0x2D13 }, + { 0x10B4, 0x2D14 }, + { 0x10B5, 0x2D15 }, + { 0x10B6, 0x2D16 }, + { 0x10B7, 0x2D17 }, + { 0x10B8, 0x2D18 }, + { 0x10B9, 0x2D19 }, + { 0x10BA, 0x2D1A }, + { 0x10BB, 0x2D1B }, + { 0x10BC, 0x2D1C }, + { 0x10BD, 0x2D1D }, + { 0x10BE, 0x2D1E }, + { 0x10BF, 0x2D1F }, + { 0x10C0, 0x2D20 }, + { 0x10C1, 0x2D21 }, + { 0x10C2, 0x2D22 }, + { 0x10C3, 0x2D23 }, + { 0x10C4, 0x2D24 }, + { 0x10C5, 0x2D25 }, + { 0x10C7, 0x2D27 }, + { 0x10CD, 0x2D2D }, + { 0x13A0, 0xAB70 }, + { 0x13A1, 0xAB71 }, + { 0x13A2, 0xAB72 }, + { 0x13A3, 0xAB73 }, + { 0x13A4, 0xAB74 }, + { 0x13A5, 0xAB75 }, + { 0x13A6, 0xAB76 }, + { 0x13A7, 0xAB77 }, + { 0x13A8, 0xAB78 }, + { 0x13A9, 0xAB79 }, + { 0x13AA, 0xAB7A }, + { 0x13AB, 0xAB7B }, + { 0x13AC, 0xAB7C }, + { 0x13AD, 0xAB7D }, + { 0x13AE, 0xAB7E }, + { 0x13AF, 0xAB7F }, + { 0x13B0, 0xAB80 }, + { 0x13B1, 0xAB81 }, + { 0x13B2, 0xAB82 }, + { 0x13B3, 0xAB83 }, + { 0x13B4, 0xAB84 }, + { 0x13B5, 0xAB85 }, + { 0x13B6, 0xAB86 }, + { 0x13B7, 0xAB87 }, + { 0x13B8, 0xAB88 }, + { 0x13B9, 0xAB89 }, + { 0x13BA, 0xAB8A }, + { 0x13BB, 0xAB8B }, + { 0x13BC, 0xAB8C }, + { 0x13BD, 0xAB8D }, + { 0x13BE, 0xAB8E }, + { 0x13BF, 0xAB8F }, + { 0x13C0, 0xAB90 }, + { 0x13C1, 0xAB91 }, + { 0x13C2, 0xAB92 }, + { 0x13C3, 0xAB93 }, + { 0x13C4, 0xAB94 }, + { 0x13C5, 0xAB95 }, + { 0x13C6, 0xAB96 }, + { 0x13C7, 0xAB97 }, + { 0x13C8, 0xAB98 }, + { 0x13C9, 0xAB99 }, + { 0x13CA, 0xAB9A }, + { 0x13CB, 0xAB9B }, + { 0x13CC, 0xAB9C }, + { 0x13CD, 0xAB9D }, + { 0x13CE, 0xAB9E }, + { 0x13CF, 0xAB9F }, + { 0x13D0, 0xABA0 }, + { 0x13D1, 0xABA1 }, + { 0x13D2, 0xABA2 }, + { 0x13D3, 0xABA3 }, + { 0x13D4, 0xABA4 }, + { 0x13D5, 0xABA5 }, + { 0x13D6, 0xABA6 }, + { 0x13D7, 0xABA7 }, + { 0x13D8, 0xABA8 }, + { 0x13D9, 0xABA9 }, + { 0x13DA, 0xABAA }, + { 0x13DB, 0xABAB }, + { 0x13DC, 0xABAC }, + { 0x13DD, 0xABAD }, + { 0x13DE, 0xABAE }, + { 0x13DF, 0xABAF }, + { 0x13E0, 0xABB0 }, + { 0x13E1, 0xABB1 }, + { 0x13E2, 0xABB2 }, + { 0x13E3, 0xABB3 }, + { 0x13E4, 0xABB4 }, + { 0x13E5, 0xABB5 }, + { 0x13E6, 0xABB6 }, + { 0x13E7, 0xABB7 }, + { 0x13E8, 0xABB8 }, + { 0x13E9, 0xABB9 }, + { 0x13EA, 0xABBA }, + { 0x13EB, 0xABBB }, + { 0x13EC, 0xABBC }, + { 0x13ED, 0xABBD }, + { 0x13EE, 0xABBE }, + { 0x13EF, 0xABBF }, + { 0x13F0, 0x13F8 }, + { 0x13F1, 0x13F9 }, + { 0x13F2, 0x13FA }, + { 0x13F3, 0x13FB }, + { 0x13F4, 0x13FC }, + { 0x13F5, 0x13FD }, + { 0x1C89, 0x1C8A }, + { 0x1C90, 0x10D0 }, + { 0x1C91, 0x10D1 }, + { 0x1C92, 0x10D2 }, + { 0x1C93, 0x10D3 }, + { 0x1C94, 0x10D4 }, + { 0x1C95, 0x10D5 }, + { 0x1C96, 0x10D6 }, + { 0x1C97, 0x10D7 }, + { 0x1C98, 0x10D8 }, + { 0x1C99, 0x10D9 }, + { 0x1C9A, 0x10DA }, + { 0x1C9B, 0x10DB }, + { 0x1C9C, 0x10DC }, + { 0x1C9D, 0x10DD }, + { 0x1C9E, 0x10DE }, + { 0x1C9F, 0x10DF }, + { 0x1CA0, 0x10E0 }, + { 0x1CA1, 0x10E1 }, + { 0x1CA2, 0x10E2 }, + { 0x1CA3, 0x10E3 }, + { 0x1CA4, 0x10E4 }, + { 0x1CA5, 0x10E5 }, + { 0x1CA6, 0x10E6 }, + { 0x1CA7, 0x10E7 }, + { 0x1CA8, 0x10E8 }, + { 0x1CA9, 0x10E9 }, + { 0x1CAA, 0x10EA }, + { 0x1CAB, 0x10EB }, + { 0x1CAC, 0x10EC }, + { 0x1CAD, 0x10ED }, + { 0x1CAE, 0x10EE }, + { 0x1CAF, 0x10EF }, + { 0x1CB0, 0x10F0 }, + { 0x1CB1, 0x10F1 }, + { 0x1CB2, 0x10F2 }, + { 0x1CB3, 0x10F3 }, + { 0x1CB4, 0x10F4 }, + { 0x1CB5, 0x10F5 }, + { 0x1CB6, 0x10F6 }, + { 0x1CB7, 0x10F7 }, + { 0x1CB8, 0x10F8 }, + { 0x1CB9, 0x10F9 }, + { 0x1CBA, 0x10FA }, + { 0x1CBD, 0x10FD }, + { 0x1CBE, 0x10FE }, + { 0x1CBF, 0x10FF }, { 0x1E00, 0x1E01 }, { 0x1E02, 0x1E03 }, { 0x1E04, 0x1E05 }, @@ -1197,6 +2236,7 @@ static const int reverse_caps_table[CAPS_LEN - 1][2] = { { 0x1E90, 0x1E91 }, { 0x1E92, 0x1E93 }, { 0x1E94, 0x1E95 }, + { 0x1E9E, 0x00DF }, { 0x1EA0, 0x1EA1 }, { 0x1EA2, 0x1EA3 }, { 0x1EA4, 0x1EA5 }, @@ -1242,6 +2282,9 @@ static const int reverse_caps_table[CAPS_LEN - 1][2] = { { 0x1EF4, 0x1EF5 }, { 0x1EF6, 0x1EF7 }, { 0x1EF8, 0x1EF9 }, + { 0x1EFA, 0x1EFB }, + { 0x1EFC, 0x1EFD }, + { 0x1EFE, 0x1EFF }, { 0x1F08, 0x1F00 }, { 0x1F09, 0x1F01 }, { 0x1F0A, 0x1F02 }, @@ -1316,10 +2359,49 @@ static const int reverse_caps_table[CAPS_LEN - 1][2] = { { 0x1FAF, 0x1FA7 }, { 0x1FB8, 0x1FB0 }, { 0x1FB9, 0x1FB1 }, + { 0x1FBA, 0x1F70 }, + { 0x1FBB, 0x1F71 }, + { 0x1FBC, 0x1FB3 }, + { 0x1FC8, 0x1F72 }, + { 0x1FC9, 0x1F73 }, + { 0x1FCA, 0x1F74 }, + { 0x1FCB, 0x1F75 }, + { 0x1FCC, 0x1FC3 }, { 0x1FD8, 0x1FD0 }, { 0x1FD9, 0x1FD1 }, + { 0x1FDA, 0x1F76 }, + { 0x1FDB, 0x1F77 }, { 0x1FE8, 0x1FE0 }, { 0x1FE9, 0x1FE1 }, + { 0x1FEA, 0x1F7A }, + { 0x1FEB, 0x1F7B }, + { 0x1FEC, 0x1FE5 }, + { 0x1FF8, 0x1F78 }, + { 0x1FF9, 0x1F79 }, + { 0x1FFA, 0x1F7C }, + { 0x1FFB, 0x1F7D }, + { 0x1FFC, 0x1FF3 }, + { 0x2126, 0x03C9 }, + { 0x212A, 0x006B }, + { 0x212B, 0x00E5 }, + { 0x2132, 0x214E }, + { 0x2160, 0x2170 }, + { 0x2161, 0x2171 }, + { 0x2162, 0x2172 }, + { 0x2163, 0x2173 }, + { 0x2164, 0x2174 }, + { 0x2165, 0x2175 }, + { 0x2166, 0x2176 }, + { 0x2167, 0x2177 }, + { 0x2168, 0x2178 }, + { 0x2169, 0x2179 }, + { 0x216A, 0x217A }, + { 0x216B, 0x217B }, + { 0x216C, 0x217C }, + { 0x216D, 0x217D }, + { 0x216E, 0x217E }, + { 0x216F, 0x217F }, + { 0x2183, 0x2184 }, { 0x24B6, 0x24D0 }, { 0x24B7, 0x24D1 }, { 0x24B8, 0x24D2 }, @@ -1346,6 +2428,249 @@ static const int reverse_caps_table[CAPS_LEN - 1][2] = { { 0x24CD, 0x24E7 }, { 0x24CE, 0x24E8 }, { 0x24CF, 0x24E9 }, + { 0x2C00, 0x2C30 }, + { 0x2C01, 0x2C31 }, + { 0x2C02, 0x2C32 }, + { 0x2C03, 0x2C33 }, + { 0x2C04, 0x2C34 }, + { 0x2C05, 0x2C35 }, + { 0x2C06, 0x2C36 }, + { 0x2C07, 0x2C37 }, + { 0x2C08, 0x2C38 }, + { 0x2C09, 0x2C39 }, + { 0x2C0A, 0x2C3A }, + { 0x2C0B, 0x2C3B }, + { 0x2C0C, 0x2C3C }, + { 0x2C0D, 0x2C3D }, + { 0x2C0E, 0x2C3E }, + { 0x2C0F, 0x2C3F }, + { 0x2C10, 0x2C40 }, + { 0x2C11, 0x2C41 }, + { 0x2C12, 0x2C42 }, + { 0x2C13, 0x2C43 }, + { 0x2C14, 0x2C44 }, + { 0x2C15, 0x2C45 }, + { 0x2C16, 0x2C46 }, + { 0x2C17, 0x2C47 }, + { 0x2C18, 0x2C48 }, + { 0x2C19, 0x2C49 }, + { 0x2C1A, 0x2C4A }, + { 0x2C1B, 0x2C4B }, + { 0x2C1C, 0x2C4C }, + { 0x2C1D, 0x2C4D }, + { 0x2C1E, 0x2C4E }, + { 0x2C1F, 0x2C4F }, + { 0x2C20, 0x2C50 }, + { 0x2C21, 0x2C51 }, + { 0x2C22, 0x2C52 }, + { 0x2C23, 0x2C53 }, + { 0x2C24, 0x2C54 }, + { 0x2C25, 0x2C55 }, + { 0x2C26, 0x2C56 }, + { 0x2C27, 0x2C57 }, + { 0x2C28, 0x2C58 }, + { 0x2C29, 0x2C59 }, + { 0x2C2A, 0x2C5A }, + { 0x2C2B, 0x2C5B }, + { 0x2C2C, 0x2C5C }, + { 0x2C2D, 0x2C5D }, + { 0x2C2E, 0x2C5E }, + { 0x2C2F, 0x2C5F }, + { 0x2C60, 0x2C61 }, + { 0x2C62, 0x026B }, + { 0x2C63, 0x1D7D }, + { 0x2C64, 0x027D }, + { 0x2C67, 0x2C68 }, + { 0x2C69, 0x2C6A }, + { 0x2C6B, 0x2C6C }, + { 0x2C6D, 0x0251 }, + { 0x2C6E, 0x0271 }, + { 0x2C6F, 0x0250 }, + { 0x2C70, 0x0252 }, + { 0x2C72, 0x2C73 }, + { 0x2C75, 0x2C76 }, + { 0x2C7E, 0x023F }, + { 0x2C7F, 0x0240 }, + { 0x2C80, 0x2C81 }, + { 0x2C82, 0x2C83 }, + { 0x2C84, 0x2C85 }, + { 0x2C86, 0x2C87 }, + { 0x2C88, 0x2C89 }, + { 0x2C8A, 0x2C8B }, + { 0x2C8C, 0x2C8D }, + { 0x2C8E, 0x2C8F }, + { 0x2C90, 0x2C91 }, + { 0x2C92, 0x2C93 }, + { 0x2C94, 0x2C95 }, + { 0x2C96, 0x2C97 }, + { 0x2C98, 0x2C99 }, + { 0x2C9A, 0x2C9B }, + { 0x2C9C, 0x2C9D }, + { 0x2C9E, 0x2C9F }, + { 0x2CA0, 0x2CA1 }, + { 0x2CA2, 0x2CA3 }, + { 0x2CA4, 0x2CA5 }, + { 0x2CA6, 0x2CA7 }, + { 0x2CA8, 0x2CA9 }, + { 0x2CAA, 0x2CAB }, + { 0x2CAC, 0x2CAD }, + { 0x2CAE, 0x2CAF }, + { 0x2CB0, 0x2CB1 }, + { 0x2CB2, 0x2CB3 }, + { 0x2CB4, 0x2CB5 }, + { 0x2CB6, 0x2CB7 }, + { 0x2CB8, 0x2CB9 }, + { 0x2CBA, 0x2CBB }, + { 0x2CBC, 0x2CBD }, + { 0x2CBE, 0x2CBF }, + { 0x2CC0, 0x2CC1 }, + { 0x2CC2, 0x2CC3 }, + { 0x2CC4, 0x2CC5 }, + { 0x2CC6, 0x2CC7 }, + { 0x2CC8, 0x2CC9 }, + { 0x2CCA, 0x2CCB }, + { 0x2CCC, 0x2CCD }, + { 0x2CCE, 0x2CCF }, + { 0x2CD0, 0x2CD1 }, + { 0x2CD2, 0x2CD3 }, + { 0x2CD4, 0x2CD5 }, + { 0x2CD6, 0x2CD7 }, + { 0x2CD8, 0x2CD9 }, + { 0x2CDA, 0x2CDB }, + { 0x2CDC, 0x2CDD }, + { 0x2CDE, 0x2CDF }, + { 0x2CE0, 0x2CE1 }, + { 0x2CE2, 0x2CE3 }, + { 0x2CEB, 0x2CEC }, + { 0x2CED, 0x2CEE }, + { 0x2CF2, 0x2CF3 }, + { 0xA640, 0xA641 }, + { 0xA642, 0xA643 }, + { 0xA644, 0xA645 }, + { 0xA646, 0xA647 }, + { 0xA648, 0xA649 }, + { 0xA64A, 0xA64B }, + { 0xA64C, 0xA64D }, + { 0xA64E, 0xA64F }, + { 0xA650, 0xA651 }, + { 0xA652, 0xA653 }, + { 0xA654, 0xA655 }, + { 0xA656, 0xA657 }, + { 0xA658, 0xA659 }, + { 0xA65A, 0xA65B }, + { 0xA65C, 0xA65D }, + { 0xA65E, 0xA65F }, + { 0xA660, 0xA661 }, + { 0xA662, 0xA663 }, + { 0xA664, 0xA665 }, + { 0xA666, 0xA667 }, + { 0xA668, 0xA669 }, + { 0xA66A, 0xA66B }, + { 0xA66C, 0xA66D }, + { 0xA680, 0xA681 }, + { 0xA682, 0xA683 }, + { 0xA684, 0xA685 }, + { 0xA686, 0xA687 }, + { 0xA688, 0xA689 }, + { 0xA68A, 0xA68B }, + { 0xA68C, 0xA68D }, + { 0xA68E, 0xA68F }, + { 0xA690, 0xA691 }, + { 0xA692, 0xA693 }, + { 0xA694, 0xA695 }, + { 0xA696, 0xA697 }, + { 0xA698, 0xA699 }, + { 0xA69A, 0xA69B }, + { 0xA722, 0xA723 }, + { 0xA724, 0xA725 }, + { 0xA726, 0xA727 }, + { 0xA728, 0xA729 }, + { 0xA72A, 0xA72B }, + { 0xA72C, 0xA72D }, + { 0xA72E, 0xA72F }, + { 0xA732, 0xA733 }, + { 0xA734, 0xA735 }, + { 0xA736, 0xA737 }, + { 0xA738, 0xA739 }, + { 0xA73A, 0xA73B }, + { 0xA73C, 0xA73D }, + { 0xA73E, 0xA73F }, + { 0xA740, 0xA741 }, + { 0xA742, 0xA743 }, + { 0xA744, 0xA745 }, + { 0xA746, 0xA747 }, + { 0xA748, 0xA749 }, + { 0xA74A, 0xA74B }, + { 0xA74C, 0xA74D }, + { 0xA74E, 0xA74F }, + { 0xA750, 0xA751 }, + { 0xA752, 0xA753 }, + { 0xA754, 0xA755 }, + { 0xA756, 0xA757 }, + { 0xA758, 0xA759 }, + { 0xA75A, 0xA75B }, + { 0xA75C, 0xA75D }, + { 0xA75E, 0xA75F }, + { 0xA760, 0xA761 }, + { 0xA762, 0xA763 }, + { 0xA764, 0xA765 }, + { 0xA766, 0xA767 }, + { 0xA768, 0xA769 }, + { 0xA76A, 0xA76B }, + { 0xA76C, 0xA76D }, + { 0xA76E, 0xA76F }, + { 0xA779, 0xA77A }, + { 0xA77B, 0xA77C }, + { 0xA77D, 0x1D79 }, + { 0xA77E, 0xA77F }, + { 0xA780, 0xA781 }, + { 0xA782, 0xA783 }, + { 0xA784, 0xA785 }, + { 0xA786, 0xA787 }, + { 0xA78B, 0xA78C }, + { 0xA78D, 0x0265 }, + { 0xA790, 0xA791 }, + { 0xA792, 0xA793 }, + { 0xA796, 0xA797 }, + { 0xA798, 0xA799 }, + { 0xA79A, 0xA79B }, + { 0xA79C, 0xA79D }, + { 0xA79E, 0xA79F }, + { 0xA7A0, 0xA7A1 }, + { 0xA7A2, 0xA7A3 }, + { 0xA7A4, 0xA7A5 }, + { 0xA7A6, 0xA7A7 }, + { 0xA7A8, 0xA7A9 }, + { 0xA7AA, 0x0266 }, + { 0xA7AB, 0x025C }, + { 0xA7AC, 0x0261 }, + { 0xA7AD, 0x026C }, + { 0xA7AE, 0x026A }, + { 0xA7B0, 0x029E }, + { 0xA7B1, 0x0287 }, + { 0xA7B2, 0x029D }, + { 0xA7B3, 0xAB53 }, + { 0xA7B4, 0xA7B5 }, + { 0xA7B6, 0xA7B7 }, + { 0xA7B8, 0xA7B9 }, + { 0xA7BA, 0xA7BB }, + { 0xA7BC, 0xA7BD }, + { 0xA7BE, 0xA7BF }, + { 0xA7C0, 0xA7C1 }, + { 0xA7C2, 0xA7C3 }, + { 0xA7C4, 0xA794 }, + { 0xA7C5, 0x0282 }, + { 0xA7C6, 0x1D8E }, + { 0xA7C7, 0xA7C8 }, + { 0xA7C9, 0xA7CA }, + { 0xA7CB, 0x0264 }, + { 0xA7CC, 0xA7CD }, + { 0xA7D0, 0xA7D1 }, + { 0xA7D6, 0xA7D7 }, + { 0xA7D8, 0xA7D9 }, + { 0xA7DA, 0xA7DB }, + { 0xA7DC, 0x019B }, + { 0xA7F5, 0xA7F6 }, { 0xFF21, 0xFF41 }, { 0xFF22, 0xFF42 }, { 0xFF23, 0xFF43 }, @@ -1372,20 +2697,302 @@ static const int reverse_caps_table[CAPS_LEN - 1][2] = { { 0xFF38, 0xFF58 }, { 0xFF39, 0xFF59 }, { 0xFF3A, 0xFF5A }, + { 0x10400, 0x10428 }, + { 0x10401, 0x10429 }, + { 0x10402, 0x1042A }, + { 0x10403, 0x1042B }, + { 0x10404, 0x1042C }, + { 0x10405, 0x1042D }, + { 0x10406, 0x1042E }, + { 0x10407, 0x1042F }, + { 0x10408, 0x10430 }, + { 0x10409, 0x10431 }, + { 0x1040A, 0x10432 }, + { 0x1040B, 0x10433 }, + { 0x1040C, 0x10434 }, + { 0x1040D, 0x10435 }, + { 0x1040E, 0x10436 }, + { 0x1040F, 0x10437 }, + { 0x10410, 0x10438 }, + { 0x10411, 0x10439 }, + { 0x10412, 0x1043A }, + { 0x10413, 0x1043B }, + { 0x10414, 0x1043C }, + { 0x10415, 0x1043D }, + { 0x10416, 0x1043E }, + { 0x10417, 0x1043F }, + { 0x10418, 0x10440 }, + { 0x10419, 0x10441 }, + { 0x1041A, 0x10442 }, + { 0x1041B, 0x10443 }, + { 0x1041C, 0x10444 }, + { 0x1041D, 0x10445 }, + { 0x1041E, 0x10446 }, + { 0x1041F, 0x10447 }, + { 0x10420, 0x10448 }, + { 0x10421, 0x10449 }, + { 0x10422, 0x1044A }, + { 0x10423, 0x1044B }, + { 0x10424, 0x1044C }, + { 0x10425, 0x1044D }, + { 0x10426, 0x1044E }, + { 0x10427, 0x1044F }, + { 0x104B0, 0x104D8 }, + { 0x104B1, 0x104D9 }, + { 0x104B2, 0x104DA }, + { 0x104B3, 0x104DB }, + { 0x104B4, 0x104DC }, + { 0x104B5, 0x104DD }, + { 0x104B6, 0x104DE }, + { 0x104B7, 0x104DF }, + { 0x104B8, 0x104E0 }, + { 0x104B9, 0x104E1 }, + { 0x104BA, 0x104E2 }, + { 0x104BB, 0x104E3 }, + { 0x104BC, 0x104E4 }, + { 0x104BD, 0x104E5 }, + { 0x104BE, 0x104E6 }, + { 0x104BF, 0x104E7 }, + { 0x104C0, 0x104E8 }, + { 0x104C1, 0x104E9 }, + { 0x104C2, 0x104EA }, + { 0x104C3, 0x104EB }, + { 0x104C4, 0x104EC }, + { 0x104C5, 0x104ED }, + { 0x104C6, 0x104EE }, + { 0x104C7, 0x104EF }, + { 0x104C8, 0x104F0 }, + { 0x104C9, 0x104F1 }, + { 0x104CA, 0x104F2 }, + { 0x104CB, 0x104F3 }, + { 0x104CC, 0x104F4 }, + { 0x104CD, 0x104F5 }, + { 0x104CE, 0x104F6 }, + { 0x104CF, 0x104F7 }, + { 0x104D0, 0x104F8 }, + { 0x104D1, 0x104F9 }, + { 0x104D2, 0x104FA }, + { 0x104D3, 0x104FB }, + { 0x10570, 0x10597 }, + { 0x10571, 0x10598 }, + { 0x10572, 0x10599 }, + { 0x10573, 0x1059A }, + { 0x10574, 0x1059B }, + { 0x10575, 0x1059C }, + { 0x10576, 0x1059D }, + { 0x10577, 0x1059E }, + { 0x10578, 0x1059F }, + { 0x10579, 0x105A0 }, + { 0x1057A, 0x105A1 }, + { 0x1057C, 0x105A3 }, + { 0x1057D, 0x105A4 }, + { 0x1057E, 0x105A5 }, + { 0x1057F, 0x105A6 }, + { 0x10580, 0x105A7 }, + { 0x10581, 0x105A8 }, + { 0x10582, 0x105A9 }, + { 0x10583, 0x105AA }, + { 0x10584, 0x105AB }, + { 0x10585, 0x105AC }, + { 0x10586, 0x105AD }, + { 0x10587, 0x105AE }, + { 0x10588, 0x105AF }, + { 0x10589, 0x105B0 }, + { 0x1058A, 0x105B1 }, + { 0x1058C, 0x105B3 }, + { 0x1058D, 0x105B4 }, + { 0x1058E, 0x105B5 }, + { 0x1058F, 0x105B6 }, + { 0x10590, 0x105B7 }, + { 0x10591, 0x105B8 }, + { 0x10592, 0x105B9 }, + { 0x10594, 0x105BB }, + { 0x10595, 0x105BC }, + { 0x10C80, 0x10CC0 }, + { 0x10C81, 0x10CC1 }, + { 0x10C82, 0x10CC2 }, + { 0x10C83, 0x10CC3 }, + { 0x10C84, 0x10CC4 }, + { 0x10C85, 0x10CC5 }, + { 0x10C86, 0x10CC6 }, + { 0x10C87, 0x10CC7 }, + { 0x10C88, 0x10CC8 }, + { 0x10C89, 0x10CC9 }, + { 0x10C8A, 0x10CCA }, + { 0x10C8B, 0x10CCB }, + { 0x10C8C, 0x10CCC }, + { 0x10C8D, 0x10CCD }, + { 0x10C8E, 0x10CCE }, + { 0x10C8F, 0x10CCF }, + { 0x10C90, 0x10CD0 }, + { 0x10C91, 0x10CD1 }, + { 0x10C92, 0x10CD2 }, + { 0x10C93, 0x10CD3 }, + { 0x10C94, 0x10CD4 }, + { 0x10C95, 0x10CD5 }, + { 0x10C96, 0x10CD6 }, + { 0x10C97, 0x10CD7 }, + { 0x10C98, 0x10CD8 }, + { 0x10C99, 0x10CD9 }, + { 0x10C9A, 0x10CDA }, + { 0x10C9B, 0x10CDB }, + { 0x10C9C, 0x10CDC }, + { 0x10C9D, 0x10CDD }, + { 0x10C9E, 0x10CDE }, + { 0x10C9F, 0x10CDF }, + { 0x10CA0, 0x10CE0 }, + { 0x10CA1, 0x10CE1 }, + { 0x10CA2, 0x10CE2 }, + { 0x10CA3, 0x10CE3 }, + { 0x10CA4, 0x10CE4 }, + { 0x10CA5, 0x10CE5 }, + { 0x10CA6, 0x10CE6 }, + { 0x10CA7, 0x10CE7 }, + { 0x10CA8, 0x10CE8 }, + { 0x10CA9, 0x10CE9 }, + { 0x10CAA, 0x10CEA }, + { 0x10CAB, 0x10CEB }, + { 0x10CAC, 0x10CEC }, + { 0x10CAD, 0x10CED }, + { 0x10CAE, 0x10CEE }, + { 0x10CAF, 0x10CEF }, + { 0x10CB0, 0x10CF0 }, + { 0x10CB1, 0x10CF1 }, + { 0x10CB2, 0x10CF2 }, + { 0x10D50, 0x10D70 }, + { 0x10D51, 0x10D71 }, + { 0x10D52, 0x10D72 }, + { 0x10D53, 0x10D73 }, + { 0x10D54, 0x10D74 }, + { 0x10D55, 0x10D75 }, + { 0x10D56, 0x10D76 }, + { 0x10D57, 0x10D77 }, + { 0x10D58, 0x10D78 }, + { 0x10D59, 0x10D79 }, + { 0x10D5A, 0x10D7A }, + { 0x10D5B, 0x10D7B }, + { 0x10D5C, 0x10D7C }, + { 0x10D5D, 0x10D7D }, + { 0x10D5E, 0x10D7E }, + { 0x10D5F, 0x10D7F }, + { 0x10D60, 0x10D80 }, + { 0x10D61, 0x10D81 }, + { 0x10D62, 0x10D82 }, + { 0x10D63, 0x10D83 }, + { 0x10D64, 0x10D84 }, + { 0x10D65, 0x10D85 }, + { 0x118A0, 0x118C0 }, + { 0x118A1, 0x118C1 }, + { 0x118A2, 0x118C2 }, + { 0x118A3, 0x118C3 }, + { 0x118A4, 0x118C4 }, + { 0x118A5, 0x118C5 }, + { 0x118A6, 0x118C6 }, + { 0x118A7, 0x118C7 }, + { 0x118A8, 0x118C8 }, + { 0x118A9, 0x118C9 }, + { 0x118AA, 0x118CA }, + { 0x118AB, 0x118CB }, + { 0x118AC, 0x118CC }, + { 0x118AD, 0x118CD }, + { 0x118AE, 0x118CE }, + { 0x118AF, 0x118CF }, + { 0x118B0, 0x118D0 }, + { 0x118B1, 0x118D1 }, + { 0x118B2, 0x118D2 }, + { 0x118B3, 0x118D3 }, + { 0x118B4, 0x118D4 }, + { 0x118B5, 0x118D5 }, + { 0x118B6, 0x118D6 }, + { 0x118B7, 0x118D7 }, + { 0x118B8, 0x118D8 }, + { 0x118B9, 0x118D9 }, + { 0x118BA, 0x118DA }, + { 0x118BB, 0x118DB }, + { 0x118BC, 0x118DC }, + { 0x118BD, 0x118DD }, + { 0x118BE, 0x118DE }, + { 0x118BF, 0x118DF }, + { 0x16E40, 0x16E60 }, + { 0x16E41, 0x16E61 }, + { 0x16E42, 0x16E62 }, + { 0x16E43, 0x16E63 }, + { 0x16E44, 0x16E64 }, + { 0x16E45, 0x16E65 }, + { 0x16E46, 0x16E66 }, + { 0x16E47, 0x16E67 }, + { 0x16E48, 0x16E68 }, + { 0x16E49, 0x16E69 }, + { 0x16E4A, 0x16E6A }, + { 0x16E4B, 0x16E6B }, + { 0x16E4C, 0x16E6C }, + { 0x16E4D, 0x16E6D }, + { 0x16E4E, 0x16E6E }, + { 0x16E4F, 0x16E6F }, + { 0x16E50, 0x16E70 }, + { 0x16E51, 0x16E71 }, + { 0x16E52, 0x16E72 }, + { 0x16E53, 0x16E73 }, + { 0x16E54, 0x16E74 }, + { 0x16E55, 0x16E75 }, + { 0x16E56, 0x16E76 }, + { 0x16E57, 0x16E77 }, + { 0x16E58, 0x16E78 }, + { 0x16E59, 0x16E79 }, + { 0x16E5A, 0x16E7A }, + { 0x16E5B, 0x16E7B }, + { 0x16E5C, 0x16E7C }, + { 0x16E5D, 0x16E7D }, + { 0x16E5E, 0x16E7E }, + { 0x16E5F, 0x16E7F }, + { 0x1E900, 0x1E922 }, + { 0x1E901, 0x1E923 }, + { 0x1E902, 0x1E924 }, + { 0x1E903, 0x1E925 }, + { 0x1E904, 0x1E926 }, + { 0x1E905, 0x1E927 }, + { 0x1E906, 0x1E928 }, + { 0x1E907, 0x1E929 }, + { 0x1E908, 0x1E92A }, + { 0x1E909, 0x1E92B }, + { 0x1E90A, 0x1E92C }, + { 0x1E90B, 0x1E92D }, + { 0x1E90C, 0x1E92E }, + { 0x1E90D, 0x1E92F }, + { 0x1E90E, 0x1E930 }, + { 0x1E90F, 0x1E931 }, + { 0x1E910, 0x1E932 }, + { 0x1E911, 0x1E933 }, + { 0x1E912, 0x1E934 }, + { 0x1E913, 0x1E935 }, + { 0x1E914, 0x1E936 }, + { 0x1E915, 0x1E937 }, + { 0x1E916, 0x1E938 }, + { 0x1E917, 0x1E939 }, + { 0x1E918, 0x1E93A }, + { 0x1E919, 0x1E93B }, + { 0x1E91A, 0x1E93C }, + { 0x1E91B, 0x1E93D }, + { 0x1E91C, 0x1E93E }, + { 0x1E91D, 0x1E93F }, + { 0x1E91E, 0x1E940 }, + { 0x1E91F, 0x1E941 }, + { 0x1E920, 0x1E942 }, + { 0x1E921, 0x1E943 }, }; static int _find_upper(int ch) { int low = 0; - int high = CAPS_LEN - 1; + int high = LTU_LEN - 1; int middle; while (low <= high) { middle = (low + high) / 2; if (ch < caps_table[middle][0]) { - high = middle - 1; //search low end of array + high = middle - 1; // Search low end of array. } else if (caps_table[middle][0] < ch) { - low = middle + 1; //search high end of array + low = middle + 1; // Search high end of array. } else { return caps_table[middle][1]; } @@ -1396,16 +3003,16 @@ static int _find_upper(int ch) { static int _find_lower(int ch) { int low = 0; - int high = CAPS_LEN - 2; + int high = UTL_LEN - 1; int middle; while (low <= high) { middle = (low + high) / 2; if (ch < reverse_caps_table[middle][0]) { - high = middle - 1; //search low end of array + high = middle - 1; // Search low end of array. } else if (reverse_caps_table[middle][0] < ch) { - low = middle + 1; //search high end of array + low = middle + 1; // Search high end of array. } else { return reverse_caps_table[middle][1]; } diff --git a/core/variant/variant_utility.cpp b/core/variant/variant_utility.cpp index d35c26a87a7..25d61dc40ed 100644 --- a/core/variant/variant_utility.cpp +++ b/core/variant/variant_utility.cpp @@ -1017,9 +1017,7 @@ void VariantUtilityFunctions::print_rich(const Variant **p_args, int p_arg_count r_error.error = Callable::CallError::CALL_OK; } -#undef print_verbose - -void VariantUtilityFunctions::print_verbose(const Variant **p_args, int p_arg_count, Callable::CallError &r_error) { +void VariantUtilityFunctions::_print_verbose(const Variant **p_args, int p_arg_count, Callable::CallError &r_error) { if (OS::get_singleton()->is_stdout_verbose()) { String s; for (int i = 0; i < p_arg_count; i++) { @@ -1599,16 +1597,16 @@ static _FORCE_INLINE_ Variant::Type get_ret_type_helper(void (*p_func)(P...)) { }; \ register_utility_function(#m_func, m_args) -#define FUNCBINDVARARGV(m_func, m_args, m_category) \ +#define FUNCBINDVARARGV_CNAME(m_func, m_func_cname, m_args, m_category) \ class Func_##m_func { \ public: \ static void call(Variant *r_ret, const Variant **p_args, int p_argcount, Callable::CallError &r_error) { \ r_error.error = Callable::CallError::CALL_OK; \ - VariantUtilityFunctions::m_func(p_args, p_argcount, r_error); \ + VariantUtilityFunctions::m_func_cname(p_args, p_argcount, r_error); \ } \ static void validated_call(Variant *r_ret, const Variant **p_args, int p_argcount) { \ Callable::CallError c; \ - VariantUtilityFunctions::m_func(p_args, p_argcount, c); \ + VariantUtilityFunctions::m_func_cname(p_args, p_argcount, c); \ } \ static void ptrcall(void *ret, const void **p_args, int p_argcount) { \ Vector args; \ @@ -1643,6 +1641,8 @@ static _FORCE_INLINE_ Variant::Type get_ret_type_helper(void (*p_func)(P...)) { }; \ register_utility_function(#m_func, m_args) +#define FUNCBINDVARARGV(m_func, m_args, m_category) FUNCBINDVARARGV_CNAME(m_func, m_func, m_args, m_category) + #define FUNCBIND(m_func, m_args, m_category) \ class Func_##m_func { \ public: \ @@ -1855,7 +1855,7 @@ void Variant::_register_variant_utility_functions() { FUNCBINDVARARGV(printt, sarray(), Variant::UTILITY_FUNC_TYPE_GENERAL); FUNCBINDVARARGV(prints, sarray(), Variant::UTILITY_FUNC_TYPE_GENERAL); FUNCBINDVARARGV(printraw, sarray(), Variant::UTILITY_FUNC_TYPE_GENERAL); - FUNCBINDVARARGV(print_verbose, sarray(), Variant::UTILITY_FUNC_TYPE_GENERAL); + FUNCBINDVARARGV_CNAME(print_verbose, _print_verbose, sarray(), Variant::UTILITY_FUNC_TYPE_GENERAL); FUNCBINDVARARGV(push_error, sarray(), Variant::UTILITY_FUNC_TYPE_GENERAL); FUNCBINDVARARGV(push_warning, sarray(), Variant::UTILITY_FUNC_TYPE_GENERAL); diff --git a/core/variant/variant_utility.h b/core/variant/variant_utility.h index a3eb386263f..8c7922f1ca1 100644 --- a/core/variant/variant_utility.h +++ b/core/variant/variant_utility.h @@ -139,8 +139,7 @@ struct VariantUtilityFunctions { static String type_string(Variant::Type p_type); static void print(const Variant **p_args, int p_arg_count, Callable::CallError &r_error); static void print_rich(const Variant **p_args, int p_arg_count, Callable::CallError &r_error); -#undef print_verbose - static void print_verbose(const Variant **p_args, int p_arg_count, Callable::CallError &r_error); + static void _print_verbose(const Variant **p_args, int p_arg_count, Callable::CallError &r_error); static void printerr(const Variant **p_args, int p_arg_count, Callable::CallError &r_error); static void printt(const Variant **p_args, int p_arg_count, Callable::CallError &r_error); static void prints(const Variant **p_args, int p_arg_count, Callable::CallError &r_error); diff --git a/doc/classes/CPUParticles2D.xml b/doc/classes/CPUParticles2D.xml index 646e025b115..d573b9fe6e4 100644 --- a/doc/classes/CPUParticles2D.xml +++ b/doc/classes/CPUParticles2D.xml @@ -140,10 +140,10 @@ Each particle's initial color. If [member texture] is defined, it will be multiplied by this color. - Each particle's initial color will vary along this [GradientTexture1D] (multiplied with [member color]). + Each particle's initial color will vary along this [Gradient] (multiplied with [member color]). - Each particle's color will vary along this [Gradient] (multiplied with [member color]). + Each particle's color will vary along this [Gradient] over its lifetime (multiplied with [member color]). Damping will vary along this [Curve]. Should be a unit [Curve]. diff --git a/doc/classes/CPUParticles3D.xml b/doc/classes/CPUParticles3D.xml index cf80fecca69..170f684638b 100644 --- a/doc/classes/CPUParticles3D.xml +++ b/doc/classes/CPUParticles3D.xml @@ -146,11 +146,11 @@ [b]Note:[/b] [member color] multiplies the particle mesh's vertex colors. To have a visible effect on a [BaseMaterial3D], [member BaseMaterial3D.vertex_color_use_as_albedo] [i]must[/i] be [code]true[/code]. For a [ShaderMaterial], [code]ALBEDO *= COLOR.rgb;[/code] must be inserted in the shader's [code]fragment()[/code] function. Otherwise, [member color] will have no visible effect. - Each particle's initial color will vary along this [GradientTexture1D] (multiplied with [member color]). + Each particle's initial color will vary along this [Gradient] (multiplied with [member color]). [b]Note:[/b] [member color_initial_ramp] multiplies the particle mesh's vertex colors. To have a visible effect on a [BaseMaterial3D], [member BaseMaterial3D.vertex_color_use_as_albedo] [i]must[/i] be [code]true[/code]. For a [ShaderMaterial], [code]ALBEDO *= COLOR.rgb;[/code] must be inserted in the shader's [code]fragment()[/code] function. Otherwise, [member color_initial_ramp] will have no visible effect. - Each particle's color will vary along this [GradientTexture1D] over its lifetime (multiplied with [member color]). + Each particle's color will vary along this [Gradient] over its lifetime (multiplied with [member color]). [b]Note:[/b] [member color_ramp] multiplies the particle mesh's vertex colors. To have a visible effect on a [BaseMaterial3D], [member BaseMaterial3D.vertex_color_use_as_albedo] [i]must[/i] be [code]true[/code]. For a [ShaderMaterial], [code]ALBEDO *= COLOR.rgb;[/code] must be inserted in the shader's [code]fragment()[/code] function. Otherwise, [member color_ramp] will have no visible effect. diff --git a/doc/classes/CharFXTransform.xml b/doc/classes/CharFXTransform.xml index 28f5d38ee4c..d8700b3c6e5 100644 --- a/doc/classes/CharFXTransform.xml +++ b/doc/classes/CharFXTransform.xml @@ -25,28 +25,34 @@ [/codeblock] - Font resource used to render glyph. + [TextServer] RID of the font used to render glyph, this value can be used with [code]TextServer.font_*[/code] methods to retrieve font information. + [b]Note:[/b] Read-only. Setting this property won't affect drawing. - Number of glyphs in the grapheme cluster. This value is set in the first glyph of a cluster. Setting this property won't affect drawing. + Number of glyphs in the grapheme cluster. This value is set in the first glyph of a cluster. + [b]Note:[/b] Read-only. Setting this property won't affect drawing. - Glyph flags. See [enum TextServer.GraphemeFlag] for more info. Setting this property won't affect drawing. + Glyph flags. See [enum TextServer.GraphemeFlag] for more info. + [b]Note:[/b] Read-only. Setting this property won't affect drawing. - Font specific glyph index. + Glyph index specific to the [member font]. If you want to replace this glyph, use [method TextServer.font_get_glyph_index] with [member font] to get a new glyph index for a single character. The position offset the character will be drawn with (in pixels). - If [code]true[/code], FX transform is called for outline drawing. Setting this property won't affect drawing. + If [code]true[/code], FX transform is called for outline drawing. + [b]Note:[/b] Read-only. Setting this property won't affect drawing. - Absolute character range in the string, corresponding to the glyph. Setting this property won't affect drawing. + Absolute character range in the string, corresponding to the glyph. + [b]Note:[/b] Read-only. Setting this property won't affect drawing. - The character offset of the glyph, relative to the current [RichTextEffect] custom block. Setting this property won't affect drawing. + The character offset of the glyph, relative to the current [RichTextEffect] custom block. + [b]Note:[/b] Read-only. Setting this property won't affect drawing. The current transform of the current glyph. It can be overridden (for example, by driving the position and rotation from a curve). You can also alter the existing value to apply transforms on top of other effects. diff --git a/doc/classes/DisplayServer.xml b/doc/classes/DisplayServer.xml index a71b55c2b69..505ea2077f6 100644 --- a/doc/classes/DisplayServer.xml +++ b/doc/classes/DisplayServer.xml @@ -1968,6 +1968,9 @@ Confines the mouse cursor to the game window, and make it hidden. + + Max value of the [enum MouseMode]. + Represents the screen containing the mouse pointer. [b]Note:[/b] On Linux (Wayland), this constant always represents the screen at index [code]0[/code]. diff --git a/doc/classes/EditorInspector.xml b/doc/classes/EditorInspector.xml index 0bbd55f0075..644cbe5b581 100644 --- a/doc/classes/EditorInspector.xml +++ b/doc/classes/EditorInspector.xml @@ -51,7 +51,6 @@ - diff --git a/doc/classes/EditorSettings.xml b/doc/classes/EditorSettings.xml index 1565750cf74..a1d49729101 100644 --- a/doc/classes/EditorSettings.xml +++ b/doc/classes/EditorSettings.xml @@ -887,6 +887,7 @@ If [code]true[/code], embed modal windows such as docks inside the main editor window. When single-window mode is enabled, tooltips will also be embedded inside the main editor window, which means they can't be displayed outside of the editor window. Single-window mode can be faster as it does not need to create a separate window for every popup and tooltip, which can be a slow operation depending on the operating system and rendering method in use. This is equivalent to [member ProjectSettings.display/window/subwindows/embed_subwindows] in the running project, except the setting's value is inverted. [b]Note:[/b] To query whether the editor can use multiple windows in an editor plugin, use [method EditorInterface.is_multi_window_enabled] instead of querying the value of this editor setting. + [b]Note:[/b] If [code]true[/code], game embedding is disabled. Editor UI default layout direction. @@ -971,7 +972,7 @@ If [code]true[/code], display OpenType features marked as [code]hidden[/code] by the font file in the [Font] editor. - If [code]true[/code], multiple window support in editor is enabled. The following panels can become dedicated windows (i.e. made floating): Docks, Script editor, and Shader editor. + If [code]true[/code], multiple window support in editor is enabled. The following panels can become dedicated windows (i.e. made floating): Docks, Script editor, Shader editor, and Game Workspace. [b]Note:[/b] When [member interface/editor/single_window_mode] is [code]true[/code], the multi window support is always disabled. [b]Note:[/b] To query whether the editor can use multiple windows in an editor plugin, use [method EditorInterface.is_multi_window_enabled] instead of querying the value of this editor setting. @@ -1148,6 +1149,7 @@ The window mode to use to display the project when starting the project from the editor. + [b]Note:[/b] Game embedding is not available for "Force Maximized" or "Force Fullscreen." The custom position to use when starting the project from the editor (in pixels from the top-left corner). Only effective if [member run/window_placement/rect] is set to [b]Custom Position[/b]. diff --git a/doc/classes/EditorSpinSlider.xml b/doc/classes/EditorSpinSlider.xml index b4b15340171..cb1062ee5c6 100644 --- a/doc/classes/EditorSpinSlider.xml +++ b/doc/classes/EditorSpinSlider.xml @@ -10,6 +10,9 @@ + + If [code]true[/code], the [EditorSpinSlider] is considered to be editing an integer value. If [code]false[/code], the [EditorSpinSlider] is considered to be editing a floating-point value. This is used to determine whether a slider should be drawn. The slider is only drawn for floats; integers use up-down arrows similar to [SpinBox] instead. + If [code]true[/code], the slider will not draw background. diff --git a/doc/classes/FileAccess.xml b/doc/classes/FileAccess.xml index de7249fafe4..f6fb7d17670 100644 --- a/doc/classes/FileAccess.xml +++ b/doc/classes/FileAccess.xml @@ -204,7 +204,7 @@ - Returns the size of the file in bytes. + Returns the size of the file in bytes. For a pipe, returns the number of bytes available for reading from the pipe. diff --git a/doc/classes/FileDialog.xml b/doc/classes/FileDialog.xml index 921fb0b7146..aced51b906c 100644 --- a/doc/classes/FileDialog.xml +++ b/doc/classes/FileDialog.xml @@ -151,6 +151,7 @@ If [code]true[/code], changing the [member file_mode] property will set the window title accordingly (e.g. setting [member file_mode] to [constant FILE_MODE_OPEN_FILE] will change the window title to "Open a File"). + The number of additional [OptionButton]s and [CheckBox]es in the dialog. diff --git a/doc/classes/GPUParticlesCollisionHeightField3D.xml b/doc/classes/GPUParticlesCollisionHeightField3D.xml index 0b9a94af633..04bfbdb6fd5 100644 --- a/doc/classes/GPUParticlesCollisionHeightField3D.xml +++ b/doc/classes/GPUParticlesCollisionHeightField3D.xml @@ -12,11 +12,33 @@ + + + + + + Returns [code]true[/code] if the specified layer of the [member heightfield_mask] is enabled, given a [param layer_number] between [code]1[/code] and [code]20[/code], inclusive. + + + + + + + + Based on [param value], enables or disables the specified layer in the [member heightfield_mask], given a [param layer_number] between [code]1[/code] and [code]20[/code], inclusive. + + + If [code]true[/code], the [GPUParticlesCollisionHeightField3D] will follow the current camera in global space. The [GPUParticlesCollisionHeightField3D] does not need to be a child of the [Camera3D] node for this to work. Following the camera has a performance cost, as it will force the heightmap to update whenever the camera moves. Consider lowering [member resolution] to improve performance if [member follow_camera_enabled] is [code]true[/code]. + + The visual layers to account for when updating the heightmap. Only [MeshInstance3D]s whose [member VisualInstance3D.layers] match with this [member heightfield_mask] will be included in the heightmap collision update. By default, all 20 user-visible layers are taken into account for updating the heightmap collision. + [b]Note:[/b] Since the [member heightfield_mask] allows for 32 layers to be stored in total, there are an additional 12 layers that are only used internally by the engine and aren't exposed in the editor. Setting [member heightfield_mask] using a script allows you to toggle those reserved layers, which can be useful for editor plugins. + To adjust [member heightfield_mask] more easily using a script, use [method get_heightfield_mask_value] and [method set_heightfield_mask_value]. + Higher resolutions can represent small details more accurately in large scenes, at the cost of lower performance. If [member update_mode] is [constant UPDATE_MODE_ALWAYS], consider using the lowest resolution possible. diff --git a/doc/classes/Input.xml b/doc/classes/Input.xml index 982e9c05c01..30fa57c4f36 100644 --- a/doc/classes/Input.xml +++ b/doc/classes/Input.xml @@ -464,6 +464,9 @@ Confines the mouse cursor to the game window, and make it hidden. + + Max value of the [enum MouseMode]. + Arrow cursor. Standard, default pointing cursor. diff --git a/doc/classes/LineEdit.xml b/doc/classes/LineEdit.xml index dd0d6ed4117..c6cdacb6ec2 100644 --- a/doc/classes/LineEdit.xml +++ b/doc/classes/LineEdit.xml @@ -277,7 +277,7 @@ If [code]false[/code], existing text cannot be modified and new text cannot be added. - If [code]false[/code], "Emoji and Symbols" menu is enabled. + If [code]true[/code], "Emoji and Symbols" menu is enabled. If [code]true[/code], the [LineEdit] width will increase to stay longer than the [member text]. It will [b]not[/b] compress if the [member text] is shortened. diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml index a02327e3446..8ee1a6426e1 100644 --- a/doc/classes/ProjectSettings.xml +++ b/doc/classes/ProjectSettings.xml @@ -879,6 +879,7 @@ Main window mode. See [enum DisplayServer.WindowMode] for possible values and how each mode behaves. + [b]Note:[/b] Game embedding is available only in the "Windowed" mode. Main window can't be focused. No-focus window will ignore all input, except mouse clicks. diff --git a/doc/classes/RenderingServer.xml b/doc/classes/RenderingServer.xml index 78f84389192..d592762bf98 100644 --- a/doc/classes/RenderingServer.xml +++ b/doc/classes/RenderingServer.xml @@ -2893,6 +2893,14 @@ Sets the signed distance field [param texture] for the 3D GPU particles collision specified by the [param particles_collision] RID. Equivalent to [member GPUParticlesCollisionSDF3D.texture] or [member GPUParticlesAttractorVectorField3D.texture] depending on the [param particles_collision] type. + + + + + + Sets the heightfield [param mask] for the 3D GPU particles heightfield collision specified by the [param particles_collision] RID. Equivalent to [member GPUParticlesCollisionHeightField3D.heightfield_mask]. + + diff --git a/doc/classes/SubViewport.xml b/doc/classes/SubViewport.xml index 605cf949c10..9d41a5e36d6 100644 --- a/doc/classes/SubViewport.xml +++ b/doc/classes/SubViewport.xml @@ -6,6 +6,7 @@ [SubViewport] Isolates a rectangular region of a scene to be displayed independently. This can be used, for example, to display UI in 3D space. [b]Note:[/b] [SubViewport] is a [Viewport] that isn't a [Window], i.e. it doesn't draw anything by itself. To display anything, [SubViewport] must have a non-zero size and be either put inside a [SubViewportContainer] or assigned to a [ViewportTexture]. + [b]Note:[/b] [InputEvent]s are not passed to a standalone [SubViewport] by default. To ensure [InputEvent] propagation, a [SubViewport] can be placed inside of a [SubViewportContainer]. $DOCS_URL/tutorials/rendering/viewports.html diff --git a/doc/classes/TextEdit.xml b/doc/classes/TextEdit.xml index b2691a0cbd0..6608b267bf2 100644 --- a/doc/classes/TextEdit.xml +++ b/doc/classes/TextEdit.xml @@ -1300,7 +1300,7 @@ If [code]false[/code], existing text cannot be modified and new text cannot be added. - If [code]false[/code], "Emoji and Symbols" menu is enabled. + If [code]true[/code], "Emoji and Symbols" menu is enabled. If [code]true[/code], copying or cutting without a selection is performed on all lines with a caret. Otherwise, copy and cut require a selection. diff --git a/doc/classes/Viewport.xml b/doc/classes/Viewport.xml index e4fb3ee9abe..a55c40d0187 100644 --- a/doc/classes/Viewport.xml +++ b/doc/classes/Viewport.xml @@ -188,6 +188,20 @@ If [member handle_input_locally] is set to [code]false[/code], this method will try finding the first parent viewport that is set to handle input locally, and return its value for [method is_input_handled] instead. + + + + Inform the Viewport that the mouse has entered its area. Use this function before sending an [InputEventMouseButton] or [InputEventMouseMotion] to the [Viewport] with [method Viewport.push_input]. See also [method notify_mouse_exited]. + [b]Note:[/b] In most cases, it is not necessary to call this function because [SubViewport] nodes that are children of [SubViewportContainer] are notified automatically. This is only necessary when interacting with viewports in non-default ways, for example as textures in [TextureRect] or with an [Area3D] that forwards input events. + + + + + + Inform the Viewport that the mouse has left its area. Use this function when the node that displays the viewport notices the mouse has left the area of the displayed viewport. See also [method notify_mouse_entered]. + [b]Note:[/b] In most cases, it is not necessary to call this function because [SubViewport] nodes that are children of [SubViewportContainer] are notified automatically. This is only necessary when interacting with viewports in non-default ways, for example as textures in [TextureRect] or with an [Area3D] that forwards input events. + + diff --git a/doc/classes/WorldBoundaryShape3D.xml b/doc/classes/WorldBoundaryShape3D.xml index 0f6224c40c8..0770dd51211 100644 --- a/doc/classes/WorldBoundaryShape3D.xml +++ b/doc/classes/WorldBoundaryShape3D.xml @@ -5,7 +5,7 @@ A 3D world boundary shape, intended for use in physics. [WorldBoundaryShape3D] works like an infinite plane that forces all physics bodies to stay above it. The [member plane]'s normal determines which direction is considered as "above" and in the editor, the line over the plane represents this direction. It can for example be used for endless flat floors. - [b]Note:[/b] When the physics engine is set to [b]Jolt Physics[/b] in the project settings ([member ProjectSettings.physics/3d/physics_engine]), [WorldBoundaryShape3D] has a finite size (centered at the world origin). It can be adjusted by changing [member ProjectSettings.physics/jolt_physics_3d/limits/world_boundary_shape_size]. + [b]Note:[/b] When the physics engine is set to [b]Jolt Physics[/b] in the project settings ([member ProjectSettings.physics/3d/physics_engine]), [WorldBoundaryShape3D] has a finite size (centered at the shape's origin). It can be adjusted by changing [member ProjectSettings.physics/jolt_physics_3d/limits/world_boundary_shape_size]. diff --git a/doc/tools/make_rst.py b/doc/tools/make_rst.py index 8933d6b96e7..9164ad42eb1 100755 --- a/doc/tools/make_rst.py +++ b/doc/tools/make_rst.py @@ -920,7 +920,7 @@ def make_rst_class(class_def: ClassDef, state: State, dry_run: bool, output_dir: # Ascendants if class_def.inherits: inherits = class_def.inherits.strip() - f.write(f'**{translate("Inherits:")}** ') + f.write(f"**{translate('Inherits:')}** ") first = True while inherits is not None: if not first: @@ -947,7 +947,7 @@ def make_rst_class(class_def: ClassDef, state: State, dry_run: bool, output_dir: inherited.append(c.name) if len(inherited): - f.write(f'**{translate("Inherited By:")}** ') + f.write(f"**{translate('Inherited By:')}** ") for i, child in enumerate(inherited): if i > 0: f.write(", ") @@ -1496,7 +1496,7 @@ def resolve_type(link_type: str) -> str: return f"``{link_type}``" if klass.endswith("[]"): # Typed array, strip [] to link to contained type. - return f":ref:`Array`\\[{resolve_type(klass[:-len('[]')])}\\]" + return f":ref:`Array`\\[{resolve_type(klass[: -len('[]')])}\\]" if klass.startswith("Dictionary["): # Typed dictionary, split elements to link contained types. parts = klass[len("Dictionary[") : -len("]")].partition(", ") @@ -2542,7 +2542,7 @@ def format_table(f: TextIO, data: List[Tuple[Optional[str], ...]], remove_empty_ for i, text in enumerate(row): if column_sizes[i] == 0 and remove_empty_columns: continue - row_text += f' {(text or "").ljust(column_sizes[i])} |' + row_text += f" {(text or '').ljust(column_sizes[i])} |" row_text += "\n" f.write(f" {row_text}") diff --git a/drivers/gles3/rasterizer_canvas_gles3.cpp b/drivers/gles3/rasterizer_canvas_gles3.cpp index e3a69f18890..9984b0fc20f 100644 --- a/drivers/gles3/rasterizer_canvas_gles3.cpp +++ b/drivers/gles3/rasterizer_canvas_gles3.cpp @@ -664,8 +664,6 @@ void RasterizerCanvasGLES3::_render_items(RID p_to_render_target, int p_item_cou if (index == 0) { // Nothing to render, just return. - state.current_batch_index = 0; - state.canvas_instance_batches.clear(); return; } @@ -1571,7 +1569,9 @@ void RasterizerCanvasGLES3::_add_to_batch(uint32_t &r_index, bool &r_batch_broke void RasterizerCanvasGLES3::_new_batch(bool &r_batch_broken) { if (state.canvas_instance_batches.size() == 0) { - state.canvas_instance_batches.push_back(Batch()); + Batch new_batch; + new_batch.instance_buffer_index = state.current_instance_buffer_index; + state.canvas_instance_batches.push_back(new_batch); return; } diff --git a/drivers/gles3/shaders/particles.glsl b/drivers/gles3/shaders/particles.glsl index bdc28e292e2..03c94e56639 100644 --- a/drivers/gles3/shaders/particles.glsl +++ b/drivers/gles3/shaders/particles.glsl @@ -342,7 +342,7 @@ void main() { mediump float attractor_attenuation = attractors[i].attenuation; amount = pow(amount, attractor_attenuation); dir = safe_normalize(mix(dir, attractors[i].transform[2].xyz, attractors[i].directionality)); - attractor_force -= amount * dir * attractors[i].strength; + attractor_force -= mass * amount * dir * attractors[i].strength; } float particle_size = particle_size; diff --git a/drivers/gles3/storage/config.cpp b/drivers/gles3/storage/config.cpp index 6530c4d8b9a..210d7823da2 100644 --- a/drivers/gles3/storage/config.cpp +++ b/drivers/gles3/storage/config.cpp @@ -86,12 +86,14 @@ Config::Config() { if (RasterizerGLES3::is_gles_over_gl()) { float_texture_supported = true; + float_texture_linear_supported = true; etc2_supported = false; s3tc_supported = true; rgtc_supported = true; //RGTC - core since OpenGL version 3.0 srgb_framebuffer_supported = true; } else { float_texture_supported = extensions.has("GL_EXT_color_buffer_float"); + float_texture_linear_supported = extensions.has("GL_OES_texture_float_linear"); etc2_supported = true; #if defined(ANDROID_ENABLED) || defined(IOS_ENABLED) // Some Android devices report support for S3TC but we don't expect that and don't export the textures. diff --git a/drivers/gles3/storage/config.h b/drivers/gles3/storage/config.h index 23392594bac..806424ece6f 100644 --- a/drivers/gles3/storage/config.h +++ b/drivers/gles3/storage/config.h @@ -74,6 +74,7 @@ class Config { HashSet extensions; bool float_texture_supported = false; + bool float_texture_linear_supported = false; bool s3tc_supported = false; bool rgtc_supported = false; bool bptc_supported = false; diff --git a/drivers/gles3/storage/material_storage.cpp b/drivers/gles3/storage/material_storage.cpp index 107e0c97da5..f44606c8901 100644 --- a/drivers/gles3/storage/material_storage.cpp +++ b/drivers/gles3/storage/material_storage.cpp @@ -575,6 +575,9 @@ Variant ShaderData::get_default_parameter(const StringName &p_parameter) const { if (uniforms.has(p_parameter)) { ShaderLanguage::ShaderNode::Uniform uniform = uniforms[p_parameter]; Vector default_value = uniform.default_value; + if (default_value.is_empty()) { + return ShaderLanguage::get_default_datatype_value(uniform.type, uniform.array_size, uniform.hint); + } return ShaderLanguage::constant_value_to_variant(default_value, uniform.type, uniform.array_size, uniform.hint); } return Variant(); @@ -1394,7 +1397,7 @@ MaterialStorage::MaterialStorage() { actions.renames["COLOR"] = "out_color"; actions.renames["VELOCITY"] = "out_velocity_flags.xyz"; - //actions.renames["MASS"] = "mass"; ? + actions.renames["MASS"] = "mass"; actions.renames["ACTIVE"] = "particle_active"; actions.renames["RESTART"] = "restart"; actions.renames["CUSTOM"] = "out_custom"; diff --git a/drivers/gles3/storage/particles_storage.cpp b/drivers/gles3/storage/particles_storage.cpp index e3dea7ff7c2..64ae2967c02 100644 --- a/drivers/gles3/storage/particles_storage.cpp +++ b/drivers/gles3/storage/particles_storage.cpp @@ -1434,6 +1434,18 @@ bool ParticlesStorage::particles_collision_is_heightfield(RID p_particles_collis return particles_collision->type == RS::PARTICLES_COLLISION_TYPE_HEIGHTFIELD_COLLIDE; } +uint32_t ParticlesStorage::particles_collision_get_height_field_mask(RID p_particles_collision) const { + const ParticlesCollision *particles_collision = particles_collision_owner.get_or_null(p_particles_collision); + ERR_FAIL_NULL_V(particles_collision, false); + return particles_collision->heightfield_mask; +} + +void ParticlesStorage::particles_collision_set_height_field_mask(RID p_particles_collision, uint32_t p_heightfield_mask) { + ParticlesCollision *particles_collision = particles_collision_owner.get_or_null(p_particles_collision); + ERR_FAIL_NULL(particles_collision); + particles_collision->heightfield_mask = p_heightfield_mask; +} + Dependency *ParticlesStorage::particles_collision_get_dependency(RID p_particles_collision) const { ParticlesCollision *pc = particles_collision_owner.get_or_null(p_particles_collision); ERR_FAIL_NULL_V(pc, nullptr); diff --git a/drivers/gles3/storage/particles_storage.h b/drivers/gles3/storage/particles_storage.h index 85c96bbcdb4..8a8b3d09f10 100644 --- a/drivers/gles3/storage/particles_storage.h +++ b/drivers/gles3/storage/particles_storage.h @@ -289,6 +289,7 @@ class ParticlesStorage : public RendererParticlesStorage { GLuint heightfield_texture = 0; GLuint heightfield_fb = 0; Size2i heightfield_fb_size; + uint32_t heightfield_mask = (1 << 20) - 1; RS::ParticlesCollisionHeightfieldResolution heightfield_resolution = RS::PARTICLES_COLLISION_HEIGHTFIELD_RESOLUTION_1024; @@ -436,6 +437,8 @@ class ParticlesStorage : public RendererParticlesStorage { Vector3 particles_collision_get_extents(RID p_particles_collision) const; virtual bool particles_collision_is_heightfield(RID p_particles_collision) const override; GLuint particles_collision_get_heightfield_framebuffer(RID p_particles_collision) const; + virtual uint32_t particles_collision_get_height_field_mask(RID p_particles_collision) const override; + virtual void particles_collision_set_height_field_mask(RID p_particles_collision, uint32_t p_heightfield_mask) override; _FORCE_INLINE_ Size2i particles_collision_get_heightfield_size(RID p_particles_collision) const { ParticlesCollision *particles_collision = particles_collision_owner.get_or_null(p_particles_collision); diff --git a/drivers/gles3/storage/texture_storage.cpp b/drivers/gles3/storage/texture_storage.cpp index 9831e3aa0eb..fe893397aff 100644 --- a/drivers/gles3/storage/texture_storage.cpp +++ b/drivers/gles3/storage/texture_storage.cpp @@ -336,7 +336,9 @@ void TextureStorage::canvas_texture_set_texture_repeat(RID p_canvas_texture, RS: /* Texture API */ -static inline Error _get_gl_uncompressed_format(Image::Format p_format, GLenum &r_gl_format, GLenum &r_gl_internal_format, GLenum &r_gl_type) { +static inline Error _get_gl_uncompressed_format(const Ref &p_image, Image::Format p_format, Image::Format &r_real_format, GLenum &r_gl_format, GLenum &r_gl_internal_format, GLenum &r_gl_type) { + Config *config = Config::get_singleton(); + switch (p_format) { case Image::FORMAT_L8: { if (RasterizerGLES3::is_gles_over_gl()) { @@ -391,24 +393,68 @@ static inline Error _get_gl_uncompressed_format(Image::Format p_format, GLenum & r_gl_type = GL_UNSIGNED_SHORT_5_6_5; } break; case Image::FORMAT_RF: { - r_gl_internal_format = GL_R32F; - r_gl_format = GL_RED; - r_gl_type = GL_FLOAT; + if (config->float_texture_linear_supported) { + r_gl_internal_format = GL_R32F; + r_gl_format = GL_RED; + r_gl_type = GL_FLOAT; + } else { + ERR_PRINT("R32 float texture not supported, converting to R16."); + if (p_image.is_valid()) { + p_image->convert(Image::FORMAT_RH); + } + r_real_format = Image::FORMAT_RH; + r_gl_internal_format = GL_R16F; + r_gl_format = GL_RED; + r_gl_type = GL_HALF_FLOAT; + } } break; case Image::FORMAT_RGF: { - r_gl_internal_format = GL_RG32F; - r_gl_format = GL_RG; - r_gl_type = GL_FLOAT; + if (config->float_texture_linear_supported) { + r_gl_internal_format = GL_RG32F; + r_gl_format = GL_RG; + r_gl_type = GL_FLOAT; + } else { + ERR_PRINT("RG32 float texture not supported, converting to RG16."); + if (p_image.is_valid()) { + p_image->convert(Image::FORMAT_RGH); + } + r_real_format = Image::FORMAT_RGH; + r_gl_internal_format = GL_RG16F; + r_gl_format = GL_RG; + r_gl_type = GL_HALF_FLOAT; + } } break; case Image::FORMAT_RGBF: { - r_gl_internal_format = GL_RGB32F; - r_gl_format = GL_RGB; - r_gl_type = GL_FLOAT; + if (config->float_texture_linear_supported) { + r_gl_internal_format = GL_RGB32F; + r_gl_format = GL_RGB; + r_gl_type = GL_FLOAT; + } else { + ERR_PRINT("RGB32 float texture not supported, converting to RGB16."); + if (p_image.is_valid()) { + p_image->convert(Image::FORMAT_RGBH); + } + r_real_format = Image::FORMAT_RGBH; + r_gl_internal_format = GL_RGB16F; + r_gl_format = GL_RGB; + r_gl_type = GL_HALF_FLOAT; + } } break; case Image::FORMAT_RGBAF: { - r_gl_internal_format = GL_RGBA32F; - r_gl_format = GL_RGBA; - r_gl_type = GL_FLOAT; + if (config->float_texture_linear_supported) { + r_gl_internal_format = GL_RGBA32F; + r_gl_format = GL_RGBA; + r_gl_type = GL_FLOAT; + } else { + ERR_PRINT("RGBA32 float texture not supported, converting to RGBA16."); + if (p_image.is_valid()) { + p_image->convert(Image::FORMAT_RGBAH); + } + r_real_format = Image::FORMAT_RGBAH; + r_gl_internal_format = GL_RGBA16F; + r_gl_format = GL_RGBA; + r_gl_type = GL_HALF_FLOAT; + } } break; case Image::FORMAT_RH: { r_gl_internal_format = GL_R16F; @@ -451,7 +497,7 @@ Ref TextureStorage::_get_gl_image_and_format(const Ref &p_image, I r_real_format = p_format; if (!Image::is_format_compressed(p_format)) { - Error err = _get_gl_uncompressed_format(p_format, r_gl_format, r_gl_internal_format, r_gl_type); + Error err = _get_gl_uncompressed_format(p_image, p_format, r_real_format, r_gl_format, r_gl_internal_format, r_gl_type); ERR_FAIL_COND_V_MSG(err != OK, Ref(), vformat("The image format %d is not supported by the Compatibility renderer.", p_format)); return p_image; } @@ -696,7 +742,7 @@ Ref TextureStorage::_get_gl_image_and_format(const Ref &p_image, I image->convert(Image::FORMAT_RG8); } - Error err = _get_gl_uncompressed_format(image->get_format(), r_gl_format, r_gl_internal_format, r_gl_type); + Error err = _get_gl_uncompressed_format(image, image->get_format(), r_real_format, r_gl_format, r_gl_internal_format, r_gl_type); ERR_FAIL_COND_V_MSG(err != OK, Ref(), vformat("The image format %d is not supported by the Compatibility renderer.", image->get_format())); r_real_format = image->get_format(); diff --git a/drivers/pulseaudio/audio_driver_pulseaudio.cpp b/drivers/pulseaudio/audio_driver_pulseaudio.cpp index 988f4e07f88..8802074e109 100644 --- a/drivers/pulseaudio/audio_driver_pulseaudio.cpp +++ b/drivers/pulseaudio/audio_driver_pulseaudio.cpp @@ -727,7 +727,8 @@ Error AudioDriverPulseAudio::init_input_device() { int input_buffer_frames = closest_power_of_2(input_latency * mix_rate / 1000); int input_buffer_size = input_buffer_frames * spec.channels; - pa_buffer_attr attr; + pa_buffer_attr attr = {}; + attr.maxlength = (uint32_t)-1; attr.fragsize = input_buffer_size * sizeof(int16_t); pa_rec_str = pa_stream_new(pa_ctx, "Record", &spec, &pa_rec_map); diff --git a/drivers/unix/file_access_unix_pipe.cpp b/drivers/unix/file_access_unix_pipe.cpp index eb7f12285a0..2929c4b2746 100644 --- a/drivers/unix/file_access_unix_pipe.cpp +++ b/drivers/unix/file_access_unix_pipe.cpp @@ -39,6 +39,7 @@ #include #include +#include #include #include #include @@ -134,6 +135,14 @@ String FileAccessUnixPipe::get_path_absolute() const { return path_src; } +uint64_t FileAccessUnixPipe::get_length() const { + ERR_FAIL_COND_V_MSG(fd[0] < 0, 0, "Pipe must be opened before use."); + + int buf_rem = 0; + ERR_FAIL_COND_V(ioctl(fd[0], FIONREAD, &buf_rem) != 0, 0); + return buf_rem; +} + uint64_t FileAccessUnixPipe::get_buffer(uint8_t *p_dst, uint64_t p_length) const { ERR_FAIL_COND_V_MSG(fd[0] < 0, -1, "Pipe must be opened before use."); ERR_FAIL_COND_V(!p_dst && p_length > 0, -1); diff --git a/drivers/unix/file_access_unix_pipe.h b/drivers/unix/file_access_unix_pipe.h index 3ccac0c01cf..aa2f46f9d6e 100644 --- a/drivers/unix/file_access_unix_pipe.h +++ b/drivers/unix/file_access_unix_pipe.h @@ -63,7 +63,7 @@ class FileAccessUnixPipe : public FileAccess { virtual void seek(uint64_t p_position) override {} virtual void seek_end(int64_t p_position = 0) override {} virtual uint64_t get_position() const override { return 0; } - virtual uint64_t get_length() const override { return 0; } + virtual uint64_t get_length() const override; virtual bool eof_reached() const override { return false; } diff --git a/drivers/wasapi/audio_driver_wasapi.cpp b/drivers/wasapi/audio_driver_wasapi.cpp index 669355b2b91..10df80d6796 100644 --- a/drivers/wasapi/audio_driver_wasapi.cpp +++ b/drivers/wasapi/audio_driver_wasapi.cpp @@ -57,6 +57,7 @@ typedef interface IAudioClient3 IAudioClient3; #ifndef __IAudioClient3_INTERFACE_DEFINED__ #define __IAudioClient3_INTERFACE_DEFINED__ +// clang-format off MIDL_INTERFACE("7ED4EE07-8E67-4CD4-8C1A-2B7A5987AD42") IAudioClient3 : public IAudioClient2 { public: @@ -87,7 +88,8 @@ IAudioClient3 : public IAudioClient2 { _In_ const WAVEFORMATEX *pFormat, /* [annotation][in] */ _In_opt_ LPCGUID AudioSessionGuid) = 0; -} +}; +// clang-format on __CRT_UUID_DECL(IAudioClient3, 0x7ED4EE07, 0x8E67, 0x4CD4, 0x8C, 0x1A, 0x2B, 0x7A, 0x59, 0x87, 0xAD, 0x42) #endif // __IAudioClient3_INTERFACE_DEFINED__ diff --git a/drivers/windows/file_access_windows_pipe.cpp b/drivers/windows/file_access_windows_pipe.cpp index 3f1a2ca141e..00f693aad52 100644 --- a/drivers/windows/file_access_windows_pipe.cpp +++ b/drivers/windows/file_access_windows_pipe.cpp @@ -104,6 +104,14 @@ String FileAccessWindowsPipe::get_path_absolute() const { return path_src; } +uint64_t FileAccessWindowsPipe::get_length() const { + ERR_FAIL_COND_V_MSG(fd[0] == nullptr, -1, "Pipe must be opened before use."); + + DWORD buf_rem = 0; + ERR_FAIL_COND_V(!PeekNamedPipe(fd[0], nullptr, 0, nullptr, &buf_rem, nullptr), 0); + return buf_rem; +} + uint64_t FileAccessWindowsPipe::get_buffer(uint8_t *p_dst, uint64_t p_length) const { ERR_FAIL_COND_V_MSG(fd[0] == nullptr, -1, "Pipe must be opened before use."); ERR_FAIL_COND_V(!p_dst && p_length > 0, -1); diff --git a/drivers/windows/file_access_windows_pipe.h b/drivers/windows/file_access_windows_pipe.h index 77b0fa30954..5aa30c171d6 100644 --- a/drivers/windows/file_access_windows_pipe.h +++ b/drivers/windows/file_access_windows_pipe.h @@ -62,7 +62,7 @@ class FileAccessWindowsPipe : public FileAccess { virtual void seek(uint64_t p_position) override {} virtual void seek_end(int64_t p_position = 0) override {} virtual uint64_t get_position() const override { return 0; } - virtual uint64_t get_length() const override { return 0; } + virtual uint64_t get_length() const override; virtual bool eof_reached() const override { return false; } diff --git a/editor/code_editor.cpp b/editor/code_editor.cpp index 470b16ad60f..1184d61a1e5 100644 --- a/editor/code_editor.cpp +++ b/editor/code_editor.cpp @@ -1913,7 +1913,9 @@ CodeTextEditor::CodeTextEditor() { zoom_button->set_flat(true); zoom_button->set_v_size_flags(SIZE_EXPAND | SIZE_SHRINK_CENTER); zoom_button->set_tooltip_text( - TTR("Zoom factor") + "\n" + vformat(TTR("%sMouse wheel, %s/%s: Finetune\n%s: Reset"), keycode_get_string((Key)KeyModifierMask::CMD_OR_CTRL), ED_GET_SHORTCUT("script_editor/zoom_in")->get_as_text(), ED_GET_SHORTCUT("script_editor/zoom_out")->get_as_text(), ED_GET_SHORTCUT("script_editor/reset_zoom")->get_as_text())); + TTR("Zoom factor") + "\n" + + // TRANSLATORS: The placeholders are keyboard shortcuts. The first one is in the form of "Ctrl+"/"Cmd+". + vformat(TTR("%sMouse wheel, %s/%s: Finetune\n%s: Reset"), keycode_get_string((Key)KeyModifierMask::CMD_OR_CTRL), ED_GET_SHORTCUT("script_editor/zoom_in")->get_as_text(), ED_GET_SHORTCUT("script_editor/zoom_out")->get_as_text(), ED_GET_SHORTCUT("script_editor/reset_zoom")->get_as_text())); zoom_button->set_text("100 %"); PopupMenu *zoom_menu = zoom_button->get_popup(); diff --git a/editor/connections_dialog.cpp b/editor/connections_dialog.cpp index f5e38a24e38..aea55c27eb4 100644 --- a/editor/connections_dialog.cpp +++ b/editor/connections_dialog.cpp @@ -1448,7 +1448,7 @@ void ConnectionsDock::update_tree() { doc_class_name = String(); } - class_icon = editor_data.get_script_icon(script_base); + class_icon = editor_data.get_script_icon(script_base->get_path()); if (class_icon.is_null() && has_theme_icon(native_base, EditorStringName(EditorIcons))) { class_icon = get_editor_theme_icon(native_base); } diff --git a/editor/create_dialog.cpp b/editor/create_dialog.cpp index 4da400a1494..ffd737e9695 100644 --- a/editor/create_dialog.cpp +++ b/editor/create_dialog.cpp @@ -259,14 +259,9 @@ void CreateDialog::_add_type(const StringName &p_type, TypeCategory p_type_categ inherits = ClassDB::get_parent_class(p_type); inherited_type = TypeCategory::CPP_TYPE; } else { - if (p_type_category == TypeCategory::PATH_TYPE || ScriptServer::is_global_class(p_type)) { - Ref